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))
评论列表
文章目录