meinu
v6.8.0
Published
A discord.js wrapper, with a focus on slash commands.
Downloads
100
Readme
Meinu
A discord.js wrapper, with a focus on slash commands.
Installation
% bun add meinu
Usage
import { Meinu, Command } from 'meinu';
let commands = [
new Command<Meinu>({
name: 'ping',
description: 'Pong!',
dmPermission: true, // default: false
ownersOnly: true, // default: false
nsfw: true, // default: false
global: true, // default: false
}).addHandler('chatInput', async (bot, int) => {
const sent = await int.deferReply({
fetchReply: true
});
const diff = sent.createdTimestamp - int.createdTimestamp;
return int.editReply({
content: `🏓 Pong! ${diff}ms`
});
})
];
new Meinu({
name: 'MyBot',
color: 'LuminousVividPink',
})
.register_commands(commands) // registers commands per guild, Command.global for global commands
.init(); // starts the bot, .init(TOKEN) if process.env.TOKEN is not set