Closed simplistic111 closed 1 year ago
Your code seems to be missing the gateway intents change, see: https://github.com/SinisterRectus/Discordia/discussions/369
setGame
is deprecated, use setActivity
instead.
In future, use the Discord server for issues, questions, etc. See: https://discord.gg/sinisterware
- Your code seems to be missing the gateway intents change, see: Discordia 2.11.0 and Discord API v8 #369
setGame
is deprecated, usesetActivity
instead.- In future, use the Discord server for issues, questions, etc. See: https://discord.gg/sinisterware
Now I have a different problem, none of the methods of defining the gateway intents actually work. I've tried enums, putting in in the variables, defining each one seperately, and the rest.
This is the method that I currently have in the script:
local client = discordia.Client()
client:enableAllIntents()
...and this is the output.
main.lua:5: attempt to call method 'enableAllIntents' (a nil value)
- Your code seems to be missing the gateway intents change, see: Discordia 2.11.0 and Discord API v8 #369
setGame
is deprecated, usesetActivity
instead.- In future, use the Discord server for issues, questions, etc. See: https://discord.gg/sinisterware
Now I have a different problem, none of the methods of defining the gateway intents actually work. I've tried enums, putting in in the variables, defining each one seperately, and the rest.
This is the method that I currently have in the script:
local client = discordia.Client()
client:enableAllIntents()
...and this is the output.
main.lua:5: attempt to call method 'enableAllIntents' (a nil value)
Nevermind, Discordia was on version 2.8.4 for me. Everything ended up working. Thank you!
So I've been trying to code my discord bot, but it never does anything clientside.
This is the code:
`local discordia = require('discordia') local json = require('json') local client = discordia.Client() local prefix = "!"
client:on('ready', function() print("yay!") client:setGame("Hello World!") end)
local file = io.open('./token.txt') local token = file:read('*a') file:close()
client:run('Bot '.. token)`
All gateway intents are turned on.
How do I fix this? Thanks!