Create timeout command #302
3 changed files with 950 additions and 940 deletions
|
@ -31,17 +31,17 @@
|
|||
"discord.js": "^14.3.0",
|
||||
"dotenv": "^16.0.0",
|
||||
"emoji-regex": "^9.2.0",
|
||||
"jest": "^27.4.5",
|
||||
"jest-mock-extended": "^3.0.0",
|
||||
"jest": "^29.5.0",
|
||||
"jest-mock-extended": "^3.0.4",
|
||||
"minimatch": "7.4.2",
|
||||
"mysql": "^2.18.1",
|
||||
"random-bunny": "^2.0.5",
|
||||
"ts-jest": "^27.1.2",
|
||||
"ts-jest": "^29.0.5",
|
||||
"typeorm": "^0.2.44",
|
||||
"uuid": "^9.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"@types/node": "^18.0.0",
|
||||
"typescript": "^5.0.0"
|
||||
"typescript": "^5.0.2"
|
||||
}
|
||||
}
|
||||
|
|
16
tests/commands/timeout.test.ts
Normal file
16
tests/commands/timeout.test.ts
Normal file
|
@ -0,0 +1,16 @@
|
|||
import { PermissionsBitField, SlashCommandBuilder } from "discord.js";
|
||||
import Timeout from "../../src/commands/timeout";
|
||||
|
||||
describe('Constructor', () => {
|
||||
test('Expect CommandBuilder to be configured', () => {
|
||||
const command = new Timeout();
|
||||
|
||||
expect(command.CommandBuilder).toBeDefined();
|
||||
|
||||
const commandBuilder = command.CommandBuilder as SlashCommandBuilder;
|
||||
|
||||
expect(commandBuilder.name).toBe("timeout");
|
||||
expect(commandBuilder.description).toBe("Timeouts a user out, sending them a DM with the reason if possible");
|
||||
expect(commandBuilder.options.length).toBe(3);
|
||||
});
|
||||
});
|
Loading…
Reference in a new issue