Skip to content
This repository was archived by the owner on Dec 19, 2018. It is now read-only.

Commit 16d76d2

Browse files
author
Matthew Ray
committed
Disallow Self-Rep
1 parent 2ce7f19 commit 16d76d2

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

commands/rep.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ exports.run = async (client, message, args) => {
1111
const resolvedUser = (args[0] !== undefined) ? message.guild.members.get(args[0].match(/[0-9]/g).join('')) : null;
1212
const botuser = resolvedUser ? message.guild.members.get(resolvedUser.id) : message.member;
1313
const thisUser = botuser.id;
14+
if (thisUser === message.author.id) return msg.edit('You cannot give a reputation point to yourself!');
1415
if (client.repPoints.get(thisUser) === undefined) {
1516
await client.repPoints.set(thisUser, 1);
1617
msg.edit(`***You have given a reputation point to ${botuser.user.tag}!***`);

0 commit comments

Comments
 (0)