1.2.5 • Published 3 years ago

dishub v1.2.5

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

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, Edit, Delete } = 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!")
}

if(message.content === 'edit')
{
      message.channel.send("hi")
      .then(x => 
      {
          Edit(x, "hehehe", 3000)
          Edit(x, "lol", 5000)
          Edit(x, "xd", 7000)
          Edit(x, "bruh", 9000)
      })
}

if (message.content === "ping") 
{
	Delete(message, 1,"pong!", 10000)
}



})

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

Say

Send as normal message

Code Output

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

Re

Send message with Mention reply

Code Output

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

LOG

Basically Console.log()

Code Output

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

Lreply

Sends Message in Form of inline Reply

Code Output

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

Edit

Edit function for simplify on editing message using setTimeout

Code

  1. message = The message that will be edited.
  2. content = The content of next message or message tht will be replace to.
  3. time = Time to wait till next edits.
Edit(message, content, time[ miliseconds ])

Delete

Delete function for simplify on deleting a message after sometime

Delete(message, 1, "hi", 2000) // sends "hi" as normal message and delete after 2 sec
Delete(message, Option, Content, time[ miliseconds ])
  1. message = The message that will be deleted.
  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 be send.
  4. time = Time to wait till deletes happen.
1.2.5

3 years ago

1.2.21

3 years ago

1.2.22

3 years ago

1.2.2

3 years ago

1.2.0

3 years ago

1.1.1

3 years ago

1.2.1

3 years ago

1.1.0

3 years ago

1.0.0

3 years ago