discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'str' object has no attribute 'message' 이런 에러가 나는데 어떻게해야할까요..? ㅠㅠ
Ignoring exception in on_message Traceback (most recent call last): File "C:\Users\admin\AppData\Local\Programs\Python\Python37\lib\site-packages\discord\client.py", line 312, in _run_event await coro(*args, **kwargs) File "C:\Users\admin\Documents\bot\start.py", line 69, in on_message await client.send_message(message.channel, vote[0]) AttributeError: 'Client' object has no attribute 'send_message' 이 오류가 뜨면서 안됩니다.
신버전 구문:
vote = message.content[4:].split("/")
await message.channel.send("투표 - " + vote[0])
for i in range(1, len(vote)):
choose = await message.channel.send("```" + vote[i] + "```")
await choose.add_reaction('👍')
if message.content.startswith("!투표"):
vote = message.content[4:].split("/")
await client, message(message.channel, vote[0])
for i in range(1, len(vote)):
choose = await client.send_message(message.channel, vote[i])
await client.add_reaction(choose, "👍")
이거 맞음?
마지막에 client.add_reaction오류나는데 이거 어케 바꾸나요
저기 근데 봇 토큰 다 노출되는데요 ㅇㅅㅇ
TypeError: send() takes from 1 to 2 positional arguments but 3 were given
이 에러 뜨면 어떻게 해요
discord.ext.commands.errors.CommandInvokeError: Command raised an exception: AttributeError: 'str' object has no attribute 'message'
이런 에러가 나는데 어떻게해야할까요..? ㅠㅠ
AttributeError: 'Client' object has no attribute 'add_reaction'
Ignoring exception in on_message
Traceback (most recent call last):
File "C:\Users\admin\AppData\Local\Programs\Python\Python37\lib\site-packages\discord\client.py", line 312, in _run_event
await coro(*args, **kwargs)
File "C:\Users\admin\Documents\bot\start.py", line 69, in on_message
await client.send_message(message.channel, vote[0])
AttributeError: 'Client' object has no attribute 'send_message' 이 오류가 뜨면서 안됩니다.
이때랑 지금이랑 많이 달라졌어요
여기 이사람 채팅 안읽음 걍 치지 마셈
설명에 아무것도 없는데요?
@@sliyatheta 무아님 ㅎㅇ 저 kgsana
근데 중복투표도 가능해서...
안되는데...
@ᄀᄀᄒ
@client.event
async def on_message(message):
if message.content.startswith("!투표"):
vote = message.content[4:].split("/")
await message.channel.send(message.channel, vote[0])
for i in range(1, len(vote)):
choose = await message.channel.send(message.channel, "'''" + vote[i] + "'''")
await client.add_reaction(choose, '👍')
이렇게 했는데 안되요
@ᄀᄀᄒ 안되요ㅜ
왜 안되지 ㅇㅅㅇ
끝까지 보렴 예전의 나야
끝까지 봐도 안되네 그냥 포기해 예전의 나야
앜ㅋㅋㅋㅋㅋㅋㅋ
응원합니다