edemarz-api v1.4.0
Welcome to Edemarz API!
❔ Edemarz API
A Simple API to configure and enhance the ways of coding your Discord Bot! Compatible with Discord.JS V.12 but it should also work on older versions. There is plenty of features!\
I will add more feature as frequently as possible!\
Features Coming Soon: createConnect4Command\
Installing
First install Node.JS Then:
$ npm install edemarz-api
🔧 Usages
- DiscordClient - Initiate/Make your Discord Bot Online! The base of every function!
- SetStatus - Sets the bot status!
- createTextCommand - Create a command that replys with a text!
- createEmbedCommand - Create a command that replys with an embed message!
- createKickCommand - Create an Advanced Kick Command!
- MongooseClient - Connect to MongoDB using Mongoose in a simplified way!
✈ Importing
//Using Node.JS `require()`
const EdemarzAPI = require("edemarz-api");
//Using ES6 Imports
import EdemarzAPI from "edemarz-api"
📔 Examples
Logging In
const EdemarzAPI = require("edemarz-api");
const DiscordClient = new EdemarzAPI.DiscordClient("very epic discord bot token here", "Text to log when the bot gets online!")
DiscordClient.login()
//Always keep the .login at the bottom of your code!
Properties: Token, ReadyText
Setting A Status
const EdemarzAPI = require("edemarz-api"); const DiscordClient = new EdemarzAPI.DiscordClient("very epic token here", "Text to log when the bot gets online!")
DiscordClient.setStatus("Very epic status here", "watching"); //Usage: , <Type (watching, playing, competing, listening, streaming)>
DiscordClient.login() //Always keep the .login at the bottom of your code!
> **Properties: Status, Type**
### **Creating a Text Response Command**
```javascript
const EdemarzAPI = require("edemarz-api");
const DiscordClient = new EdemarzAPI.DiscordClient("very epic token here", "Text to log when the bot gets online!")
DiscordClient.setStatus("Very epic status here", "watching"); //Usage: <Status>, <Type (watching, playing, competing, listening, streaming)>
DiscordClient.createTextCommand("hi", "Hello", "-"); //Usage: <Command Name>, <Response Text>, <Prefix>
DiscordClient.login()
//Always keep the .login at the bottom of your code!
Properties: Command Name, Response Text, Prefix
Creating an Embed Response Command
const EdemarzAPI = require("edemarz-api");
const DiscordClient = new EdemarzAPI.DiscordClient("Very epic discord bot token here", "Text to log when the bot logs on/gets online!")
DiscordClient.createEmbedCommand("hi", "-", "Hello", "This is an embed description", "This is the embed footer"); // Usage: <Command Name (All Lowercase)>, <Prefix>, <Embed Title>, <Embed Description>, <Embed Footer>
DiscordClient.login()
Properties: Command Name, Preefix, Embed Title, Description, Footer
Creating a Kick Command
const EdemarzAPI = require("edemarz-api");
const DiscordClient = new EdemarzAPI.DiscordClient("Very epic discord bot token here", "Text to log when the bot logs on/gets online!")
DiscordClient.createKickCommand("kick", "KICK_MEMBERS", "-"); //Kick a user | Usage: CommandName, Permission Required, Prefix
DiscordClient.login()
Properties: Command Name, Permission, Prefix\
Connecting to MongoDB
const EdemarzAPI = require("edemarz-api"); const MongooseClient = new EdemarzAPI.MongooseClient("This text will be logged to the console when we successfuly connect to the database!")
MongooseClient.connect("Mongo SRV String here, it is used to connect your Node.JS Application to MongoDB!")
console.log(MongooseClient.connected); //Returns a boolean, if connected returns True/Connected To MongoDB if not connected returns False/Not Connected to MongoDB
> **Properties: Mongo SRV URL String, ConnectedMSG, {.connected (Checks if a MongooseClient is initiated/connected!)}**
## **My Socials**
**[My Youtube](https://www.youtube.com/channel/UC12PLeRLvFSgZGZFpxykdUA)**\
**Discord: Edemarz#8879**
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago
3 years ago