Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/itss0n1c/meinu

A discord.js wrapper, with a focus on slash commands.
https://github.com/itss0n1c/meinu

bot commando discord discord-js

Last synced: about 1 month ago
JSON representation

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

Awesome Lists containing this project

README

        

# Meinu

Discord server
npm version
npm downloads

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

## Installation

```zsh
% bun add meinu
```

## Usage

```ts
import { Meinu, Command } from 'meinu';

let commands = [
new Command({
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
```