Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
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.
- Host: GitHub
- URL: https://github.com/itss0n1c/meinu
- Owner: itss0n1c
- Created: 2021-08-26T20:37:24.000Z (over 3 years ago)
- Default Branch: main
- Last Pushed: 2024-12-30T20:16:12.000Z (about 1 month ago)
- Last Synced: 2024-12-30T20:54:04.777Z (about 1 month ago)
- Topics: bot, commando, discord, discord-js
- Language: TypeScript
- Homepage:
- Size: 4.52 MB
- Stars: 3
- Watchers: 1
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Meinu
### 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
```