This repository has been archived on 2025-11-10. You can view files and clone it. You cannot open issues or pull requests or push a commit.
2021-08-07 16:14:40 +02:00
2021-06-24 16:21:21 +02:00
2021-08-11 17:32:05 +02:00
2021-07-06 21:14:36 +02:00
2021-07-06 21:14:36 +02:00
2021-08-08 16:34:52 +02:00
2021-06-19 18:35:14 +02:00
2021-08-08 20:13:39 +02:00
2021-07-06 21:14:36 +02:00
2021-07-06 21:14:36 +02:00
2021-08-07 16:14:40 +02:00
2021-08-08 01:41:04 +02:00

CommandBot

WARNING! Documentation has not been completed yet!

WARNING! This version uses Discord.js 13 which requires Node.js 16.6.0 or newer

WARNING! This is a very early version of this package. A lot of things may not work as intended and some names, properties or variables might get added or removed without worrying about backwards compatibility previous beta editions. This version is not compatible with CommandBot 2 at all. If you notice any issues please report them in the Issues tab

Example code

const bot = new Bot({
    name: "Command Bot",
    prefix: "!", // for text commands
    token: "BOT_TOKEN",
    applicationId: "APPLICATION_ID",
});

bot.commands.add(new Command(
    name: 'hello',
    description: 'Greets the user',
    parameters: [
        {
            name: 'name',
            type: 'string',
            optional: false
        }
    ],
    function: (p, m) => {
        return `Hello ${p('name')} from ${m.member.toString()}`;
    }
));

bot.on("READY", () => {
    console.log('BOT IS READY!');
});

bot.start(3000, true /*Register slash commands (set to false after registering to avoid daily quota problems)*/);

Discord usage

/hello name:World
or
!hello World

Response:
Hello World from @USER
S
Description
Discord.js framework that helps you create your Discord bot. It includes full command system, automatically generated help command and command permission system.
Readme MIT
1.2 MiB
0 Stars 1 Watchers 0 Forks
2022-01-15 17:46:39 +01:00
Languages
TypeScript 99.8%
Shell 0.2%