Accounts Bot
A simple discord bot thats posts accounts from your .txt file to discord.
Table of Contents
Introduction
This Discord bot, built on discord.js v14, facilitates sending account details to users upon request.
How are the accounts processed?
Accounts should be entered into the .txt
file using the format mail : password
.
Features:
- Slash Command:
/gen type: Minecraft
to request an account. Types: Minecraft, Netflix, Steam - Events and Error Handling: Implemented to ensure smooth operation.
- No Repeated Accounts: Each account is removed from
.txt
after redemption. - Vouch Button: Included in DMs for user feedback.
- Gift/Give/Top Credits - Credits system to redeem accounts.
- Role for status - Have something in your status and get a role.
- Webhook logging - Log every command bot event through a webhook.
Usage:
- Invite the bot to your Discord server.
- Use
/generate type: Minecraft
to receive a Minecraft account.
REST API Usage:
This includes a REST API that provides account information through HTTP endpoints. The REST API allows external applications to retrieve the number of accounts available for each type (Minecraft, Netflix, Steam) by making GET requests.
To use the REST API, follow these steps:
-
Start the Discord bot by running the command
node index.js
in your terminal. -
The REST API will automatically start along with the bot. It listens on port 3000.
-
To retrieve the account counts, make a GET request to the following endpoint:
GET http://localhost:3000/api/v1/stock
-
The API will respond with a JSON object containing the account counts for each type. For example:
{ "minecraft": 2, "netflix": 0, "steam": 0 }
This means there are currently 2 Minecraft accounts available, and 0 accounts for Netflix and Steam.
Links