A Discord bot Template made with Discord.JS version 14 includes Prefix, Slash commands and MongoDB handler.

Overview

Project Language:
javascript

Fork/Download for:

Project Requirements:

Database Available:
Mongodb

DiscordJS V14 Bot Template - Introduction:

A Discord bot project made with the npm package discord.js version 14 and it handles Prefix and Slash commands. You can create many commands as you want to improve your Bot! Project made with by TFAGaming.

How to setup:

• 1- Choose a good IDE to start working on your Bot (Recommended for Hosting 24/7: Replit), and then Download/fork this project.
• 2- Create a new application at Discord Developer Portal and choose your application name.
• 3- Go to Bot section, and then make your application into a Bot.
• 4- After doing this, click on Reset token and then copy your Bot token. (Do not share your bot token!)
• 5- We go now into two categories: Replit users & VSCode (Visual Studio Code) users.
•• If you are using Replit, use Environment Secret Variables. (Located in your left of your screen with a Lock icon). The key is TOKEN and the value is going to be your bot token. And then, click on Add new secret.
•• If you are using VSCode, use config.json file. The value of the variable TOKEN is going to be your bot token. Make sure that you're not streaming or recording a video to public so users will not steal your bot token!
• 6- Go to shell of your IDE and then type npm init -y to setup the package-lock.json file. (The goal of package-lock. json file is to keep track of the exact version of every package that is installed so that a product is 100% reproducible in the same way even if packages are updated by their maintainers.)
• 7- Type in shell npm install or npm i to install all required packages for your project. (If you want a clean install, use: npm ci)
• 8- Go to shell or terminal and type node index.js or node . to start your Bot. (If you are using Replit, Click on the Green button ► Run to start your bot)
• 9- Ready! Enjoy :)

What is MongoDB?

MongoDB is a database program, saves your data into a cluster from a Mongo URI. More info is linked here.

Something doesn't work here...

There are a lot of issues happens with some users. If you tried to search for a solution and didn't found it, you can send me a Friend Request on Discord using this name and tag: T.F.A#7524

Credits are required?

Well, if you are forking this project and then sharing it again is UNACCEPTABLE. But, giving credits in commands such as ?help, ?commands... etc is NOT required and you can give credits in any commands if you want, only REQUIRED in README.md.

Contact me!

