@sapphire/plugin-i18next FallbackLng Error

🆘 Hi, here's the problem I'm having. 📌 Can you help me solve this problem ? I have a languages folder with an en-US folder and a fr folder inside. my code works, but if I set my server language to a language that doesn't have a folder, my bot crashes. According to the plugin files, the default fallback is en-US, but it doesn't work. my code works, but the fallback language doesn't work 🛑 Error:
2024-11-07 11:35:50 - ERROR - Encountered error on chat input command "ping" at path "E:\DEV\DEV NODE JS\Projets\Privés\StarGame\dev_bot\src\commands\ping.ts" ReferenceError: Invalid language provided
2024-11-07 11:35:50 - ERROR - at _InternationalizationHandler.format (E:\DEV\DEV NODE JS\Projets\PrivĂ©s\StarGame\dev_bot\node_modules\.pnpm\@[email protected]\node_modules\@sapphire\plugin-i18next\src\lib\InternationalizationHandler.ts:276:24)
2024-11-07 11:35:50 - ERROR - at resolveKey (E:\DEV\DEV NODE JS\Projets\PrivĂ©s\StarGame\dev_bot\node_modules\.pnpm\@[email protected]\node_modules\@sapphire\plugin-i18next\src\lib\functions.ts:158:24)
2024-11-07 11:35:50 - ERROR - at processTicksAndRejections (node:internal/process/task_queues:105:5)
2024-11-07 11:35:50 - ERROR - at async PingCommand.executePing (E:\DEV\DEV NODE JS\Projets\Privés\StarGame\dev_bot\src\commands\ping.ts:35:50)
2024-11-07 11:35:50 - ERROR - at async PingCommand.chatInputRun (E:\DEV\DEV NODE JS\Projets\Privés\StarGame\dev_bot\src\commands\ping.ts:31:3)
2024-11-07 11:35:50 - ERROR - at async E:\DEV\DEV NODE JS\Projets\PrivĂ©s\StarGame\dev_bot\node_modules\.pnpm\@[email protected]\node_modules\@sapphire\framework\src\listeners\application-commands\chat-input\CoreChatInputCommandAccepted.ts:19:19
2024-11-07 11:35:50 - ERROR - at async Function.fromAsync (E:\DEV\DEV NODE JS\Projets\PrivĂ©s\StarGame\dev_bot\node_modules\.pnpm\@[email protected]\node_modules\@sapphire\result\src\lib\Result.ts:1096:19)
2024-11-07 11:35:50 - ERROR - at async _CoreListener.run (E:\DEV\DEV NODE JS\Projets\PrivĂ©s\StarGame\dev_bot\node_modules\.pnpm\@[email protected]\node_modules\@sapphire\framework\src\listeners\application-commands\chat-input\CoreChatInputCommandAccepted.ts:15:18)
2024-11-07 11:35:50 - ERROR - at async Function.fromAsync (E:\DEV\DEV NODE JS\Projets\PrivĂ©s\StarGame\dev_bot\node_modules\.pnpm\@[email protected]\node_modules\@sapphire\result\src\lib\Result.ts:1096:19)
2024-11-07 11:35:50 - ERROR - at async _CoreListener._run (E:\DEV\DEV NODE JS\Projets\PrivĂ©s\StarGame\dev_bot\node_modules\.pnpm\@[email protected]\node_modules\@sapphire\framework\src\lib\structures\Listener.ts:99:18)
2024-11-07 11:35:50 - ERROR - Encountered error on chat input command "ping" at path "E:\DEV\DEV NODE JS\Projets\Privés\StarGame\dev_bot\src\commands\ping.ts" ReferenceError: Invalid language provided
2024-11-07 11:35:50 - ERROR - at _InternationalizationHandler.format (E:\DEV\DEV NODE JS\Projets\PrivĂ©s\StarGame\dev_bot\node_modules\.pnpm\@[email protected]\node_modules\@sapphire\plugin-i18next\src\lib\InternationalizationHandler.ts:276:24)
2024-11-07 11:35:50 - ERROR - at resolveKey (E:\DEV\DEV NODE JS\Projets\PrivĂ©s\StarGame\dev_bot\node_modules\.pnpm\@[email protected]\node_modules\@sapphire\plugin-i18next\src\lib\functions.ts:158:24)
2024-11-07 11:35:50 - ERROR - at processTicksAndRejections (node:internal/process/task_queues:105:5)
2024-11-07 11:35:50 - ERROR - at async PingCommand.executePing (E:\DEV\DEV NODE JS\Projets\Privés\StarGame\dev_bot\src\commands\ping.ts:35:50)
2024-11-07 11:35:50 - ERROR - at async PingCommand.chatInputRun (E:\DEV\DEV NODE JS\Projets\Privés\StarGame\dev_bot\src\commands\ping.ts:31:3)
2024-11-07 11:35:50 - ERROR - at async E:\DEV\DEV NODE JS\Projets\PrivĂ©s\StarGame\dev_bot\node_modules\.pnpm\@[email protected]\node_modules\@sapphire\framework\src\listeners\application-commands\chat-input\CoreChatInputCommandAccepted.ts:19:19
2024-11-07 11:35:50 - ERROR - at async Function.fromAsync (E:\DEV\DEV NODE JS\Projets\PrivĂ©s\StarGame\dev_bot\node_modules\.pnpm\@[email protected]\node_modules\@sapphire\result\src\lib\Result.ts:1096:19)
2024-11-07 11:35:50 - ERROR - at async _CoreListener.run (E:\DEV\DEV NODE JS\Projets\PrivĂ©s\StarGame\dev_bot\node_modules\.pnpm\@[email protected]\node_modules\@sapphire\framework\src\listeners\application-commands\chat-input\CoreChatInputCommandAccepted.ts:15:18)
2024-11-07 11:35:50 - ERROR - at async Function.fromAsync (E:\DEV\DEV NODE JS\Projets\PrivĂ©s\StarGame\dev_bot\node_modules\.pnpm\@[email protected]\node_modules\@sapphire\result\src\lib\Result.ts:1096:19)
2024-11-07 11:35:50 - ERROR - at async _CoreListener._run (E:\DEV\DEV NODE JS\Projets\PrivĂ©s\StarGame\dev_bot\node_modules\.pnpm\@[email protected]\node_modules\@sapphire\framework\src\lib\structures\Listener.ts:99:18)
3 Replies
Favna
Favna‱4w ago
Can you show your i18next config?
Djbrown
DjbrownOP‱4w ago
default configuration
Favna
Favna‱4w ago
I'll come back to this Friday or Saturday then.
Want results from more Discord servers?
Add your server