Finish roleinit command
This commit is contained in:
@@ -1,10 +1,15 @@
|
||||
import type { Message } from "discord.js";
|
||||
import type { Command } from "../../models";
|
||||
import RoleService from "../../services/role";
|
||||
|
||||
export default {
|
||||
name: "roleinit",
|
||||
description: "Creates all of the required roles, if they do not exist yet.",
|
||||
usage: ".roleinit",
|
||||
execute: async (message: Message) => {
|
||||
if (!message.guild) return;
|
||||
const reply = await message.reply("Initializing roles...");
|
||||
await RoleService.createRolesIfNotExist(message.guild, Object.values(RoleService.ROLES));
|
||||
await reply.edit("Finished initializing roles.");
|
||||
}
|
||||
} satisfies Command;
|
||||
|
||||
Reference in New Issue
Block a user