twicord.js
v1.0.3
Published
The Easiest Way To Create Modern Discord Bots
Downloads
9
Maintainers
Readme
TwiCord
A Begginer-Friendly Simple Oceanic.JS Wrapper Which Makes It Easy To Create Discord Bots.
Features:
- Slash Commands
- Analog Commands
- Component Handlers
- Command Handler
- Friendly Type Names (InteractionTypes, ApplicationCommandTypes)
- Easy Colors
- Embed Builder
index.js:
import { Client } from "oceanic.js";
import { Twi } from "twicord.js";
const client = new Client({ auth: `Bot ${process.env.token}`, gateway: { intents: [...] } });
const twi = new Twi(client);
twi.cmdhandler("./cmds");
export { twi };
cmds/ping.js:
import { twi } from "../index.js";
twi.slashcmd({
name: "ping",
description: "Pong!",
run: async function(interaction) {
interaction.createMessage({ content: "Pong!" });
}
});
twi.analogcmd({
name: "!ping",
run: function(message) {
//twi.message() = client.rest.channels.createMessage()
twi.message(message.channel.id, { content: "Pong!" });
}
});
NOTE: TwiCord Uses Experimental JSON Modules. Run Your Code With node --no-warnings .
To Stop Getting Experimental Feature Warnings.