privatemsg.py 文件源码

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

项目:ICO-Moderator 作者: Plenglin 项目源码 文件源码
def on_private_message(self, msg: discord.Message):
        if re.match(r'restart', msg.content):
            await self.client.send_message(msg.channel, 'Restarting now...')
            await self.client.logout()
            os.execl(sys.executable, sys.executable, *sys.argv)

        elif re.match(r'shutdown', msg.content):
            await self.client.send_message(msg.channel, 'Shutting down...')
            await self.client.logout()
            sys.exit(0)
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号