meinu
TypeScript icon, indicating that this package has built-in type declarations

6.5.0 • Public • Published

Meinu

Discord server npm version npm downloads

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

Readme

Keywords

none

Package Sidebar

Install

npm i meinu

Weekly Downloads

1

Version

6.5.0

License

MIT

Unpacked Size

61.4 kB

Total Files

14

Last publish

Collaborators

  • s0n1c