Fixed the thing where you could give a rating with a bot for example with /say +rep @user I am a nasty cheater

main^2
supopur 2 years ago
parent 88784b5bac
commit efe51310c8

@ -1,4 +1,4 @@
import discord, toml import discord, toml, os
from discord.ext import commands from discord.ext import commands
from discord.commands import option from discord.commands import option
@ -66,6 +66,9 @@ class EssentialCommands(commands.Cog):
if message.author in mentioned_users: if message.author in mentioned_users:
await message.channel.send("You can't give reputation to yourself.") await message.channel.send("You can't give reputation to yourself.")
return return
elif message.author.bot:
await message.channel.send("Bots can't give ratings...")
return
comment = message.content.split(' ', 2)[2] if len(message.content.split(' ')) > 2 else '' comment = message.content.split(' ', 2)[2] if len(message.content.split(' ')) > 2 else ''
#print(f"Rep for: {mentioned_users}") #print(f"Rep for: {mentioned_users}")

Loading…
Cancel
Save