fun.py 文件源码

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

项目:dogbot 作者: slice 项目源码 文件源码
def say(self, ctx: DogbotContext, channel: TextChannel, *, text: clean_content):
        """
        Makes the bot say something in a certain channel.

        Mentions will be scrubbed, meaning that they will be converted to plain text
        to avoid abuse.

        Dogbot Moderator is required to do this.
        """
        try:
            await channel.send(text)
        except discord.Forbidden:
            await ctx.send(f'I can\'t speak in {channel.mention}.')
        except discord.HTTPException:
            await ctx.send(f'Your message is too long! 2,000 characters maximum.')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号