rawon
rawon copied to clipboard
[Bug Report] Bot reloads everytime a command is used
Describe the bug
Everytime a command is used the bot reloads (/ping seems to work fine but the rest of the commands are glitched)
To Reproduce
- Start the bot
- Wait until the commands are fully loaded
- Join a voice channel and use the command
/play
- The bot joins the channel as normal
- Nothing happens: the bot's console (screenshots) seems to be reloading
Expected behavior
No response
Screenshots
[2022-10-09 11:12:36 (+02)] [info]: Command unban from moderation category is now loaded.
[2022-10-09 11:12:37 (+02)] [info]: Registered unmute to user context for global.
[2022-10-09 11:12:37 (+02)] [info]: Registered unmute to slash command for global.
[2022-10-09 11:12:37 (+02)] [info]: Command unmute from moderation category is now loaded.
[2022-10-09 11:12:37 (+02)] [info]: Registered warn to slash command for global.
[2022-10-09 11:12:37 (+02)] [info]: Command warn from moderation category is now loaded.
[2022-10-09 11:12:37 (+02)] [info]: Done loading 10 commands in moderation category.
[2022-10-09 11:12:37 (+02)] [info]: Done registering moderation category.
[2022-10-09 11:12:37 (+02)] [info]: Registering music category...
[2022-10-09 11:12:37 (+02)] [info]: Found 16 of commands in music, loading...
[2022-10-09 11:12:37 (+02)] [info]: Registered dj to slash command for global.
[2022-10-09 11:12:37 (+02)] [info]: Command dj from music category is now loaded.
[2022-10-09 11:12:57 (+02)] [info]: Registered lyrics to slash command for global.
[2022-10-09 11:12:57 (+02)] [info]: Command lyrics from music category is now loaded.
[2022-10-09 11:12:57 (+02)] [info]: Registered nowplaying to slash command for global.
[2022-10-09 11:12:57 (+02)] [info]: Command nowplaying from music category is now loaded.
[2022-10-09 11:12:57 (+02)] [info]: Registered pause to slash command for global.
[2022-10-09 11:12:57 (+02)] [info]: Command pause from music category is now loaded.
[2022-10-09 11:12:58 (+02)] [info]: Registered play to slash command for global.
[2022-10-09 11:12:58 (+02)] [info]: Command play from music category is now loaded.
[2022-10-09 11:12:58 (+02)] [info]: Registered queue to slash command for global.
[2022-10-09 11:12:58 (+02)] [info]: Command queue from music category is now loaded.
[2022-10-09 11:13:18 (+02)] [info]: Registered remove to slash command for global.
[2022-10-09 11:13:18 (+02)] [info]: Command remove from music category is now loaded.
[2022-10-09 11:13:18 (+02)] [info]: Registered repeat to slash command for global.
[2022-10-09 11:13:18 (+02)] [info]: Command repeat from music category is now loaded.
[2022-10-09 11:13:18 (+02)] [info]: Registered resume to slash command for global.
[2022-10-09 11:13:18 (+02)] [info]: Command resume from music category is now loaded.
[2022-10-09 11:13:18 (+02)] [info]: Registered search to message context for global.
[2022-10-09 11:13:18 (+02)] [info]: Registered search to slash command for global.
[2022-10-09 11:13:18 (+02)] [info]: Command search from music category is now loaded.
[2022-10-09 11:13:38 (+02)] [info]: Registered shuffle to slash command for global.
[2022-10-09 11:13:38 (+02)] [info]: Command shuffle from music category is now loaded.
[2022-10-09 11:13:39 (+02)] [info]: Registered skip to slash command for global.
[2022-10-09 11:13:39 (+02)] [info]: Command skip from music category is now loaded.
[2022-10-09 11:13:39 (+02)] [info]: Registered skipto to slash command for global.
[2022-10-09 11:13:39 (+02)] [info]: Command skipto from music category is now loaded.
[2022-10-09 11:13:39 (+02)] [info]: Registered stayinvoice to slash command for global.
[2022-10-09 11:13:39 (+02)] [info]: Command stayinvoice from music category is now loaded.
[2022-10-09 11:13:39 (+02)] [info]: Registered stop to slash command for global.
[2022-10-09 11:13:39 (+02)] [info]: Command stop from music category is now loaded.
[2022-10-09 11:13:59 (+02)] [info]: Registered volume to slash command for global.
[2022-10-09 11:13:59 (+02)] [info]: Command volume from music category is now loaded.
[2022-10-09 11:13:59 (+02)] [info]: Done loading 16 commands in music category.
[2022-10-09 11:13:59 (+02)] [info]: Done registering music category.
[2022-10-09 11:13:59 (+02)] [info]: All categories has been registered.
[2022-10-09 11:13:59 (+02)] [info]: Current bot language is FR
(node:315208) DeprecationWarning: Passing strings for MessageEmbed#setAuthor is deprecated. Pass a sole object instead.
[2022-10-09 11:22:19 (+02)] [warn]: DeprecationWarning: Passing strings for MessageEmbed#setAuthor is deprecated. Pass a sole object instead.
[2022-10-09 11:22:22 (+02)] [info]: [Shard #0] Track: "Eminem - Godzilla ft. Juice WRLD (Directed by Cole Bennett)" on Epok Community has started.
[2022-10-09 11:22:22 (+02)] [error]: UNCAUGHT_EXCEPTION: Error: Cannot play audio as no valid encryption package is installed.
- Install sodium, libsodium-wrappers, or tweetnacl.
- Use the generateDependencyReport() function for more information.
(node:315208) ExperimentalWarning: The Node.js specifier resolution flag is experimental. It could change or be removed at any time.
(Use `node --trace-warnings ...` to show where the warning was created)
[2022-10-09 11:22:23 (+02)] [info]: Loading 10 events...
[2022-10-09 11:22:23 (+02)] [info]: Events on listener channelUpdate has been added.
[2022-10-09 11:22:23 (+02)] [info]: Events on listener debug has been added.
[2022-10-09 11:22:23 (+02)] [info]: Events on listener error has been added.
[2022-10-09 11:22:23 (+02)] [info]: Events on listener guildBanAdd has been added.
[2022-10-09 11:22:23 (+02)] [info]: Events on listener guildBanRemove has been added.
[2022-10-09 11:22:23 (+02)] [info]: Events on listener interactionCreate has been added.
[2022-10-09 11:22:23 (+02)] [info]: Events on listener messageCreate has been added.
[2022-10-09 11:22:23 (+02)] [info]: Events on listener ready has been added.
[2022-10-09 11:22:23 (+02)] [info]: Events on listener voiceStateUpdate has been added.
[2022-10-09 11:22:23 (+02)] [info]: Events on listener warn has been added.
[2022-10-09 11:22:23 (+02)] [info]: Done loading events.
[2022-10-09 11:22:24 (+02)] [info]: Ready took
[2022-10-09 11:22:24 (+02)] [info]: Found 4 categories, registering...
[2022-10-09 11:22:24 (+02)] [info]: Registering developers category...
[2022-10-09 11:22:24 (+02)] [info]: Found 1 of commands in developers, loading...
[2022-10-09 11:22:24 (+02)] [info]: Vibin' is ready to serve 2 users on 12 guilds in 280 text channels and 82 voice channels!
[2022-10-09 11:22:24 (+02)] [info]: Command eval from developers category is now loaded.
[2022-10-09 11:22:24 (+02)] [info]: Done loading 1 commands in developers category.
[2022-10-09 11:22:24 (+02)] [info]: Done registering developers category.
[2022-10-09 11:22:24 (+02)] [info]: Registering general category...
[2022-10-09 11:22:24 (+02)] [info]: Found 4 of commands in general, loading...
(node:315208) ExperimentalWarning: Importing JSON modules is an experimental feature. This feature could change at any time
[2022-10-09 11:22:24 (+02)] [warn]: ExperimentalWarning: Importing JSON modules is an experimental feature. This feature could change at any time
[2022-10-09 11:22:24 (+02)] [info]: Registered about to slash command for global.
[2022-10-09 11:22:24 (+02)] [info]: Command about from general category is now loaded.
[2022-10-09 11:22:24 (+02)] [info]: Registered help to slash command for global.
[2022-10-09 11:22:24 (+02)] [info]: Command help from general category is now loaded.
[2022-10-09 11:22:25 (+02)] [info]: Registered invite to slash command for global.
[2022-10-09 11:22:25 (+02)] [info]: Command invite from general category is now loaded.
[2022-10-09 11:22:25 (+02)] [info]: Registered ping to slash command for global.
[2022-10-09 11:22:25 (+02)] [info]: Command ping from general category is now loaded.
[2022-10-09 11:22:25 (+02)] [info]: Done loading 4 commands in general category.
[2022-10-09 11:22:25 (+02)] [info]: Done registering general category.
[2022-10-09 11:22:25 (+02)] [info]: Registering moderation category...
[2022-10-09 11:22:25 (+02)] [info]: Found 10 of commands in moderation, loading...
[2022-10-09 11:22:25 (+02)] [info]: Registered ban to user context for global.
^[[B[2022-10-09 11:22:45 (+02)] [info]: Registered ban to slash command for global.
[2022-10-09 11:22:45 (+02)] [info]: Command ban from moderation category is now loaded.
[2022-10-09 11:22:45 (+02)] [info]: Registered infractions to user context for global.
[2022-10-09 11:22:45 (+02)] [info]: Registered infractions to slash command for global.
[2022-10-09 11:22:45 (+02)] [info]: Command infractions from moderation category is now loaded.
[2022-10-09 11:22:45 (+02)] [info]: Registered kick to user context for global.
[2022-10-09 11:22:46 (+02)] [info]: Registered kick to slash command for global.
[2022-10-09 11:22:46 (+02)] [info]: Command kick from moderation category is now loaded.
Operating System
Ubuntu/Linux
Additional context
Yesterday, the bot didn't have this issue.
I tried redoing it with the latest commit 7010b56
and it's doing the same thing.
Node.js version: 18.10.0 Discord.js version: 13.11.0 FFmpeg version: 5.0.1
Also tested with Node.js version 16.17.1
(LTS)
[2022-10-09 11:22:22 (+02)] [error]: UNCAUGHT_EXCEPTION: Error: Cannot play audio as no valid encryption package is installed.
- Install sodium, libsodium-wrappers, or tweetnacl.
- Use the generateDependencyReport() function for more information.
Looks like for some reason, tweetnacl
is not detected by the voice module.
If you're using glitch, try typing space (
) in .env file. Glitch will automatically fully restart the bot and trigger the module re-installation in index.js
.
Or if you're running it on your local machine, try re-installing all package by running npm i
and then restart the bot.
[2022-10-09 11:22:22 (+02)] [error]: UNCAUGHT_EXCEPTION: Error: Cannot play audio as no valid encryption package is installed. - Install sodium, libsodium-wrappers, or tweetnacl. - Use the generateDependencyReport() function for more information.
Looks like for some reason,
tweetnacl
is not detected by the voice module.If you're using glitch, try typing space (
) in .env file. Glitch will automatically fully restart the bot and trigger the module re-installation in
index.js
.Or if you're running it on your local machine, try re-installing all package by running
npm i
and then restart the bot.
Just tried, still doesn't work. I'll try to reinstall the packages manually.
I tried to reinstall tweetnacl manually it still doesn't work but the package appears in the node_modules
folder.
I also tried hosting it on my computer and there's still the same issue.
Can anyone else try it themselves? Because it's a real issue.
I got the same error too, but still didn't find any solution. Perhaps changing the STREAM_STRATEGY
config?
Try install npm i @discordjs/[email protected]
For windows (requires):
- Build Tools: 2017 (recommended 2019)
- Python: 3.7 or above (Below is not recommended)
For Ubuntu (VPS only), typing: sudo apt install -y gcc g++ make
.
And if there is an error during installation: sudo apt install -y python-is-python3
Fixed in 6da59d1
This issue comes back with 763d57027a9ee2418d470b22f179245a26dd7750. @discord.js/voice should be downgraded to 0.11.0.
https://github.com/discordjs/discord.js/issues/8740 https://github.com/discordjs/discord.js/pull/8741
https://github.com/discordjs/discord.js/issues/8745