Pycord사용하고 잇는데 계속 오류뜸 뭐가 문젠지 아는 사람..?
import discord
bot = discord.Bot() token = "bot_token" @bot.event async def on_ready(): print("봇이 작동합니다.") @bot.slash_command(guild_ids = [843858962407620618], description="Check bot's response latency") async def ping(ctx): embed = discord.Embed(title="Pong!", description=f"Delay: {bot.latency} seconds", color=0xFFFFFF) embed.set_footer(text="Embed Footer") await ctx.respond(embed=embed) bot.run(token)블로그 그대로 복붙해서 VSC에 쳣더니
line 4, in <module>
bot = discord.Bot()
AttributeError: module 'discord' has no attribute 'Bot'
자꾸이런오류뜸
디스코드라는 모듈에 Bot이 없다는데 공식문서 읽어봐
현재 대부분 봇지원 api가 업데이트로 꼬여서 예전꺼 따라하면 안됨 명령어가 바뀜 저거 옛날거야 - dc App
공식 문서 getting start 따라하셈
https://discordpy.readthedocs.io/en/stable/intro.html
- dc App