Coder Social home page Coder Social logo

discordjs / commando-guide Goto Github PK

View Code? Open in Web Editor NEW
52.0 16.0 15.0 48 KB

Beginner's guide for discord.js-commando.

Home Page: https://www.gitbook.com/book/dragonfire535/discord-js-commando-beginners-guide/details

commando discord tutorial discord-js discord-api discord-bot

commando-guide's Introduction

Discord.js Commando Beginner's Guide

So I noticed there are very few resources to begin using the Commando command framework for Discord.js. Sure, there are a few tutorials out there, but they don't teach fundamental things such as args or how to properly use Commando's built-in say, embed, etc. That's what this guide is for. In this guide I will attempt to explain everything in commando from using args to when to use async for your commands. It's the least I can do for the people at Discord.js who helped me greatly on learning how to use it.

Before You Begin

Before you start with this guide I recommend you take a look at the official Discord.js guide. It'll teach you the fundamentals for Discord.js, which you can use to aid you in understanding this guide. Please note that I'm going to assume you have read that guide before this one. You can find that guide here.

More Information

Should you need more help after using this guide be sure to the Discord.js Official Server, where a Commando channel is available for all your questions. You can join that server with this link.

Updating of this Guide

I will create a new chapter every once in a while until I deem this tutorial complete. Should anything else come up that you think I should explain, feel free to ask for it to be implemented.

commando-guide's People

Contributors

devnoiseconsulting avatar dragonfire535 avatar gitbook-bot 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

Watchers

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

commando-guide's Issues

SQLite Provider section does not work. I get a promise rejection

(node:8470) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 1): Error: SQLITE_CANTOPEN: unable to open database file

Here is the code I have:

const sqlite = require('sqlite');
const { CommandoClient, SQLiteProvider } = require('discord.js-commando');
const path = require('path');
const bot = new CommandoClient({
  commandPrefix: config.prefix,
  owner: config.owner,
  unknownCommandResponse: false,
});

// SQL Priver
sqlite.open(path.join(__dirname, 'settings.sqlite3')).then((db) => {
  bot.setProvider(new SQLiteProvider(db));
});

Roles instead of hasPermissions?

Has permissions (in my opinion), is kind of bad. While this isn't an issue, and more of a question... can you check for a role instead of a permission? Because there are certain times you want users to have certain roles, and absolutely no permissions for the server itself. So you either have to try to figure out which permission to give one role and higher. And that is just inefficient, I think.

[suggestion] more "real life" examples

Hey dude,

I've just read your guide. Really cool, thanks for sharing your knowledge.

I'm opening this issue to say that your Xiao bot is a freaking awesome Commando learning resource. I dare to say that it's a must-check after finishing the guide.

IMHO the Xiao's repo should be mentioned somewhere in the guide.

Cheers!

User Permissions

I done this:

userPermissions: ['MANAGE_MESSAGES'],

Why it doesn't check for Permissions?

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.