소스 검색

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

tags/v1.8.0
Roxie Gibson 6 년 전
부모
커밋
2800bf4a2f
1개의 변경된 파일2개의 추가작업 그리고 4개의 파일을 삭제
  1. +2
    -4
      roxbot/cogs/admin.py

+ 2
- 4
roxbot/cogs/admin.py 파일 보기

@@ -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:

Loading…
취소
저장