events.py 文件源码

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

项目:PomodoroBot 作者: VicenteRD 项目源码 文件源码
def on_ready(self):
        """ A listener for the event in which the bot is ready to work.
        """

        lib.log("")
        lib.log("Using discord.py version: " + discord.__version__)
        lib.log("Logged in as :")
        lib.log("\t" + self.bot.user.name)
        lib.log("\t" + self.bot.user.id)
        lib.log("")

        await self.bot.update_status()

        message = "**[{}]** {}"\
            .format(config.get_config().get_str('version'),
                    config.get_config().get_str('startup_msg'))
        for server in self.bot.servers:
            await self.bot.send_message(server, message)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号