0.3.0 • Published 5 years ago

@mumbot/events v0.3.0

Weekly downloads
-
License
MIT
Repository
-
Last release
5 years ago

@mumbot/core

@mumbot/framework

Open sourced framework for @Mumbot, the Discord bot with a personality.

Install

# @mumbot/events already comes with @mumbot/core
npm i --save @mumbot/core
# or individually
npm i --save @mumbot/events

Usage with @mumbot/core

import createBot from '@mumbot/core';
import {createEvent} from '@mumbot/events';

createBot({
  token: 'MY.SECRET.TOKEN',
  events: [
    createEvent<'ready'>(
      'ready',
      () => {
        console.log('I am Ready!');
      }
    )
  ]
})

Usage without @mumbot/core

import {Client} from 'discord.js'
import bootstrapEvents, {createEvent} from '@mumbot/events';

const client = new Client();

bootstrapEvents(client, {
  token: null,
  events: [
    createEvent<'ready'>(
      'ready',
      () => {
        console.log('I am Ready!');
      }
    )
  ]
})

client.login('MY.SECRET.TOKEN');
0.3.0

5 years ago

0.2.1

5 years ago

0.2.0

5 years ago

0.2.3

5 years ago

0.1.4

5 years ago

0.2.2

5 years ago

0.1.5

5 years ago

0.1.3

5 years ago

0.1.2

5 years ago

0.1.1

5 years ago

0.1.0

5 years ago

0.0.5

5 years ago

0.0.4

5 years ago

0.0.3

5 years ago

0.0.2

5 years ago

0.0.1

5 years ago