discord - Discord.py“Za Warudo”机器人命令
问题描述
我正在制作一个机器人命令...
- 锁定频道;使任何人都无法发送消息。
- 发送图像和消息。
- 解锁通道前等待 10 秒,允许其他人发送图像。
但是,我尝试了不同的消息,例如更改角色名称和不同的睡眠时间,但机器人不会发送消息、修改命令或它打算做什么。只有这个命令不起作用,并且控制台中没有弹出错误。有人可以帮我吗?
@commands.has_permissions(manage_messages=True)
async def warudo(ctx):
await ctx.channel.set_permissions(ctx.verified, send_messages=False)
await ctx.send('***Za Warudo!***')
await ctx.send(file=discord.File('https://pics.me.me/thumb_you-thought-it-was-an-emoji-but-it-was-me-71487398.png'))
await ctx.send( ctx.channel.mention + "has paused.")
await asyncio.sleep(10)
await ctx.channel.set_permissions(ctx.verified, send_messages=True)```
解决方案
推荐阅读
- storage - Avro 版本不兼容
- r - 如何调整 R 中的箱线图框的大小以适合绘制的框
- sequelize.js - Sequelize:如何获取最新的唯一记录?
- javascript - Rest API Patch 一次只有 1 个字段
- asp.net - 首次访问时的实体框架性能
- node.js - 尝试在nodejs javascript数组中打印对象密钥对
- vba - PowerPoint VBA - 扩展图表数据范围
- sql - 表锁定 SQL Server 2 会话
- asp.net - 从 adwords 重写查询 URL
- scala - 如何在运行时刷新 application.conf