mod.py 文件源码

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

项目:dogbot 作者: slice 项目源码 文件源码
def base_purge(self, ctx: DogbotContext, limit: int, check=None, **kwargs):
        # check if it's too much
        if limit > 5000:
            await ctx.send('Too many messages to purge. 5,000 is the maximum.')
            return

        # purge the actual command message too
        limit += 1

        try:
            msgs = await ctx.channel.purge(limit=limit, check=check, **kwargs)
            await ctx.send(f'Purge complete. Removed {len(msgs)} message(s).', delete_after=2.5)
        except discord.NotFound:
            pass  # ignore not found errors
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号