Reputation: 11
does anyone know if its possible to send command info (statistics info) to a website so i dont have to keep on editing my website about how many guilds my bot is in
Upvotes: 0
Views: 887
Reputation: 2486
Yes this is possible. Let's assume your website is on server A and your discord bot is on server B.
B -> POST http request x amount of servers -> A validates the request and stores the payload in its database.
Here A has to listen to an endpoint for example "https://example.com/store-server-amount"
Remember to always serialize the data you receive and validate the request is from your bot and not someone else. You can send a password along with the payload in your url query
A -> GET http request -> B -> Returns x amount of servers -> A -> A stores the payload in its database.
Upvotes: 1