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

Commit

Permalink
Prevent rep points to bots
Browse files Browse the repository at this point in the history
  • Loading branch information
Matthew Ray committed Oct 25, 2018
1 parent 16d76d2 commit 506bc3f
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 @@ -12,6 +12,7 @@ exports.run = async (client, message, args) => {
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 (botuser.user.bot) return msg.edit('Bots cannot live to appreciate reputation points, give it to someone *alive*!');
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 506bc3f

Please sign in to comment.