Use the website https://webhook-topgg.com/ (by top.gg staff member) instead, it has everything already.
This guide is partially broken. The code still works but the steps for deploying/hosting is different. Use https://github.com/imptype/deta-space-fastapi-example for the updated steps, and you'll need to modify the Spacefile
to include the environment variables (check the docs).
But you can use the website above anyway.
This is a relay server that posts Top.gg vote events as a basic Discord message through a Discord webhook.
It's great if you don't have a server or you don't want to give your IP to Top.gg.
- Make a new project on Deta.
- Click the 'Deploy to Deta' button on this repo.
- Select your project and enter the environment variables.
DISCORD_WEBHOOK_URL
is https://discord.com/api/webhooks/{id}/{token}- Edit Discord channel -> Integrations -> New webhook -> Copy webhook URL
TOPGG_AUTH_TOKEN
is your authorization text in https://top.gg/bot/{id}/webhooks
- Once deployed, set Top.gg's webhook to point to this page of the Micro's URL: https://{id}.deta.dev/github
Click the following button to deploy this Micro in your own Deta project: