bot.py 文件源码

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

项目:PlasmaBot 作者: PlasmaRobotics2403 项目源码 文件源码
def on_server_remove(self, server):
        if self.config.debug:
            print('[PB][SERVER] Left {} (Owner: {})'.format(
                server.name,
                server.owner.name
            ))

        if '{server_count}' in self.config.bot_game:
            self.config.bot_game_compiled = self.config.bot_game.replace('{server_count}', str(len(self.servers)))

            if self.config.bot_stream:
                self.game = discord.Game(name=self.config.bot_game_compiled, url=self.config.bot_stream, type=1)
            else:
                self.game = discord.Game(name=self.config.bot_game_compiled)

            await self.change_status(self.game)

        if self.config.log_channel:
            self.config.log_channel = self.get_channel(self.config.raw_log_channel)
            if not self.config.log_channel:
                print('[PB][LOGGING] Connection to Log Channel {} has been destroyed.  Reconnect to Log Channel to resume Logging'.format(self.config.raw_log_channel))

        enabled_plugins = await self.get_plugins(server)
        for plugin in enabled_plugins:
            self.loop.create_task(plugin.on_server_remove(server))
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号