nixnest / scepter

Spiritual successor to Nixbot
https://discord.gg/g3gD5xd
MIT License
6 stars 5 forks source link

revamped permissions + coin flip module #60

Closed known-as-dan closed 4 years ago

known-as-dan commented 4 years ago

Re-forked and re-made pull request to be fully consistent with the branches, sorry for any trouble this might cause...

Permission Revamp

Implemented a permission system that allows you to specify which permissions your command requires of the user, in-order to execute.

Old "Command" structure:

type Command = {
  name: string,
  description: string,
  ...
  permissionLevel?: number,
  ...
}

New structure:

type Command = {
  name: string,
  description: string,
  ...
  permissions?: PermissionResolvable[],
  ...
}

Usage example: permissions: ['MANAGE_NICKNAMES', 'MANAGE_ROLES' ... ]

Coin Flip Module

Added coin flip module.

Usage: s.flip

Output example: @User#0000, Tails!