當(dāng)我運(yùn)行 .py 文件時(shí),窗口立即關(guān)閉。此時(shí)并沒(méi)有出現(xiàn)錯(cuò)誤代碼。如果我把Embed相關(guān)的代碼刪除,就可以正常運(yùn)行了。我不確定問(wèn)題是什么......import discord, asyncio, osfrom discord.ext import commandstoken = "########"game = discord.Game("??&help??")bot = commands.Bot(command_prefix = '&', status = discord.Status.online, activity = game)@bot.eventasync def on_ready(): print("hi")@bot.command()async def help(ctx): embed=discord.Embed(title = "???? ?? ????,,," , description=f"?? ??? ??????.", color = 0x00ff56) embed.add_field(name="??", value="&??", inline=True) embed.add_field(name="?? ??", value="&??", inline=True) embed.add_field(name="?? ??", value="&??", inline=True) embed.add_field(name="??? ??", value="&??", inline=True) embed.add_field(name="?? ???", value="&???", inline=True) embed.add_field(name="??? ??", value="&??.", inline=True) embed.add_field(name="? ??", value="&??", inline=True) embed.add_field(name="??? ?? ??", value="&???", inline=True) await ctx.send(embed=embed)bot.run(token)
與discord.embed相關(guān)的錯(cuò)誤
慕桂英3389331
2023-07-18 13:47:39