moderation.py 文件源码

python
阅读 26 收藏 0 点赞 0 评论 0

项目:GAFBot 作者: DiNitride 项目源码 文件源码
def xban(self, ctx, user_id: int):
        """
        Allows the banning of a user not int he guild via ID
        """
        try:
            await ctx.bot.http.ban(user_id, ctx.message.guild.id, 0)
        except discord.Forbidden:
            await ctx.channel.send(":x: 403 FORBIDDEN")
        except discord.NotFound:
            await ctx.channel.send(":x: User not found.")
        else:
            await ctx.channel.send(f":negative_squared_cross_mark:  Banned user {user_id} - <@{user_id}>.")
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号