API - joeleeofficial/EconomyBot Wiki

Welcome To EconomyBot API Documentation 🙃

Well yes, there is an API for this. You can choose to disable it or just leave it enable ! If you choose to disable it, go to index.js and delete this code require('./api/server.js')(Discord, client, Levels) then leave all those variables for API empty. Further more, you only need discord-xp and discord.js if you choose not to enable it in future.

Getting Started, API

So first, let's fill up those variables !

- Discord Webhook URL

Send An Announcement Or Notification Using Discord Webhook

-Authorization

To Prevent SPAM/Fake POST Request. To Ensure That POST Request Was Made By Yourself.

- Dashboard URL Or Host URL

Another Security Concern, "CORS". To Ensure A POST/GET Request Was Made From Certain Domain ( for example : your bot's dashboard or leaderboard page ). Use * To Disable It

# Discord Webhook URL
webhook=https://discord.com/api/webhooks/<CHANNEL_ID>/<TOKEN>

# Authorization 
password=1234

# Dashboard URL or Host URL
url=localhost:3000