YouTube Discord
Comments
  • ID SyntaxError

    ID SyntaxError

    I am not very talented for this but I copied my bot ID from discord and then put it in the config.js file and then this happens: B23C292B-AC86-4E05-A0BA-03DF65267F52 How can I fix this ? (I run the program on replit)

    opened by louloubu08 4
  • MongoDB problem: ReplicaSetNoPrimary

    MongoDB problem: ReplicaSetNoPrimary

    I forked a bot on repl.it and I didn't change anything, but config.js like it was said in guide. I don't understand why there's problem, because I searched it on internet and I've done what others said - I added my IP on whitelist and it's not working. Please, help me.

    image

    opened by Matuzh 4
  • Show only text channels when using options for slash commands

    Show only text channels when using options for slash commands

    I tried using

    channelTypes: ["GUILD_TEXT"],
    

    but that didn't work and I would like to know how to make it so the user can only select text channels in this new versio

    also is it still something like const thingy = interaction.options.getString('blahblahblah'); (found out it is but with numbers its getInteger)

    opened by ghost 3
  • Bot crashes upon any and all DMs

    Bot crashes upon any and all DMs

    events/Guild/messageCreate.js initiates the constant variable 'prefix' before checking to see if the message was sent in a guild text channel. Because there is no guild.id object for direct messages, this crashes the bot.

    opened by Hargers 2
  • how to make add slash command options?

    how to make add slash command options?

    i've tried

    const { SlashCommandBuilder } = require("discord.js");
    
    module.exports = {
        name: "test",
        description: "test",
        type: 1,
        options: [],
        permissions: {
            DEFAULT_MEMBER_PERMISSIONS: "SendMessages"
        },
        run: async (client, interaction, config, db) => {
            const data = new SlashCommandBuilder()
            .setName('echo')
            .setDescription('Replies with your input!')
            .addStringOption(option =>
                option.setName('input')
                    .setDescription('The input to echo back'));
        },
    };
    

    but the input option doesnt show up

    opened by NavaShield 1
  • I wants to use this command from v13

    I wants to use this command from v13

    I hade a bot on v13 but now im using ur handler template and i want to use this command how can i do it

    const { DiscordTogether } = require('discord-together');

    module.exports = { name:'youtubetogether', aliases: ['youtube'], description:'Make Youtube Together', run: async (client, message, args,prefix) => {

    if(!message.member.permissions.has("USE_ACTIVITIES")) return message.channel.send(`You Musst Have USE ACTIVITIES permission.`)
        if(message.member.voice.channel) {
            client.discordTogether.createTogetherCode(message.member.voice.channel.id, 'youtube').then(async invite => {
              return message.channel.send(`Click on the link to start! ${invite.code}`);
            });
          } else {
            if (!message.member.voice.channel) {
                return message.reply('**Please Join Vc At First!**')
            }
          }
    }
    

    }

    and also i wants change

    module.exports = { config: { name: "", description: "", usage: "" },

    to somthing like this

    module.exports = { name:'youtubetogether', aliases: ['youtube'], description:'Make Youtube Together', run: async (client, message, args,prefix) => {

    i main without config things if i cudent wcplain im in ur server BXINO#6217

    opened by BxinoProductions 1
  • How can i add options?

    How can i add options?

    I tried using the old v13 one but that didnt work... heres what i tried doing:

        options: [
        {
          name: "destination",
          description: "channel to send it in",
          type: "CHANNEL",
          channelTypes: ["GUILD_TEXT"],
          required: true,
        },
    ],
    
    opened by ghost 1
  • error in package.json

    error in package.json

    I tried opening a pull request but it wasnt working for me so im opening an issue.

    In line 18 in package.json is missing "," at the end. this can be fixed by changing the line text to ""ms": "^2.1.3","

    opened by AL280 1
  • Cannot Run The Bot in Replit

    Cannot Run The Bot in Replit

    I been receiving the same response I cannot run the bot and for some reason the bot went online while this response:

    Screenshot_20220811-101157

    The Bot is Running but I keep saying this and a moment later it turned off Screenshot_20220811-102337

    opened by sunaxl13 1
  • bit of a problem [off-topic](sort of)

    bit of a problem [off-topic](sort of)

    I'm trying to make it so that when someone joins, it gives them a role but it isnt working here's the src

    const { EmbedBuilder, ModalBuilder, TextInputBuilder, TextInputStyle, ActionRowBuilder } = require("discord.js");
    const client = require("../../index");
    const config = require("../../config.js");
    
    module.exports = {
      name: "WelcomeSystem"
    };
    
    client.on('guildMemberAdd', member => {
        console.log('User: ' + member.user.username + ' has joined the server!');
        member.roles.add("1046263875382808629");
    });
    
    opened by Aurorous 0
Releases(v1.6.0)
  • v1.6.0(Nov 19, 2022)

    This was a pretty long time with no new releases, but here is a new one!

    • Fixed Users.OWNERS error. (Issue #19) • New folder "Installation Guide" for organized installation guides.

    Thank you all for 90+ stars, I hope you all the best. ❤️

    Source code(tar.gz)
    Source code(zip)
  • v1.5.2(Sep 7, 2022)

    - Message commands event has been added.

    I forgot to add this:

     if (interaction.isMessageContextMenuCommand()) { // Message:
        const command = client.message_commands.get(interaction.commandName);
    
        if (!command) return;
    
        try {
          command.run(client, interaction, config, db);
        } catch (e) {
          console.error(e)
        };
      };
    

    Thanks for kanetjuh because they told me the error. :)

    - Modals handler fixed.

    When a modal file has been loaded, it says in the console the file is undefined.

    Source code(tar.gz)
    Source code(zip)
  • v1.5.1(Sep 6, 2022)

    - Modals handler has been added.

    module.exports = {
        id: "", // The Modal ID that you have added into a slash command, user command or message command.
        run: async (client, interaction, config, db) => { // The code after a user has clicked on "Submit" on the modal.
    
        },
    };
    

    - Message commands collection bug has been fixed.

    Source code(tar.gz)
    Source code(zip)
  • v1.5.0(Sep 5, 2022)

    - Add User commands handler with Slash commands handler.

    More info about User commands is located here.

    - All commands directories have been changed into one directory: commands.

    - Slash commands handler renamed into application_commands.js.

    - Better Slash commands handler.

    - Fixed prefix commands handler.

    - Add pretty-ms package into the project.

    - Moderation directory has been removed.

    - Interaction permissions handler has been removed.

    Source code(tar.gz)
    Source code(zip)
  • v1.4.3(Aug 14, 2022)

    Updated the packages.

    • Changed [email protected] to [email protected] in package.json because the project can run the new version. • Added ms package.

    New command category: Moderation.

    • Added a new folder Moderation for some moderation commands, and also added mute.js for the mute command.

    Added client presence.

    • Just to make your bot cool. :)

    Removed "Invalid command, try again?" feature.

    • Removed this feature in the event messageCreate because it is very useless.

    Source code(tar.gz)
    Source code(zip)
  • v1.4.2(Aug 7, 2022)

    Added slash commands collection (Missed to add the collection):

    Just added this in index.js:

    client.slashcmds = new Collection();
    

    Removed "help" feature from prefix commands handler.

    Since this feature makes a lot of bugs for users, I have to remove it and make a command called info.js.

    Source code(tar.gz)
    Source code(zip)
  • v1.4.1(Aug 5, 2022)

    Note: Version v1.4.0 was just a small announcement, no need to use that tag. Just move on to the tag v1.4.1.

    Slash commands handler updated:

    • Client and guild member permissions handler added.

    Better prefix commands handler:

    • Updated the commands. From this:

    module.exports = {
      name: "",
      permissions: [],
      owner: Boolean,
      run: async () => { ...
    

    To this:

    module.exports = {
      config: {
        name: "",
        description: "",
        usage: "",
      },
      permissions: [],
      owner: Boolean,
      run: async () => { ...
    

    • New command usage feature.

    How it works?

    When you type a command like ?ping, it should respond with {websocket ping} ms!. But if the command ends with help (I mean: ?ping help), it should respond with the usage of the command.

    Source code(tar.gz)
    Source code(zip)
  • v1.3.0(Aug 3, 2022)

    New Slash commands handler!

    • Add new handler: slash.js • Add new slash command: ping.js • Add new variable in config.json: GUILD_ID

    How GUILD_ID variable works?

    If you've provided your server ID or other server ID in config.json, your bot will register all the slash commands ONLY in the provided server ID (Also register the slash commands into the Discord App). Else, if you haven't provided your server ID in config.json, the bot will register all slash commands in all the servers that the bot was invited in.

    Source code(tar.gz)
    Source code(zip)
  • v1.2.0(Jul 29, 2022)

  • v1.1.0(Jul 19, 2022)

  • v1.0.1(Jul 19, 2022)

  • v1.0.0(Jul 18, 2022)

Owner
T.F.A
A Discord Bot Developer
T.F.A
A good looking help command made with discord.js with select menus. Works with prefix and slash commands too!

fancy-help-command A good looking help command made with discord.js with select menus. Works with prefix and slash commands too! Dependencies: Select

LunarCodes 11 Dec 12, 2022
A discord bot to track "owo", usually used to help with OwO bot. Made with Discord.js v13 includes Slash commands, Leaderboards, Auto Resets etc.

Discord-OwO-tracker A discord bot to track "owo", usually used to help with OwO bot Requirements Discord.js v13 (npm install discord.js@latest) applic

Astrex 4 Nov 24, 2022
DiscordJs13-handler is the solution for all the discord.js developper who want a complete handler for slash commands

DiscordJs13-handler is the solution for all the discord.js developper who want a complete handler for slash commands

null 9 Jul 2, 2022
Discord.js bot starter template, Slash Commands only (Raymond forced me to make a bot template)

boat-template Raymond forced me to make a bot template This template is meant is just for stupidness ig Getting Started Rename the config.example.ts t

Drxckzyz tha idiot 3 Jan 5, 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.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
Dank Memer (Selfbot) Farm with slash commands support and random delays and breaks to avoid any suspicion

Slashy Slashy is a Dank Memer (Selfbot) Farm with slash commands support and random delays and breaks to avoid any suspicion. This is completely undet

Taha Gorme 16 Dec 30, 2022
CSS3 vendor prefix generator.

cssFx cssFx adds vendor-specific prefixes to your stylesheets. How it works When the document has finished loading, internal (<style>) and external (<

Ivan Malopinsky 275 Jul 30, 2022
OP3: The Open Podcast Prefix Project

op3 OP3: The Open Podcast Prefix Project The Open Podcast Prefix Project (OP3) is a free and open-source podcast prefix analytics service committed to

null 29 Dec 15, 2022
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

Masterious 24 Dec 2, 2022
All terminal commands in one place (you can Contribute to it by putting latest commands and adding Readme)

Terminal-Commands All basic terminal commands in one place Show some ❤ by some repositories You can contribute to this readme If you to contribute wit

Shehzad Iqbal 7 Dec 15, 2022
A developer directory built on Next.js and MongoDB Atlas, deployed on Vercel with the Vercel + MongoDB integration.

MongoDB Starter – Developer Directory A developer directory built on Next.js and MongoDB Atlas, deployed on Vercel with the Vercel + MongoDB integrati

Vercel 246 Dec 20, 2022
Mongo Strict is a TypeScript based smart MongoDB ORM, It makes the usage of MongoDB safer, easier and faster with a better performance...

mongo-strict mongo-strict is compatible with mongo >= 5 Mongo Strict is a TypeScript-based smart MongoDB ORM, It makes the usage of MongoDB safer, eas

Mohamed Kamel 4 Sep 22, 2022
A utility package for making discord-bot commands much easier to write with discord.js.

Cordcommand About A utility package for making discord-bot commands much easier to write with discord.js. Usage Example // initiate discord.js client

NLP practitioners 17 Dec 13, 2022
The best Discord bot with a shit ton of commands w/ a website.

REAPER An Multi-purpose Discord bot with many features! Getting started Creating a fork: 1). Click here to fork the repository 2). Open your terminal

Ryder 2 Oct 6, 2022
🤖 Makes it easy to create bots on discord through a simple command handler

MyBotHelper.JS ?? About facilitates the creation of bots via discord.js, the repository already has a main script that automatically synchronizes and

Marcus Rodrigues 4 Dec 31, 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
The Remix version of the fakebooks app demonstrated on https://remix.run. Check out the CRA version: https://github.com/kentcdodds/fakebooks-cra

Remix Fakebooks App This is a (very) simple implementation of the fakebooks mock app demonstrated on remix.run. There is no database, but there is an

Kent C. Dodds 61 Dec 22, 2022
The frontend of a full stack application of a personal wallet made with React, Node and MongoDB that allows you to add inputs, outputs and see all your extract.

The frontend of a full stack application of a personal wallet made with React, Node and MongoDB that allows you to add inputs, outputs and see all your extract.

Bernardo Rodrigues 5 Jun 2, 2022