16 lines
625 B
TypeScript
16 lines
625 B
TypeScript
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);
|
|
});
|
|
}); |