jonathonor / syncBot

A bot that syncs roles between multiple discord servers.
https://www.jonsbots.com/syncBot
30 stars 17 forks source link

Not able to register the bot. #14

Closed Mohta69 closed 2 years ago

Mohta69 commented 2 years ago

Screenshot 2022-04-15 at 11 47 16 PM I tried running "node register.js" but got the error. I've made sure everything is fine and I have even set up config.json properly.

jonathonor commented 2 years ago

@Mohta69 This is my mistake, I am uploading a new version of the example register.js script now. It is using an old version of the config instead of the new one. If you would like to fix it yourself, it should be as easy as swapping config.server1id in register.js for config.mainserver

Mohta69 commented 2 years ago

Alright my guy

Mohta69 commented 2 years ago

Hey! I tried running the newest version on this repo with everything set up properly, I'm facing an issue: Screenshot 2022-04-16 at 11 16 04 AM

jonathonor commented 2 years ago

@Mohta69 when you invited the bot to your server, make sure you enabled the application.commands permission.

Here is an excerpt from the dev docs. In order to make commands work within a guild, the guild must authorize your application with the applications.commands scope. The bot scope is not enough

Mohta69 commented 2 years ago

Now, "node register.js" does work but when I tried "node run.js" it reverted the following: Screenshot 2022-04-16 at 7 48 59 PM

jonathonor commented 2 years ago

@Mohta69 make sure you have the SyncBot role higher in the hierarchy of roles than the roles you are having the bot assign.

Mohta69 commented 2 years ago

@jonathonor Yes, syncBot's role is higher than every other role in both servers, yet I'm facing the same issue.

jonathonor commented 2 years ago

Hmm ok, then likely when the bot was invited it was still missing permissions, did you select view audit log, bot, application.commands, and manage roles when you invited it? Every time you have to rein Vite the bot you'll have to drag it above the roles it's assigning also.

jonathonor commented 2 years ago

If that doesn't work I'll go through the setup and make a YouTube video.

Mohta69 commented 2 years ago

Yes, I have made sure everything was set up properly.

jonathonor commented 2 years ago

Ok, give me a little bit, I'll make a video and see if we can't track down what I missed when writing the docs.

Mohta69 commented 2 years ago

Sure

Mohta69 commented 2 years ago

Do you have a discord where we can talk with ease?

jonathonor commented 2 years ago

jonathon#0110

Mohta69 commented 2 years ago

added

jonathonor commented 2 years ago

Closing this issue as the problem ended up being in the config syncedServers being sent as numbers instead of a string syncedServers: ["1234567890"] is correct, syncedServers: [1234567890] is incorrect.