Add Tests for util.loadCommand if user doesn't have roles or userid
This commit is contained in:
parent
c816f182b2
commit
15b4a168df
4 changed files with 50 additions and 1 deletions
14
tests/commands/testingRoles.js
Normal file
14
tests/commands/testingRoles.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
const { command } = require('../../src');
|
||||
|
||||
class test extends command {
|
||||
constructor() {
|
||||
super("test");
|
||||
super.roles = "Regular";
|
||||
}
|
||||
|
||||
test(context) {
|
||||
context.message.reply(`Testing done by ${context.config.tester}`);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = test;
|
14
tests/commands/testingUsers.js
Normal file
14
tests/commands/testingUsers.js
Normal file
|
@ -0,0 +1,14 @@
|
|||
const { command } = require('../../src');
|
||||
|
||||
class test extends command {
|
||||
constructor() {
|
||||
super("test");
|
||||
super.users = "000000000000000001";
|
||||
}
|
||||
|
||||
test(context) {
|
||||
context.message.reply(`Testing done by ${context.config.tester}`);
|
||||
}
|
||||
}
|
||||
|
||||
module.exports = test;
|
Reference in a new issue