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

Commit

Permalink
Disallow Self-Rep
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Ray committed Oct 25, 2018
1 parent 2ce7f19 commit 16d76d2
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions commands/rep.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ exports.run = async (client, message, args) => {
const resolvedUser = (args[0] !== undefined) ? message.guild.members.get(args[0].match(/[0-9]/g).join('')) : null;
const botuser = resolvedUser ? message.guild.members.get(resolvedUser.id) : message.member;
const thisUser = botuser.id;
if (thisUser === message.author.id) return msg.edit('You cannot give a reputation point to yourself!');
if (client.repPoints.get(thisUser) === undefined) {
await client.repPoints.set(thisUser, 1);
msg.edit(`***You have given a reputation point to ${botuser.user.tag}!***`);
Expand Down

0 comments on commit 16d76d2

Please sign in to comment.