SinisterRectus / Discordia

Discord API library written in Lua for the Luvit runtime environment
MIT License
688 stars 144 forks source link

bot doesn't respond to commands #357

Closed Zordon1337 closed 1 year ago

Zordon1337 commented 1 year ago

hello I'm beginner at coding bots in lua i have basic !ping command. everything is ok bot is online but when i use !ping nothing happens no console log, bot doesn't respond

saint-deity commented 1 year ago

Make sure you have message content intent enabled in the Application dashbord. image

Zordon1337 commented 1 year ago

Sorry. my bad lol before it was working without enabling it i didin't know that i must enable it

Zordon1337 commented 1 year ago

But i gonna test it when i will be back in home

Zordon1337 commented 1 year ago

works thanks and i have another question is there any way to make bot get username of message author and send it for example if someone gonna say "hello" and bot respond with "hello username_of_message_author"

TohruMKDM commented 1 year ago

You can get the username of any user via user.username, this is defined in the property table under the Wiki Page for User here So for example you'd do message.author.username to get the message author's name. Also for further inquiries please redirect yourself to either the DAPI Server or the Discordia Server as Github Issues is intended for reporting bugs and other issues.

saint-deity commented 1 year ago

Thanks Tohru, and not a problem Zordon.

Zordon1337 commented 1 year ago

thx. problem solved so i can close