SNOV-bot is a bot designed to verify Syscoin sentry node holders and allow them access to specific private channels in a Discord server. It does this by checking if the user has made a collateral transaction and then having them sign a message in the Syscoin QT wallet to prove that they own the collateral address, once this is complete the user is permitted access to the private channels. Each user's collateral will be checked daily and if it is moved then the access to the private channels will be revoked for that user.
- Create an app on the Discord Developers site.
- Give the app the PRESENCE, SERVER MEMBERS, and MESSAGE CONTENT intents.
- Set up the username and icon of the app.
- Get the client secret token, for using with the back-end bot.
- In the OAuth2 tab, using the OAuth2 URL Generator, give the app the
bot
scope, and theManage Channels
bot permission. - Use the generated URL to add the app to your Discord server.
- Edit the private channel to give the bot the following permissions:
View Channel
,Manage Channel
, andManage Permissions
.
- Install bun.
- Git clone the repo.
- Create a .env file in the main project folder and add the relevant info into it.
- Add the relevant channels and channel permissions to the
channels.json
file, ensuring that the main sentry node channel is the first one. You can find a list of viable channel permissions here. - In the main project folder run the command
bun install
to install all dependencies. - In the main project folder run the command:
bun --watch index.js
, this will run the bot and will restart it if it crashes for any reason. Setting up a service to run the bot is advised.