e.x.
{
name: 'help',
aliases: ['h', 'help!'],
permissions: ['SEND_MESSAGES'],
}
If the bot lacks a permission, an InvalidPermission error will be threw. Users will be able to catch these errors and check:
try {
...
} catch(err) {
if (err instanceof InvalidPermission) {
...
}
}