0.0.1 • Published 4 years ago

shaved-ice v0.0.1

Weekly downloads
3
License
MIT
Repository
github
Last release
4 years ago

Shaved Ice is an awesome command framework for building bots using the ↗️ Eris library. It simplifies the command loading and handling so you can focus on writing great commands.

Installation

To use Shaved Ice, you can download the NPM package using your favorite package manager:

npm install --save eris shaved-ice
yarn add eris shaved-ice

Example

Using Shaved Ice is super easy too! Here's an example written in TypeScript.

import * as path from 'path';
import { ShavedClient } from 'shaved-ice';

new ShavedClient({
   token: process.env.DISCORD_TOKEN,
   owner: 'OWNER_ID', // or ['owner1', 'owner2', ...]
   prefix: '$',
   commandsDir: path.join(__dirname, 'commands'),
   // You can pass regular ClientOptions
   intents: 13831,
   disableEvents: {
      TYPING_START: true,
      PRESENCE_UPDATE: true
   }
}).serve();
import { Message } from 'eris';
import { Command, ShavedClient } from 'shaved-ice';

export default class PingCommand extends Command {

   constructor(client: ShavedClient) {
      super(client, {
         name: 'ping',
         description: 'Run a connection test to Discord.',
         category: 'Utility'
      });
   }
   
   execute(msg: Message): Promise<Message> {
      return msg.channel.createMessage('🏓 Pong!');
   }

}

License

Shaved Ice is released under the MIT license. You can read the full license in the LICENSE file of this repository.