Python 在Discord.py中从用户获取输入时出现问题
嘿 如何在Discord.py中输入用户的字符串。我在尝试从用户获取输入时出错。如果有人能帮我,那就太好了:)Python 在Discord.py中从用户获取输入时出现问题,python,discord.py,discord.py-rewrite,Python,Discord.py,Discord.py Rewrite,嘿 如何在Discord.py中输入用户的字符串。我在尝试从用户获取输入时出错。如果有人能帮我,那就太好了:) 导入不一致 从discord导入嵌入 从discord.ext.commands导入Bot 从discord.ext导入命令 导入时间 client=discord.client() embed=discord.embed() bot=commands.bot(命令前缀='。) @客户端事件 异步def on_消息(消息): 如果message.author==client.user
导入不一致
从discord导入嵌入
从discord.ext.commands导入Bot
从discord.ext导入命令
导入时间
client=discord.client()
embed=discord.embed()
bot=commands.bot(命令前缀='。)
@客户端事件
异步def on_消息(消息):
如果message.author==client.user:
返回
如果message.content.startswith('.gdrive'):
first_embed=discord.embed(title=“无限谷歌硬盘存储”,color=0x2bff00)
new_embed=discord.embed(title='Made by zSupremeSniper0&toxicXvoid',color=0x2bff00)
new_embed2=discord.Embed(title='Please Enter your gmail',color=0x2bff00)
#发送第一条带有嵌入消息的消息
msg=wait message.channel.send(嵌入=first\u嵌入)
#编辑消息的嵌入
时间。睡眠(5)
等待消息编辑(嵌入=新嵌入)
时间。睡眠(5)
wait msg.edit(embed=new_embed2)
可用于等待用户输入:
# edit the embed of the message
time.sleep(5)
await msg.edit(embed=new_embed)
time.sleep(5)
await msg.edit(embed=new_embed2)
def check(m):
return m.channel == message.channel
msg = await client.wait_for('message', check=check)
await message.channel.send("OK")