More restructuring
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
import type { Message } from "discord.js";
|
import type { Message } from "discord.js";
|
||||||
import type { Command } from "../service";
|
import type { Command } from "../service";
|
||||||
import Chan from "../../../util/chan";
|
import Chan from "../../util/chan";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "chan",
|
name: "chan",
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
import type { Message } from "discord.js";
|
import type { Message } from "discord.js";
|
||||||
import type { Command } from "../service";
|
import type { Command } from "../service";
|
||||||
import Chan from "../../../util/chan";
|
import Chan from "../../util/chan";
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
name: "comfy",
|
name: "comfy",
|
||||||
+2
-2
@@ -1,6 +1,6 @@
|
|||||||
import { Client, Events, GatewayIntentBits } from 'discord.js';
|
import { Client, Events, GatewayIntentBits } from 'discord.js';
|
||||||
import { CommandService } from './services/cmd/service';
|
import { CommandService } from './cmd/service';
|
||||||
import RoleService from './services/role/service';
|
import RoleService from './services/role';
|
||||||
|
|
||||||
const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMembers, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent] });
|
const client = new Client({ intents: [GatewayIntentBits.Guilds, GatewayIntentBits.GuildMembers, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent] });
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,7 @@ export default class RoleService {
|
|||||||
validate(guilds: Collection<string, Guild>): void {
|
validate(guilds: Collection<string, Guild>): void {
|
||||||
guilds.forEach(guild => {
|
guilds.forEach(guild => {
|
||||||
const missing = Object.values(RoleService.ROLES).filter(role => !this.getRoleByName(guild, role.name));
|
const missing = Object.values(RoleService.ROLES).filter(role => !this.getRoleByName(guild, role.name));
|
||||||
if (missing.length) console.error(`${guild.name} is missing roles: ${missing.join(",")}`);
|
if (missing.length) console.error(`${guild.name} is missing roles: ${missing.map(r => r.name).join(", ")}`);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
Reference in New Issue
Block a user