https://github.com/infinitybotlist/webhook-server
Simple Fastify Server for logging our Vote Webhooks
https://github.com/infinitybotlist/webhook-server
Last synced: about 1 year ago
JSON representation
Simple Fastify Server for logging our Vote Webhooks
- Host: GitHub
- URL: https://github.com/infinitybotlist/webhook-server
- Owner: InfinityBotList
- Created: 2023-03-21T04:52:36.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2023-03-31T07:01:53.000Z (about 3 years ago)
- Last Synced: 2025-02-17T11:31:50.011Z (over 1 year ago)
- Language: JavaScript
- Size: 43 KB
- Stars: 0
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Funding: .github/FUNDING.yml
Awesome Lists containing this project
README
# Webhook Server Sample
Simple Fastify Server for logging our Vote Webhooks
---
## Setup
### Step 1
- 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`, or `heroku` for hosting the port should be set to `process.env.PORT` to allow them to dynamically assign ports. You should set this on line 38 of the `src/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 webhooks
- `https://yourdomain.com/hooks/v2/votes` for v2 webhooks

### Step 2
Run the server using the following
- `npm install` - Install required modules
- `npm start` - for production startup
- `npm run dev` - for development startup
---
## Deployment