当我运行 .py 文件时,窗口立即关闭。此时并没有出现错误代码。如果我把Embed相关的代码删除,就可以正常运行了。我不确定问题是什么......
import discord, asyncio, os
from discord.ext import commands
token = "########"
game = discord.Game("👻&help👻")
bot = commands.Bot(command_prefix = '&', status = discord.Status.online, activity = game)
@bot.event
async 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)
HUH函数
莫回无
相关分类