🤖 Makes it easy to create bots on discord through a simple command handler

Overview

MyBotHelper.JS

📚 About

facilitates the creation of bots via discord.js, the repository already has a main script that automatically synchronizes and executes all commands that are in the /cmds/ folder.

📥 Installing & Setting

  1. First clone the repository git clone https://github.com/mavinsi/mybothelper
  2. install the necessary dependencies npm install
  3. Create a file named .env
  4. Copy the .env.example file into the .env
  5. Replace the spaces with the information (name and token) that was requested as below
BOT_NAME=<YOUR_BOT_NAME>
BOT_TOKEN=<YOUR_BOT_TOKEN>
  1. If you need an example see below
BOT_NAME="John Doe"
BOT_TOKEN="JUST A TOKEN OF YOUR BOT"

🏃 Executing & First test

After having followed the installation and configuration steps correctly, your script is ready to be launched.

to start the bot just type npm start and wait for the script to initialize load the commands and initialize completely.

if everything went well, you will receive a final message with the name of your bot informing you that it is online, now let's test for your luck the repository already comes with a simple hello world command included, simply add the bot to a server and type "hello"

🏗️ What is the structure of a command

Below is a simple command structure that responds to a "hello" message sent by any user with "Hello World!"

module.exports= {
    name: 'hello',
    description: 'simples hello world message',
    execute(message,args){

      // what will be executed will be here inside

        message.channel.send(`Hello world!`)
    }
}

the 'name' is basically the prefix that will be used to call that command, that is, if the 'name' is 'ping' every time I send a message to the bot written 'ping' the command will be executed and 'description' is basically the description of what that command will do, defining it is purely for organization.

everything between execute(){} will be executed when the command is called, to start let's make a command that will show us an answer in the terminal.

🧑‍🔧 How to build your first command

first let's create a file inside the /cmds/ folder, let's name it first.js and we will type inside it the following base code:

module.exports= {
    name: 'first',
    description: 'my first command',
    execute(){
   

    }
}

after having placed our base code now let's say what our command will do, as I said above, let's make it send us a message in the terminal, as we are using node.js let's use the console.log function.

console.log('message I want to show')

or directly on command

module.exports= {
    name: 'first',
    description: 'my first command',
    execute(){

   console.log('message I want to show')

    }
}

now we can save the file and run our bot with npm start if everything went right when we type in a group where the bot is the message "first" we will receive in the console the message: "message I want to show"

You might also like...

An Amazing SlashCommands Handler (With Sharding & Mongo) Made by discord.gg/azury

An Amazing SlashCommands Handler (With Sharding & Mongo) Made by discord.gg/azury

SlashCommands Handler by The Azury Team If this Git-Repo gets "40" Stars ⭐ i'll add some more Commands! 🛠️ FEATURES: 1. SlashCommands Support 2. Cont

Dec 2, 2022

New Discord.JS v14 Slash and Prefix Commands handler with Events. Check it out now!

New Discord.JS v14 Slash and Prefix Commands handler with Events. Check it out now!

Discord.js v14 Command-Handler Commands, Events, Permissions and Cooldown Handlers for Discord.js v14 bot ~ Made by Lynx Discord.js v14 (dev version)

Dec 19, 2022

a full functional discord bot to send moomoo.io bots

