2.1.0 ā€¢ Published 11 months ago

dit.js v2.1.0

Weekly downloads
-
License
ISC
Repository
-
Last release
11 months ago

dit.js šŸ¦„

A library created to build simple Discord bots.

What is dit.js? šŸ¤”


dit.js is a simple library that is built on top of discord.js to simplify creating Discord bots. Build and run your bot in superspeed.

Complete documentation

Getting started ā–¶ļø

Set up your main file (index.js) šŸ‘‡

const dit = require("dit.js")

const client = new dit({
  prefix: "YOUR_PREFERRED_PREFIX",
  token: "YOUR_BOTS_TOKEN",
  commandsPath: "./commands"
})

client.build()

Huh? what just happened? did we just make our main file? Oh šŸ˜², how simple was that?

The commands folder šŸ“‚

We need a folder so dit.js can take commands from. Make a folder called "commands", or, pick a name you want and just adjust commandsPath: "PATH" in your main file initializor.

The command files šŸ—ƒļø

If you want dit.js to take commands from a file in your commands folder, make sure it ends with .dit.js so that dit.js knows that it is a dit.js file.

Your folder-file structure should look like something like this:

.
ā”œā”€ā”€ commands/
ā”‚   ā”œā”€ā”€ maincommands.dit.js
ā”‚   ā””ā”€ā”€ othercommands.dit.js
ā””ā”€ā”€ index.js

Adding commands

Try adding a simple command to your dit.js file:

+ ping
- pong

There are no module.exports requirement in your .dit.js files unlike other packages, you just type them right away. You can add multiple commands to a single .dit.js file.

If you're familiar with RiveScript, you would understand this right away. If you're not, let me give you some explanation:

+ ping <--- the command trigger (will be triggered when used (prefix)ping)
- pong <--- will be sent as a reply. The "-" at the beginning of the line is called "operator"

The operators are at the beginning of the lines, used to execute stuff.

+ ping
- pong! {ping}ms. 
        ^^^^^^
       function

The functions are inside operators, used to return stuff.

NOTICE

This package is super new, it was made a week ago and I just published it. Please be patient on updates and I will add as much as operators and functions as I can.

2.0.9

11 months ago

2.0.8

11 months ago

2.1.0

11 months ago

2.0.7

11 months ago

2.0.6

11 months ago

2.0.5

11 months ago

2.0.4

11 months ago

2.0.3

11 months ago

2.0.2

11 months ago

2.0.1

12 months ago

2.0.0

12 months ago

1.1.0

12 months ago

1.0.8

12 months ago

1.0.7

12 months ago

1.0.6

12 months ago

1.0.5

12 months ago

1.0.4

12 months ago

1.0.3

12 months ago

1.0.2

12 months ago

1.0.1

12 months ago

1.0.0

12 months ago