-
Notifications
You must be signed in to change notification settings - Fork 5
Developers
If your bot has a global currency (Not guild-specific currency, as they are hard to control) and has joined at least 50 servers, you can apply.
We will value your currency based on methods to earn/use it. Then we'll discuss an exchange rate and issue the token for API use.
A central API is used so that each participating bot can send requests and receive requests to process transactions.
Let's say a user wants to exchange A bot currency to B bot currency.
- The user requests exchanging on A bot
- In the API, A bot sends a message indicates that a transaction has been started.
- API converts the currency and leaves a message waiting for B bot to pick up.
- B bot picks the message up and finishes the transaction.
- The user is notified by B bot indicates that the transaction has been finished.
- Participating developers should not abuse their privilege of manipulating the currency, including but not limited to adding a high amount of currency to themselves and convert them into other currencies. Violators will be banned from this program.
- When a user requests a transaction on your bot, your bot must send back the full callback content.
API source can be found in this repo.
For any request, if you received status code 502 or 503, the API is offline. It'll be back up in a few minutes but please still notify austinhuang#1076.
GET https://discoin.disnodeteam.com/transaction/:user/:amount/:to
- Authorization: Your token.
- Json: Boolean,
true= return JSON on success.
- User: User ID of the user who started the transaction.
- Amount: Raw amount in your currency
- To: Destination currency code
Plain text: Either an info starting with Approved., a transaction rejection starting with [Decline] or an error starting with [ERROR]. You can (and you should) send the full text to the user.
JSON: Either a JSON object stated below, or a plaintext error stated above.
{
"user": "155784937511976960",
"receipt": "QNJbxRipM4P9lIyRDet1",
"limitNow": 4999,
"currency": "EGX"
}GET https://discoin.disnodeteam.com/transaction
- Authorization: Your token.
Either a JSON array of unprocessed transactions, or a plain text error starting with [ERROR].
- C#/Discord.NET by Fires
- NodeJS/Discord.js by austinhuang, by TJDoesCode
Need help? Join support server or dial 0800-DISCOIN / (0800) 347-2646 on DiscordTel.