bot config error please help
bibi-blocksberg opened this issue · comments
https://gyazo.com/c4be92131b2427fa5e2d107fe7b60807
}
Error: Config schema violation: port
must be number
at Conf._validate (/home/csgo-rcon-bot/node_modules/conf/dist/source/index.js:353:15)
at Conf.set store [as store] (/home/csgo-rcon-bot/node_modules/conf/dist/source/index.js:294:14)
at Conf.set (/home/csgo-rcon-bot/node_modules/conf/dist/source/index.js:188:20)
at /home/csgo-rcon-bot/app/discord-service.js:227:58
at processTicksAndRejections (node:internal/process/task_queues:96:5)
DiscordAPIError: Cannot send an empty message
at RequestHandler.execute (/home/csgo-rcon-bot/node_modules/discord.js/src/rest/RequestHandler.js:154:13)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async RequestHandler.push (/home/csgo-rcon-bot/node_modules/discord.js/src/rest/RequestHandler.js:39:14) {
method: 'post',
path: '/channels/917650399685668864/messages',
code: 50006,
httpStatus: 400
}
You should debug that by setting a breakpoint here:
csgo-rcon-bot/app/discord-service.js
Line 226 in 5fb93a4
I just tried changing an existing configuration with the running bot and it works fine there. If you do not want to dive deeper into this issue, why not giving it a try and use that instead?
https://discord.com/oauth2/authorize?client_id=797866820996169779&permissions=93248&scope=bot
because I have a rcon ip lock via iptables and only allow rcon tcp traffic internally, I installed the bot again and moved the default config to a different port, but every time it takes 27015
Ok, I see. And I found the cause. I have to cast the input explicitly to number. That seems to be a change in 'conf'. I just pushed the change. Please pull the latest version and try again.
If it works for you then, please close this issue.
thank you very much, I'll try it later and I'll let you know if it works
works thank you