[go: up one dir, main page]

Skip to content
This repository has been archived by the owner on Dec 21, 2022. It is now read-only.
/ AkumaKodo Public archive

A blazing fast discord bot framework built on top of discordeno and typescript!

License

Notifications You must be signed in to change notification settings

AkumaKodo/AkumaKodo

Repository files navigation

AkumaKodo

A blazing fast discord bot framework built on top of discordeno and typescript!

Installation

Click me

Example bot

import { AkumaKodoBotCore } from "https://deno.land/x/akumakodo@0.1.6/mod.ts";
import { config as dotEnvConfig } from "https://deno.land/x/dotenv@v3.1.0/mod.ts";

const env = dotEnvConfig({ export: true });
const TOKEN = env.DISCORD_BOT_TOKEN || "";

// Bot configuration
const Bot = new AkumaKodoBotCore(
    {
        botId: BigInt("your-bot-id"),
        events: {},
        intents: ["Guilds", "GuildMessages", "GuildMembers"],
        token: TOKEN,
    },
    {
        optional: {
            // False by default but we recommend using the built
            // in logging system until your app hits production.
            bot_debug_mode: true,
            // Enables the built in events in the framework
            bot_internal_events: {
                // Allows the bot to reply to slash commands
                interactionCreate: true,
            },
        },
        required: {
            // needed if you wish to use test slash commands.
            bot_development_server_id: BigInt("your-guild-id"),
        },
    },
);

// Our own custom event handler
Bot.client.events.ready = (_, payload) => {
    Bot.container.logger.log("info", "ready", "Online and ready to work!");
};

// Creates a command
Bot.container.utils.createCommand(Bot, {
    trigger: "ping",
    description: "ping pong",
    scope: "Development",
    run: async (interaction) => {
        await Bot.container.utils.createCommandReply(
            Bot,
            interaction,
            {
                embeds: [
                    Bot.container.utils.embed().setColor("random")
                        .setDescription("pong!"),
                ],
            },
            false,
        );
    },
});

// Creates ws connection and starts listening
await Bot.createBot();

Read the documentation here!

Change Log

The current can be found here

Join my discord @link for support and feedback!