Zero6992 / chatGPT-discord-bot

Integrate ChatGPT into your own discord bot
GNU General Public License v2.0
2.63k stars 701 forks source link

AttributeError: 'Interaction' object has no attribute 'author' #386

Closed dinushay closed 1 year ago

dinushay commented 1 year ago

Maybe I did something wrong or I'm just being stupid but I get an error when I try to ask something in /chat

←[30;1m2023-05-02 18:26:38←[0m ←[34;1mINFO    ←[0m ←[35msrc.bot←[0m -> ←[31mDinu Nuggets#****←[0m : /chat [Hi] in (haupt-chat)
←[30;1m2023-05-02 18:26:39←[0m ←[31mERROR   ←[0m ←[35msrc.aclient←[0m -> Error while processing message: 'Interaction' object has no attribute 'author'
←[31mTraceback (most recent call last):
  File "E:\discordai\src\aclient.py", line 58, in process_messages
    await self.send_message(message, user_message)
  File "E:\discordai\src\aclient.py", line 72, in send_message
    author = message.author.id
AttributeError: 'Interaction' object has no attribute 'author'←[0m

I don't know what that means or how to solve it, so I'll just ask here

Zero6992 commented 1 year ago

Any missing environment variables in your .env file?

check here #230

dinushay commented 1 year ago

I changed REPLYING_ALL=false with REPLYING_ALL=False and it works now

FahadBinHussain commented 1 year ago

Same issue and same fix!