SinisterRectus / Discordia

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

New to Lua and dont know the error #310

Closed Aidan-The-Dev closed 2 years ago

Aidan-The-Dev commented 2 years ago

I am very new to lua (first day) and cant figure this error out I have used youtube multiple times to see if I installed anything wrong and I didn't install anything wrong yet I still get the error

Error:

`Uncaught Error: ...ents/first-lua-bot/deps/discordia/libs/utils/Emitter.lua:105: .../deps/discordia/libs/containers/abstract/TextChannel.lua:300: attempt to index field 'client' (a nil value) stack traceback: [builtin#37]: at 0x7ff6d8975d00 ...ents/first-lua-bot/deps/discordia/libs/utils/Emitter.lua:105: in function <...ents/first-lua-bot/deps/discordia/libs/utils/Emitter.lua:92> ...ments/first-lua-bot/deps/discordia/libs/client/Shard.lua:115: in function 'handlePayload' ...s/first-lua-bot/deps/discordia/libs/client/WebSocket.lua:50: in function <...s/first-lua-bot/deps/discordia/libs/client/WebSocket.lua:35> stack traceback: [C]: in function 'error' ...sers/ocean/Documents/first-lua-bot/deps/coro-channel.lua:16: in function 'assertResume' ...sers/ocean/Documents/first-lua-bot/deps/coro-channel.lua:69: in function 'onPlain' ...n/Documents/first-lua-bot/deps/secure-socket/biowrap.lua:76: in function <...n/Documents/first-lua-bot/deps/secure-socket/biowrap.lua:61> [C]: in function 'run'

    [C]: in function 'xpcall'
    [string "bundle:/init.lua"]:47: in function 'fn'
    [string "bundle:deps/require.lua"]:310: in function <[string "bundle:deps/require.lua"]:266>`
Bilal2453 commented 2 years ago

Hey there. Welcome to the community!

Could you show the code that is producing this error so we know what's wrong with your code? Although I prefer if you do that in our Discord community server or the Discord API server, since the issues tab is for actual bugs only.