Commit 59750fed authored by Jens Reidel's avatar Jens Reidel

fix $banfromhelpme

parent 0088bba8
Pipeline #2042 failed with stages
in 0 seconds
......@@ -235,20 +235,12 @@ class Help(commands.Cog):
Only Support Team Members can use this command."""
)
if isinstance(thing_to_ban, discord.User):
id = thing_to_ban.id
else:
id = thing_to_ban
thing_to_ban = self.bot.get_guild(id)
id = thing_to_ban.id if isinstance(thing_to_ban, discord.User) else thing_to_ban
try:
await self.bot.pool.execute('INSERT INTO helpme ("id") VALUES ($1);', id)
except UniqueViolationError:
return await ctx.send(_("Error... Maybe they're already banned?"))
await ctx.send(
_("{thing} has been banned for the helpme command :ok_hand:").format(
thing=thing_to_ban.name
)
)
await ctx.send(_("They have been banned for the helpme command :ok_hand:"))
@commands.guild_only()
@commands.group(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment