Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/matcool/coxinha
yumm coxinha 😋
https://github.com/matcool/coxinha
discord discord-bot-framework discord-js discordjs discordjs-framework
Last synced: about 1 month ago
JSON representation
yumm coxinha 😋
- Host: GitHub
- URL: https://github.com/matcool/coxinha
- Owner: matcool
- License: mit
- Created: 2019-09-30T16:46:43.000Z (about 5 years ago)
- Default Branch: master
- Last Pushed: 2024-06-18T05:22:46.000Z (5 months ago)
- Last Synced: 2024-09-20T04:18:49.741Z (about 2 months ago)
- Topics: discord, discord-bot-framework, discord-js, discordjs, discordjs-framework
- Language: TypeScript
- Homepage:
- Size: 70.3 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE.md
Awesome Lists containing this project
README
# Coxinha
Basic command system for discord.js written in typescriptSample bot in examples/
# Example
```js
const { Bot, Command, Argument } = require('coxinha');// ! is the prefix
const bot = new Bot('!');bot.on('ready', () => {
console.log(`Logged in as ${bot.user.tag}!`);
});bot.addCommand(new Command({
name: 'ping',
aliases: ['pong'],
help: 'Sends "Pong!"',
async func(ctx) {
await ctx.send('Pong!');
}
}));bot.addCommand(new Command({
name: 'say',
help: 'Sends given message',
args: [
// Combined means it'll be multiple words
new Argument('message', {combined: true})
],
async func(ctx, msg) {
await ctx.send(msg);
}
}));bot.login('token');
```