elliebot/src/EllieBot.VotesApi
Toastie 57a5993064
color typereader fix
delmsgoncmd
guildconfig init
2025-03-30 15:06:56 +13:00
..
Common added .fishlb 2025-03-30 13:48:14 +13:00
Controllers color typereader fix 2025-03-30 15:06:56 +13:00
Properties Updated EllieBot.VotesApi 2024-03-23 16:42:10 +13:00
Protos re-adding/reworking voting capabilities 2025-03-25 14:58:02 +13:00
.dockerignore Updated EllieBot.VotesApi 2024-03-23 16:42:10 +13:00
.gitignore Updated EllieBot.VotesApi 2024-03-23 16:42:10 +13:00
appsettings.Development.json Updated EllieBot.VotesApi 2024-03-23 16:42:10 +13:00
appsettings.json voteapi fixes 2025-03-29 20:49:00 +13:00
Dockerfile fix votesapi docker 2025-03-29 20:51:14 +13:00
EllieBot.VotesApi.csproj re-adding/reworking voting capabilities 2025-03-25 14:58:02 +13:00
Program.cs add env vars 2025-03-29 20:55:11 +13:00
README.md Updated EllieBot.VotesApi 2024-03-23 16:42:10 +13:00
Startup.cs allow origins in votes 2025-03-29 20:53:46 +13:00
Vote.cs fixed a file name 2024-08-22 20:29:43 +12:00

Votes Api

This api is used if you want your bot to be able to reward users who vote for it on discords.com or top.gg

[GET] /discords/new

Get the discords votes received after previous call to this endpoint.
Input full url of this endpoint in your creds.yml file under Discords url field.
For example "https://api.my.cool.bot/discords/new"

[GET] /topgg/new

Get the topgg votes received after previous call to this endpoint.
Input full url of this endpoint in your creds.yml file under Topgg url field.
For example "https://api.my.cool.bot/topgg/new"

[POST] /discordswebhook

Input this endpoint as the webhook on discords.com bot edit page
model: https://docs.botsfordiscord.com/methods/receiving-votes
For example "https://api.my.cool.bot/topggwebhook"

[POST] /topggwebhook

Input this endpoint as the webhook https://top.gg/bot/:your-bot-id/webhooks (replace :your-bot-id with your bot's id)
model: https://docs.top.gg/resources/webhooks/#schema
For example "https://api.my.cool.bot/discordswebhook"

Input your super-secret header value in appsettings.json's DiscordsKey and TopGGKey fields They must match your DiscordsKey and TopGG key respectively, as well as your secrets in the discords.com and top.gg webhook setup pages

Full Example:

⚠ Change TopggKey and DiscordsKey to a secure long string
⚠ You can use https://www.random.org/strings/?num=1&len=20&digits=on&upperalpha=on&loweralpha=on&unique=on&format=html&rnd=new to generate it

creds.yml

votes:
    TopggServiceUrl: "https://api.my.cool.bot/topgg"
    TopggKey: "my_topgg_key"
    DiscordsServiceUrl: "https://api.my.cool.bot/discords"
    DiscordsKey: "my_discords_key"

appsettings.json

...
  "DiscordsKey": "my_discords_key",
  "TopGGKey": "my_topgg_key",
...