miscord / miscord

Facebook Messenger to Discord bridge
https://miscord.net
MIT License
259 stars 74 forks source link

Bot is attempting to use a server other than the configured one #414

Closed Aida-Enna closed 4 years ago

Aida-Enna commented 5 years ago

Describe the bug Bot is not using the server from config.json - It's trying to use another server that the bot is in.

To Reproduce Steps to reproduce the behavior:

  1. This is my part of my config:
    "discord": {
    "token": "Redacted",
    "guild": "557863115283234837",
    "createChannels": true
    },
    "channels": {
    "command": "557865770365747200",
    "error": "557865749008482316"
    },
    "checkUpdates": true
  2. It tries to join another Guild (Server) - 517962440521285633

You can see this in the error log below:

 SUCCESS  2019-03-20 06:20:56  › Worker process 5112 started.
  START   2019-03-20 06:20:56  › Gzipping old logs...
 SUCCESS  2019-03-20 06:20:56  › All old logs gzipped, starting Miscord
  INFO    2019-03-20 06:20:56 getConfig › Using config at /root/.config/Miscord/config.json
  START   2019-03-20 06:20:56  › Launching Miscord v4.7.1
  START   2019-03-20 06:20:56 login › Logging in...
  INFO    2019-03-20 06:20:56 login › logLevel 'info'
  INFO    2019-03-20 06:20:56 updateNotifier › Checking for updates...
  START   2019-03-20 06:20:56 discord › login › Logging in to Discord...
 SUCCESS  2019-03-20 06:20:57 discord › login › Logged in to Discord
  ERROR   2019-03-20 06:20:57 errorHandler ›  { DiscordAPIError: Missing Permissions
    at item.request.gen.end (/usr/lib/node_modules/miscord/node_modules/discord.js/src/client/rest/RequestHandlers/Sequential.js:79:15)
    at then (/usr/lib/node_modules/miscord/node_modules/snekfetch/src/index.js:215:21)
    at <anonymous>
    at process._tickDomainCallback (internal/process/next_tick.js:228:7) name: 'DiscordAPIError', message: 'Missing Permissions', path: '/api/v7/guilds/517962440521285633/webhooks', code: 50013, method: 'GET' }

  WARN    2019-03-20 06:20:57 errorHandler › Logs from NPM are unnecessary and don't give much information.
  Miscord logs folder:
  /root/.config/Miscord/logs
  ERROR   2019-03-20 06:20:57  › Worker process 5112 died (1, null).
  FATAL   2019-03-20 06:20:57  › Process crashed less than 2 seconds since the last launch, exiting.

Specifically, '/api/v7/guilds/517962440521285633/webhooks'.

Specifications:

RradLaw commented 5 years ago

I've had the same issue previously after I migrated the bots hosting server. No amounts of kicking/readding the bot or adding admin rights fixed it. Managed to temporarily resolve the issue by creating a new discord bot.

ptrcnull commented 5 years ago

Fixed in https://github.com/miscord/miscord/commit/11eda8890fb565566a5064cdbed9cf9da3b399b9, I'll close the issue once it's released