easydiscord

1.0.11 • Public • Published

AhkFramework

A framework to create discord robots easily, with commands and events.

Install

npm install easydiscord

Usage

import { Bot, Config, Login, Event, Command } from '../src/'

const prefix = "$"

@Config({
  version: "1.0",
  prefix,
  username: "name",
  icon_path: "link",
  presence: { name: prefix + "help" }
})
class Ahk extends Bot {

  @Login('token')
  login ({ id }) {
    console.log("Connected")
  }

  @Event('ready')
  ready (client) {
    console.log('I\'m ready !')
  }

  @Command(/^help$/, {
    description: "",
    permissions: {
      user: ['ADMINISTRATOR'],
      client: []
    }
  })
  helpCommand (command, channel, args) {
    message.reply('Hi')
  }

}

new Ahk()

For more informations about "permissions" see HERE Source code on github : HERE

License

MIT

Package Sidebar

Install

npm i easydiscord

Weekly Downloads

11

Version

1.0.11

License

MIT

Unpacked Size

8.66 kB

Total Files

10

Last publish

Collaborators

  • ahkrin