git clone git@github.com:hackerspacemmu/hackerspace-bot.git
$ cp .env.example .env
.env
file and replace the token gotten from the discord bot section.$ npm run start
To create a new command of command_name
$ ./program.sh <command_name>
.env
file:
ADMIN_ROLE_ID=<Admin's role ID>
MEMBER_ROLE_ID=<Member's role ID>
Settings > Roles
by right-clicking them. (Need to enable Developer Mode under User Settings > Appearance
)import { role } from '../config.js'
to the top of your command file.permission: []
property to the command object.Example:
// This will allow users with admin or member role to access this command
permission: [role.admin, role.member]