Browse Source

Moved unban to the new converter just so it can raise another error that will be more helpful.

tags/v1.7.0
Roxie Gibson 6 years ago
parent
commit
afe70bf72a
2 changed files with 5 additions and 5 deletions
  1. +2
    -2
      roxbot/cogs/admin.py
  2. +3
    -3
      roxbot/load_config.py

+ 2
- 2
roxbot/cogs/admin.py View File

@@ -229,11 +229,11 @@ class Admin():
@commands.has_permissions(ban_members=True)
@commands.bot_has_permissions(ban_members=True)
@bot.command()
async def unban(self, ctx, member_id: int, *, reason=""):
async def unban(self, ctx, member: roxbot.converters.UserConverter, *, reason=""):
"""Unbans user with given ID. Allows you to give a reason."""
mem = None
for ban in await ctx.guild.bans():
if ban.user.id == member_id:
if ban.user.id == member.id:
mem = ban.user
if mem is None:
raise bot.CommandError("User not found in bans.")

+ 3
- 3
roxbot/load_config.py View File

@@ -12,9 +12,9 @@ tat_token = settings["Roxbot"]["Tatsumaki_Token"]


class EmbedColours(IntEnum):
pink = 0xDEADBF
yellow = 0xFDDF86
blue = 0x6F90F5
pink = 0xDEADBF # Roxbot Pink
yellow = 0xFDDF86 # Roxbot Yellow
blue = 0x6F90F5 # Roxbot Blue
frog_green = 0x4C943D # Used for FROGTIPS
red = 0xe74c3c # Used for on_error
dark_red = 0x992d22 # Used for on_command_error

Loading…
Cancel
Save