general.py 文件源码

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

项目:Dota2HelperBot 作者: enoch-ng 项目源码 文件源码
def say_welcome_channel(self, server, msg):
        welcome_channel = self.bot.server_settings_list[server.id]["welcome_channel"]
        if welcome_channel:
            try:
                await self.bot.send_message(self.bot.get_channel(welcome_channel), msg)
            except (discord.Forbidden, discord.NotFound, discord.InvalidArgument):
                await self.bot.send_message(server.default_channel, WELCOME_CHANNEL_NOT_FOUND)
        else:
            await self.bot.send_message(server.default_channel, msg)

    # As auto_change_nick is now off by default, there is no need for an on_server_join() method
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号