Skip to content

itss0n1c/Meinu

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

56 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A discord.js wrapper, with a focus on slash commands.

Topics

Resources

Stars

Watchers

Forks