mod.py 文件源码

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

项目:Discord-SelfBot 作者: IgneelDxD 项目源码 文件源码
def softban(self, ctx, member: str, *, reason: str=None):
        """Softban a Member(Kick and delete Messages)"""
        member = getUser(ctx, member)
        if member:
            try:
                await ctx.guild.ban(member, reason=reason)
                await ctx.guild.unban(member)
            except discord.Forbidden:
                await edit(ctx, content="\N{HEAVY EXCLAMATION MARK SYMBOL} Missing permissions to ban this Member", ttl=5)
            except discord.HTTPException:
                await edit(ctx, content="\N{HEAVY EXCLAMATION MARK SYMBOL} Something went wrong while trying to ban...", ttl=5)
            else:
                e = discord.Embed(color=embedColor(self))
                e.set_author(icon_url="https://cdn.discordapp.com/attachments/278603491520544768/301087009408024580/273910007857414147.png",
                             name="Soft Banned: " + str(member))
                await edit(ctx, embed=e)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号