1.4.0 • Published 3 years ago

edemarz-api v1.4.0

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

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\ NPM


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**
1.4.0

3 years ago

1.3.9

3 years ago

1.3.8

3 years ago

1.3.7

3 years ago

1.3.6

3 years ago

1.3.5

3 years ago

1.3.4

3 years ago

1.3.3

3 years ago

1.3.2

3 years ago

1.3.1

3 years ago

1.3.0

3 years ago

1.2.9

3 years ago

1.2.8

3 years ago

1.2.7

3 years ago

1.2.6

3 years ago

1.2.5

3 years ago

1.2.4

3 years ago

1.2.3

3 years ago

1.2.2

3 years ago

1.2.1

3 years ago

1.2.0

3 years ago

1.1.9

3 years ago

1.1.8

3 years ago

1.1.7

3 years ago

1.1.6

3 years ago

1.1.5

3 years ago

1.1.4

3 years ago

1.1.3

3 years ago

1.1.2

3 years ago

1.1.1

3 years ago

1.1.0

3 years ago

1.0.9

3 years ago

1.0.8

3 years ago

1.0.7

3 years ago

1.0.6

3 years ago

1.0.5

3 years ago

1.0.4

3 years ago

1.0.3

3 years ago

1.0.2

3 years ago

1.0.1

3 years ago

1.0.0

3 years ago