Simple Fastify Server for logging our Vote Webhooks
- Open and edit the config.js file using the table below as a reference!
| Value | Description | Example |
|---|---|---|
hook_secret |
Your webhook secret | InfinityBotsTest_2022 |
bot_token |
Discord Client Token | Found in the Discord Dev Portal |
domain |
The domain for the Server | https://votes.infinitybots.gg |
guildID |
Discord Server ID for Logs | 758641373074423808 |
voteLogs |
Channel ID in the Server Above | 998714340326781049 |
port |
The port the Server will run on | 4223 |
NOTE: If you are using
railway, orherokufor hosting the port should be set toprocess.env.PORTto allow them to dynamically assign ports. You should set this on line 38 of thesrc/sever/index.jsfile!
NOTE: Webhook Secret should also be set in the settings/edit section for your bot on our website (shown below)
NOTE: Webhook URL shown below should be
https://yourdomain.com/hooks/v1/votes/for v1 webhookshttps://yourdomain.com/hooks/v2/votesfor v2 webhooks
Run the server using the following
npm install- Install required modulesnpm start- for production startupnpm run dev- for development startup
