SinisterRectus / Discordia

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

Cant get the message content #383

Closed SuyfooS closed 1 year ago

SuyfooS commented 1 year ago

My Code :

local Discord = require('discordia')
local Client = Discord.Client()

Client:on("ready", function()
    print("Bot is ready!")
end)

Client:on('messageCreate', function(Message)
    local rawContent = Message.content
    print(Message.content) -- That is printing nothing ! ! !
    if (rawContent:lower() == '!hello') then
        print("Got it")
        --Message:reply(string.format('Hello, %s', Message.author.mentionString))
    end
end)

local TokenFile = io.open("Token.txt", "r")
local TokenString = TokenFile:read('*a')
TokenFile:close()
Client:run('Bot '.. TokenString)

for some reason its printing nothing.

AllMesi commented 1 year ago

turn these on image

OngakuKun commented 1 year ago

turn these on image

Worked for me thx ^^

Ta-noshii commented 1 year ago

Can you mark this issue as resolved?