【发布时间】:2020-09-24 09:01:11
【问题描述】:
嘿 我应该如何在 Discord.py 中输入来自用户的字符串。我在尝试从用户那里获取输入时遇到错误。如果有人可以帮助我,那就太好了:)
import discord
from discord import embeds
from discord.ext.commands import Bot
from discord.ext import commands
import time
client = discord.Client()
embed = discord.Embed()
bot = commands.Bot(command_prefix='.')
@client.event
async def on_message(message):
if message.author == client.user:
return
if message.content.startswith('.gdrive'):
first_embed = discord.Embed(title="Unlimited Google Drive Storage", color=0x2bff00)
new_embed = discord.Embed(title='Made by zSupremeSniper0 & toxicXvoid', color=0x2bff00)
new_embed2 = discord.Embed(title='Please Enter your gmail', color=0x2bff00)
# send a first message with an embed
msg = await message.channel.send(embed=first_embed)
# edit the embed of the message
time.sleep(5)
await msg.edit(embed=new_embed)
time.sleep(5)
await msg.edit(embed=new_embed2)
【问题讨论】:
标签: python discord.py discord.py-rewrite