Procházet zdrojové kódy

changed unban to do a single ban lookup through the new function in discord.py

tags/v1.8.0
Roxie Gibson před 6 roky
rodič
revize
2800bf4a2f
1 změnil soubory, kde provedl 2 přidání a 4 odebrání
  1. +2
    -4
      roxbot/cogs/admin.py

+ 2
- 4
roxbot/cogs/admin.py Zobrazit soubor

@@ -277,10 +277,8 @@ class Admin:
@bot.command()
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:
mem = ban.user
ban = await ctx.guild.get_ban(member)
mem = ban.user
if mem is None:
raise bot.CommandError("User not found in bans.")
try:

Načítá se…
Zrušit
Uložit