Skip to content

Releases: Angelix1/Dishub

Added Typescript Declaration, Idk smth like that

14 Jul 18:58
fbf298a

Choose a tag to compare

Added Delete Function

10 Jul 20:05
9677468

Choose a tag to compare

Delete

Delete function for simplify on deleting a message after sometime

Code

Delete(message, Option, Content, time[ miliseconds ])
  1. message = The message that will be edited.
  2. Option ["1", "2", "3", "4"] = 1 Normal, 2 Reply with mention, 3 lineReply with mention, 4 lineReply Without Mention
  3. content = The content of next message or message tht will send.
  4. time = Time to wait till deletes happen.

5 Function ( Say, Re, LOG, Lreply, Edit )

09 Jul 18:25
a81336a

Choose a tag to compare

Edit

Edit function for simplify on editing message using setTimeout

Code
message = The message that will be edited
content = The content of next message or message tht will be replace to
time = Time to wait till next edits

Edit(message, content, time[ miliseconds ])

4 Function ( Say, Re, LOG, Lreply )

09 Jul 18:28
a81336a

Choose a tag to compare

What is this?

A Quality of Life Discord Package

Installation

npm i dishub --save

Usage

let Discord = require("discord.js");
let client = new Discord.Client();
let { Say , Re, LOG, Lreply } = require('dishub')

client.on("message", message => {

if (message.content === "ping") {
Say(message, "pong!")
}

if (message.content === "ping") {
Re(message, "pong!")
}

if (message.content === "ping") {
LOG("pong!")
}

if (message.content === "ping") {
Lreply(message, "pong!")
}

})

client.login("YOUR TOKEN HERE")

Explanations

Say(message, "pong!")
  1. Say is the package's Function for normal message.
  2. message is mesage event where you defined it as message or else. If you defined message event as msg then the code will be like this.
Say(msg, "pong!")
  1. "pong!" or content of thing you wanted to send. It Self-Explanatory.

Available Options

Send as normal message

Code
Output

Say(message, 'Content of the message you wanted to send')

Send message with Mention reply

Code
Output

Re(message, 'Content of the message you wanted to send')

Basically Console.log()

Code
Output

LOG('Content of the message you wanted to send')

WIP (Inline Reply)

In line Reply ( If error, Don't Use it, I still trying to figure it out, since Inline reply are not in Discord.js V12 )

Code
Output

Lreply(message, 'Content of the message you wanted to send')