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
, orheroku
for hosting the port should be set toprocess.env.PORT
to allow them to dynamically assign ports. You should set this on line 38 of thesrc/sever/index.js
file!
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/votes
for v2 webhooks
Run the server using the following
npm install
- Install required modulesnpm start
- for production startupnpm run dev
- for development startup