MooMooBot a discord bot which does moomoo.io stuff commands !send server name ex: !send 8:0:0 Nuro !token (generates a token to test if there's n

Jun 1, 2022

A chat logs online saver for discord bots to save messages history & cleared messages online

A chat logs online saver for discord bots to save messages history & cleared messages online

Chat Logs NPM package that saves messages online to view it later Useful for bots where users can save messages history & cleared messages online Supp

Dec 28, 2022

A base for developing Discord.js bots, written in TypeScript.

A base for developing Discord.js bots, written in TypeScript.

Nyx is a Discord bot template written in Typescript, supporting most of Discord.js' features alongside tools useful for bot development. 🇪🇸 README e

Dec 15, 2022

Store data using zero width spaces! Might be useful for discord bots.

Store data using zero width spaces! Might be useful for discord bots.

ZWSP Store data using zero width spaces! Might be useful for discord bots. Installation npm i zwsp Usage Import the library: import { encode, decode}

Dec 12, 2022

OBL is a free, libre and open source botlist for Discord, Revolt, Telegram and Guilded. No nfts,no web3,no daos. only bots lol

OBL (aka OpenBotList) Obl is a free,libre and open source botlist for Discord, Revolt, Telegram and Guilded that has free bananas ( Revolt, Telegram a

Sep 26, 2022

A Full-Featured Modern Dashboard Template for Discord Bots

A Full-Featured Modern Dashboard Template for Discord Bots

D-Dash: Discord Bot Dashboard A Full-Featured Dashboard Template for Discord Bots You can modify config/config.js to edit configuration without touchi

Jan 8, 2023

A Very Good Anti Nuke Bot that is better then those "premium" discord bots.

A Very Good Anti Nuke Bot that is better then those

AntiNuke AntiNuke Bot What is AntiNuke? A Open Source Discord Anti Nuke Bot to stop Raids, Nuking, and Mass Dms. ONLY THE RELEASE VERSION WORKS AT THE

Dec 29, 2022
Owner
Marcus Rodrigues
just a student, seeking the most valuable human treasure... Knowledge
Marcus Rodrigues
A Discord.JS Command Handler to handle commands eaiser

TABLE OF CONTENTS Installation Setup Changing Default Prefix Creating a Command Usage of minArgs and maxArgs Syntax Errors Global Syntax Errors Per Co

AaTherf 3 Jun 8, 2022
DKRCommands is a Discord.js command handler.

DKRCommands is a Discord.js command handler for Discord.js v14 built as a rework of WOKCommands by Worn Off Keys. The goal of this package is to make

Karel Krýda 5 Dec 3, 2022
Using a RPI 3b+ to create a PT camera accessible through Windows browser and controllable through MQTT

web-camera_PT A Web flask server converts the MJPEG stream from RPI to JPG img using opencv, then display in browser. Controls added to move Camera in

null 11 Dec 20, 2022
V14 Slash Command Handler! (ES6 Module Destekli)

V14 Slash Command Handler Proje discord.js v14 üzerine yazılmıştır. Gerekli olan minimum nodejs versiyonu v16.9 Örnek kullanım src/commands/ping.js do

Mehmet 137 Dec 31, 2022
A Discord bot Template made with Discord.JS version 14 includes Prefix, Slash commands and MongoDB handler.

Project Language: Fork/Download for: Project Requirements: Database Available: DiscordJS V14 Bot Template - Introduction: A Discord bot project made w

T.F.A 105 Jan 3, 2023
A Browser extension that not only makes your browsing experience safe but makes it optimized

Sia Sia is a browser extension that not only makes your browsing experience safe but makes it optimized Table of Contents About The Project Built With

Arun Govind M 14 Feb 23, 2022
A JavaScript module that shortens your code, makes life easier, and makes development faster!

Quxt A JavaScript module that shortens your code, makes life easier, and makes development faster! Installation npm install quxt Quick Start Check ind

Qux App 5 May 8, 2022
Journeys is a django based community-focused website that allows users to bookmark URLs (through chrome extension) and share their journeys through timelines.

Journeys is a django based community-focused website that allows users to bookmark URLs (through chrome extension) and share their journeys through timelines. A timeline is a collection of links that share a common topic or a journey of building and learning something new. Users can create timelines, share them publicly, and explore resources.

Students' Web Committee 14 Jun 13, 2022
Million is a lightweight (<1kb) Virtual DOM. It's really fast and makes it easy to create user interfaces.

?? Watch Video ?? Read the docs ?? Join our Discord What is Million? Million is a lightweight (<1kb) Virtual DOM. It's really fast and makes it easy t

Derek Jones 5 Aug 24, 2022
A handler to create embedded pages with buttons for pagination.

➝ Whats that • A handler to create embedded pages with buttons for pagination. ➝ Requirements • ["Handler"] pages.js • [Example command] embed.js ➝ Us

null 8 Oct 30, 2022