channel_management.py 文件源码

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

项目:discord-bot-chatfilter 作者: pogodevorg 项目源码 文件源码
def filter(self):

        await self.client.wait_until_ready()

        # get arrays channels id need to post
        discord_channels = []
        for server in self.client.servers:
            for channel in server.channels:
                if channel.name in self.config.get('channels', []):
                    discord_channels.append(
                        discord.Object(channel.id))

        while not self.client.is_closed:
            for channel in discord_channels:
                await self.client.send_message(channel, message)

            await asyncio.sleep(300)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号