Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deploying the slash commands and running the bot seems to want different things out of the settings.json #61

Closed
mabelmabelmabelmabel opened this issue Jan 21, 2022 · 8 comments
Labels
Type: Bug This is a bug report.

Comments

@mabelmabelmabelmabel
Copy link

🐛 Describe the Bug

deploying the slash command with the settings configured as in the readme gives me a bunch of errors that look like this:

TypeError: false in config for key OWNER_REPORTING does not conform to type string.

out of curiosity i tried converting it to a string with quotation marks, and it wanted a bunch of other stuff turned to strings too, so i did that, and eventually the command ran fine, but then gave me this error when i ran npm start:

TypeError: false in config for key OWNER_REPORTING does not conform to type boolean.

which makes sense, because i messed with the config, but the way it was working before didn't work either. i put it back to the way it was, and it opened and ran, but it won't recognize any slash commands, possibly because i had to change the config around to get the slash commands deployed and then put them back for the actual bot.

✏️ Steps to Reproduce

npm run deploy (after installing dependencies but not dev dependencies, if that matters?) in discord-tts-bot

😕 Expected Behavior

bot lets me deploy slash commands and run it with the same config settings

📜 Log

uhhh i dont know, is this anything?

$ npm run deploy

discord-tts-bot@4.0.0 deploy
node ./src/command-deployer.js

C:\Users\Mabel\discord-tts-bot\node_modules@greencoast\discord.js-extended\dist\classes\config\ConfigValidator.js:62
throw new TypeError(${value} in config for key ${key} does not conform to type ${type}.);
^

TypeError: false in config for key OWNER_REPORTING does not conform to type string.
at C:\Users\Mabel\discord-tts-bot\node_modules@greencoast\discord.js-extended\dist\classes\config\ConfigValidator.js:62:23
at Array.forEach ()
at ConfigValidator.validate (C:\Users\Mabel\discord-tts-bot\node_modules@greencoast\discord.js-extended\dist\classes\config\ConfigValidator.js:45:29)
at new ConfigProvider (C:\Users\Mabel\discord-tts-bot\node_modules@greencoast\discord.js-extended\dist\classes\config\ConfigProvider.js:81:24)
at Object. (C:\Users\Mabel\discord-tts-bot\src\command-deployer.js:5:16)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)

📷 Screenshots

Paste a screenshot of the bug (if applicable).

❓ Other Information

thank you for developing this bot and sorry if this is just me being clueless and not actually a bug

@mabelmabelmabelmabel mabelmabelmabelmabel added the Type: Bug This is a bug report. label Jan 21, 2022
@mabelmabelmabelmabel
Copy link
Author

um. update on the issue, the slash commands are working completely fine now (turns out i actually did have to wait an hour like the message said) but i think this still counts as a bug bc i had to rewrite config to do it, which is probably not intentional behavior

@moonstar-x
Copy link
Owner

Hey there, yes I'm aware of this bug, someone reported this to me earlier today. I didn't come across this myself because I rely on the default values, so I intentionally take those settings out.

I'm working on a fix right now and I expect to upload it later tonight.

@Maikel1990
Copy link

I'm having the same issue. I changed the code a bit for our own discord, we have some smaller channels where there is a user limit but the bot should get into them, so deleted that lines.
Maybe a new feature?
However i tried updating them, got the same error when trying to add the slash commands, i don't know if it does it automaticly if you build a docker image and run that one afterwards?

@moonstar-x
Copy link
Owner

Maybe a new feature?

I actually don't understand what feature it is that you were suggesting.

As for the Docker thing, technically I can't make it so that it deploys automatically because the deployer needs the discord token.

On the docker case, you should be able to deploy it by running:

 docker run -it --rm -e DISCORD_TOKEN="your_token" -e DISCORD_ENABLE_TTS_CHANNELS="true/false" moonstarx/discord-tts-bot npm run deploy

@Maikel1990
Copy link

Thanks will try you suggested command in a minute

For the feature i suggest is. If you give a bot or user move users it can avoid a user limit unless stated otherwise in the code.
So what i did is remove these lines.

if (channel.full) { return 'error.channel.full'; }

@moonstar-x
Copy link
Owner

Ah I see, I was not aware that that happened with the move users permission.

In any case you can also avoid it by making the bot join another channel then moving it to the actual channel you want to use, though I would see how it would get annoying quick. I'll think about it because I remember that feature was made by someone else.

@moonstar-x
Copy link
Owner

Also, if you try to run that command you'll still find the bug from this issue. I'm planning on updating this today at night so chances are you can try this tomorrow with an updated docker image.

@moonstar-x moonstar-x mentioned this issue Jan 22, 2022
1 task
@moonstar-x
Copy link
Owner

This should be fixed in #62.

You should update your bot now and expect to deploy the commands without the need to change your config as a workaround.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Type: Bug This is a bug report.
Projects
None yet
Development

No branches or pull requests

3 participants