Code Monkey home page Code Monkey logo

structure-discord-bot's Introduction

Structure-Discord-Bot

Discord.js command, slash command & event handler by Melio.
If you like the project, feel free to put a โญ for better referencing ; If you need help, join the server support.

MIT License CodeFactor Version discord.js Stars Support server

Features

  • ๐Ÿš€ Ready to code Discord bot
  • ๐Ÿ”จ Files and commands structure
  • ๐Ÿ“‚ Classic and slash commands handler
  • ๐Ÿ• The commands handlers contain permissions and cooldown checker
  • ๐Ÿ“‹ A slash commands registration file
  • ๐ŸŽˆ Event handler including error handler

Starting the project

Configuration

The configuration file named config.js have to content yout bot's token and prefix, and the IDs of all other owners (or just yours).

module.exports = {
    token: 'THE_BOT_TOKEN',
    botID: 'THE_BOT_ID',
    prefix: 'THE_BOT_PREFIX',
    owner: [ "YOUR_DISCORD_ID" ],
};  

Installation

$ npm install

Register slash commands

$ npm run slash

Start the bot

$ npm run start

More

For any errors found, please contact me here or do a pull request.
This repository is licensed under the MIT License. See the LICENSE file (here) for more information.

structure-discord-bot's People

Contributors

antoinemcx avatar roogue avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

structure-discord-bot's Issues

Slash.js

Hello, this is strange to me so when i first clone the bot and use the slash it works perfectly fine but after a few time of it working it comes up with this and im not to sure why.

TypeError: Do not know how to serialize a BigInt
    at JSON.stringify (<anonymous>)
    at _REST.resolveRequest (D:\discord-Bots-WIP\Structure-Discord-Bot\node_modules\@discordjs\rest\dist\index.js:1393:26)
    at _REST.queueRequest (D:\discord-Bots-WIP\Structure-Discord-Bot\node_modules\@discordjs\rest\dist\index.js:1312:46)
    at _REST.request (D:\discord-Bots-WIP\Structure-Discord-Bot\node_modules\@discordjs\rest\dist\index.js:1278:33)
    at _REST.put (D:\discord-Bots-WIP\Structure-Discord-Bot\node_modules\@discordjs\rest\dist\index.js:1261:17)
    at D:\discord-Bots-WIP\Structure-Discord-Bot\slash.js:20:14
    at Object.<anonymous> (D:\discord-Bots-WIP\Structure-Discord-Bot\slash.js:32:3)
    at Module._compile (node:internal/modules/cjs/loader:1254:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1308:10)
    at Module.load (node:internal/modules/cjs/loader:1117:32)```

slash.js not loading...

PS C:\Users\iiMu7aMMaD\Desktop\master> node slash.js
[Discord API] Started refreshing application (/) commands.
w[20001]: Bots cannot use this endpoint
at Z.runRequest (C:\Users\iiMu7aMMaD\Desktop\master\node_modules@discordjs\rest\dist\index.js:7:581)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async Z.queueRequest (C:\Users\iiMu7aMMaD\Desktop\master\node_modules@discordjs\rest\dist\index.js:5:2989)
at async C:\Users\iiMu7aMMaD\Desktop\master\slash.js:20:3 {
rawError: { message: 'Bots cannot use this endpoint', code: 20001 },
code: 20001,
status: 403,
method: 'put',
url: 'https://discord.com/api/v9/applications//commands',
requestBody: { attachments: undefined, json: [ [Object] ] }
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.