Still got errors and warnings, mostly the same and easy to fix
diff --git a/src/commands/settings/logs/attachment.ts b/src/commands/settings/logs/attachment.ts
index 2dae74e..edd1c61 100644
--- a/src/commands/settings/logs/attachment.ts
+++ b/src/commands/settings/logs/attachment.ts
@@ -1,5 +1,5 @@
-import { LoadingEmbed } from './../../../utils/defaultEmbeds.js';
-import { ChannelType } from 'discord-api-types';
+import { LoadingEmbed } from "./../../../utils/defaultEmbeds.js";
+import { ChannelType } from "discord-api-types";
import Discord, { CommandInteraction, MessageActionRow, MessageButton } from "discord.js";
import EmojiEmbed from "../../../utils/generateEmojiEmbed.js";
import confirmationMessage from "../../../utils/confirmationMessage.js";
@@ -10,76 +10,74 @@
const command = (builder: SlashCommandSubcommandBuilder) =>
builder
- .setName("attachments")
- .setDescription("Where attachments should be logged to (Premium only)")
- .addChannelOption(option => option.setName("channel").setDescription("The channel to log attachments in").addChannelTypes([
- ChannelType.GuildNews, ChannelType.GuildText
- ]).setRequired(false))
+ .setName("attachments")
+ .setDescription("Where attachments should be logged to (Premium only)")
+ .addChannelOption(option => option.setName("channel").setDescription("The channel to log attachments in").addChannelTypes([
+ ChannelType.GuildNews, ChannelType.GuildText
+ ]).setRequired(false));
const callback = async (interaction: CommandInteraction): Promise<any> => {
let m;
m = await interaction.reply({embeds: LoadingEmbed, ephemeral: true, fetchReply: true});
if (interaction.options.getChannel("channel")) {
- let channel
+ let channel;
try {
- channel = interaction.options.getChannel("channel")
+ channel = interaction.options.getChannel("channel");
} catch {
return await interaction.editReply({embeds: [new EmojiEmbed()
.setEmoji("CHANNEL.TEXT.DELETE")
.setTitle("Attachment Log Channel")
.setDescription("The channel you provided is not a valid channel")
.setStatus("Danger")
- ]})
+ ]});
}
- channel = channel as Discord.TextChannel
+ channel = channel as Discord.TextChannel;
if (channel.guild.id !== interaction.guild.id) {
return interaction.editReply({embeds: [new EmojiEmbed()
.setTitle("Attachment Log Channel")
- .setDescription(`You must choose a channel in this server`)
+ .setDescription("You must choose a channel in this server")
.setStatus("Danger")
.setEmoji("CHANNEL.TEXT.DELETE")
]});
}
- let confirmation = await new confirmationMessage(interaction)
+ const confirmation = await new confirmationMessage(interaction)
.setEmoji("CHANNEL.TEXT.EDIT")
.setTitle("Attachment Log Channel")
.setDescription(
- `This will be the channel all attachments will be sent to.\n\n` +
+ "This will be the channel all attachments will be sent to.\n\n" +
`Are you sure you want to set the attachment log channel to <#${channel.id}>?`
)
.setColor("Warning")
.setInverted(true)
- .send(true)
- if (confirmation.cancelled) return
+ .send(true);
+ if (confirmation.cancelled) return;
if (confirmation.success) {
try {
- await client.database.guilds.write(interaction.guild.id, {"logging.attachments.channel": channel.id})
- const { log, NucleusColors, entry, renderUser, renderChannel } = client.logger
- try {
- let data = {
- meta:{
- type: 'attachmentChannelUpdate',
- displayName: 'Attachment Log Channel Updated',
- calculateType: 'nucleusSettingsUpdated',
- color: NucleusColors.yellow,
- emoji: "CHANNEL.TEXT.EDIT",
- timestamp: new Date().getTime()
- },
- list: {
- memberId: entry(interaction.user.id, `\`${interaction.user.id}\``),
- changedBy: entry(interaction.user.id, renderUser(interaction.user)),
- channel: entry(channel.id, renderChannel(channel)),
- },
- hidden: {
- guild: interaction.guild.id
- }
+ await client.database.guilds.write(interaction.guild.id, {"logging.attachments.channel": channel.id});
+ const { log, NucleusColors, entry, renderUser, renderChannel } = client.logger;
+ const data = {
+ meta:{
+ type: "attachmentChannelUpdate",
+ displayName: "Attachment Log Channel Updated",
+ calculateType: "nucleusSettingsUpdated",
+ color: NucleusColors.yellow,
+ emoji: "CHANNEL.TEXT.EDIT",
+ timestamp: new Date().getTime()
+ },
+ list: {
+ memberId: entry(interaction.user.id, `\`${interaction.user.id}\``),
+ changedBy: entry(interaction.user.id, renderUser(interaction.user)),
+ channel: entry(channel.id, renderChannel(channel))
+ },
+ hidden: {
+ guild: interaction.guild.id
}
- log(data);
- } catch {}
+ };
+ log(data);
} catch (e) {
return interaction.editReply({embeds: [new EmojiEmbed()
.setTitle("Attachment Log Channel")
- .setDescription(`Something went wrong and the attachment log channel could not be set`)
+ .setDescription("Something went wrong and the attachment log channel could not be set")
.setStatus("Danger")
.setEmoji("CHANNEL.TEXT.DELETE")
], components: []});
@@ -87,14 +85,14 @@
} else {
return interaction.editReply({embeds: [new EmojiEmbed()
.setTitle("Attachment Log Channel")
- .setDescription(`No changes were made`)
+ .setDescription("No changes were made")
.setStatus("Success")
.setEmoji("CHANNEL.TEXT.CREATE")
], components: []});
}
}
let clicks = 0;
- let data = await client.database.guilds.read(interaction.guild.id);
+ const data = await client.database.guilds.read(interaction.guild.id);
let channel = data.logging.staff.channel;
while (true) {
await interaction.editReply({embeds: [new EmojiEmbed()
@@ -115,17 +113,17 @@
let i;
try {
i = await m.awaitMessageComponent({time: 300000});
- } catch(e) { break }
- i.deferUpdate()
+ } catch(e) { break; }
+ i.deferUpdate();
if (i.component.customId === "clear") {
clicks += 1;
if (clicks === 2) {
clicks = 0;
- await client.database.guilds.write(interaction.guild.id, null, ["logging.announcements.channel"])
+ await client.database.guilds.write(interaction.guild.id, null, ["logging.announcements.channel"]);
channel = undefined;
}
} else {
- break
+ break;
}
}
await interaction.editReply({embeds: [new EmojiEmbed()
@@ -141,13 +139,13 @@
.setStyle("SECONDARY")
.setDisabled(true)
])]});
-}
+};
const check = (interaction: CommandInteraction, defaultCheck: WrappedCheck) => {
- let member = (interaction.member as Discord.GuildMember)
- if (!member.permissions.has("MANAGE_GUILD")) throw "You must have the *Manage Server* permission to use this command"
+ const member = (interaction.member as Discord.GuildMember);
+ if (!member.permissions.has("MANAGE_GUILD")) throw "You must have the *Manage Server* permission to use this command";
return true;
-}
+};
export { command };
export { callback };
diff --git a/src/commands/settings/logs/channel.ts b/src/commands/settings/logs/channel.ts
index 4030108..da0d156 100644
--- a/src/commands/settings/logs/channel.ts
+++ b/src/commands/settings/logs/channel.ts
@@ -1,5 +1,5 @@
-import { LoadingEmbed } from './../../../utils/defaultEmbeds.js';
-import { ChannelType } from 'discord-api-types';
+import { LoadingEmbed } from "./../../../utils/defaultEmbeds.js";
+import { ChannelType } from "discord-api-types";
import Discord, { CommandInteraction, MessageActionRow, MessageButton } from "discord.js";
import EmojiEmbed from "../../../utils/generateEmojiEmbed.js";
import confirmationMessage from "../../../utils/confirmationMessage.js";
@@ -10,74 +10,72 @@
const command = (builder: SlashCommandSubcommandBuilder) =>
builder
- .setName("channel")
- .setDescription("Sets or shows the log channel")
- .addChannelOption(option => option.setName("channel").setDescription("The channel to set the log channel to").addChannelTypes([
- ChannelType.GuildNews, ChannelType.GuildText
- ]))
+ .setName("channel")
+ .setDescription("Sets or shows the log channel")
+ .addChannelOption(option => option.setName("channel").setDescription("The channel to set the log channel to").addChannelTypes([
+ ChannelType.GuildNews, ChannelType.GuildText
+ ]));
const callback = async (interaction: CommandInteraction): Promise<any> => {
let m;
m = await interaction.reply({embeds: LoadingEmbed, ephemeral: true, fetchReply: true});
if (interaction.options.getChannel("channel")) {
- let channel
+ let channel;
try {
- channel = interaction.options.getChannel("channel")
+ channel = interaction.options.getChannel("channel");
} catch {
return await interaction.editReply({embeds: [new EmojiEmbed()
.setEmoji("CHANNEL.TEXT.DELETE")
.setTitle("Log Channel")
.setDescription("The channel you provided is not a valid channel")
.setStatus("Danger")
- ]})
+ ]});
}
- channel = channel as Discord.TextChannel
+ channel = channel as Discord.TextChannel;
if (channel.guild.id !== interaction.guild.id) {
return interaction.editReply({embeds: [new EmojiEmbed()
.setTitle("Log Channel")
- .setDescription(`You must choose a channel in this server`)
+ .setDescription("You must choose a channel in this server")
.setStatus("Danger")
.setEmoji("CHANNEL.TEXT.DELETE")
]});
}
- let confirmation = await new confirmationMessage(interaction)
+ const confirmation = await new confirmationMessage(interaction)
.setEmoji("CHANNEL.TEXT.EDIT")
.setTitle("Log Channel")
.setDescription(`Are you sure you want to set the log channel to <#${channel.id}>?`)
.setColor("Warning")
.setInverted(true)
- .send(true)
- if (confirmation.cancelled) return
+ .send(true);
+ if (confirmation.cancelled) return;
if (confirmation.success) {
try {
- await client.database.guilds.write(interaction.guild.id, {"logging.logs.channel": channel.id})
- const { log, NucleusColors, entry, renderUser, renderChannel } = client.logger
- try {
- let data = {
- meta:{
- type: 'logChannelUpdate',
- displayName: 'Log Channel Changed',
- calculateType: 'nucleusSettingsUpdated',
- color: NucleusColors.yellow,
- emoji: "CHANNEL.TEXT.EDIT",
- timestamp: new Date().getTime()
- },
- list: {
- memberId: entry(interaction.user.id, `\`${interaction.user.id}\``),
- changedBy: entry(interaction.user.id, renderUser(interaction.user)),
- channel: entry(channel.id, renderChannel(channel)),
- },
- hidden: {
- guild: channel.guild.id
- }
+ await client.database.guilds.write(interaction.guild.id, {"logging.logs.channel": channel.id});
+ const { log, NucleusColors, entry, renderUser, renderChannel } = client.logger;
+ const data = {
+ meta:{
+ type: "logChannelUpdate",
+ displayName: "Log Channel Changed",
+ calculateType: "nucleusSettingsUpdated",
+ color: NucleusColors.yellow,
+ emoji: "CHANNEL.TEXT.EDIT",
+ timestamp: new Date().getTime()
+ },
+ list: {
+ memberId: entry(interaction.user.id, `\`${interaction.user.id}\``),
+ changedBy: entry(interaction.user.id, renderUser(interaction.user)),
+ channel: entry(channel.id, renderChannel(channel))
+ },
+ hidden: {
+ guild: channel.guild.id
}
- log(data);
- } catch {}
+ };
+ log(data);
} catch (e) {
- console.log(e)
+ console.log(e);
return interaction.editReply({embeds: [new EmojiEmbed()
.setTitle("Log Channel")
- .setDescription(`Something went wrong and the log channel could not be set`)
+ .setDescription("Something went wrong and the log channel could not be set")
.setStatus("Danger")
.setEmoji("CHANNEL.TEXT.DELETE")
], components: []});
@@ -85,14 +83,14 @@
} else {
return interaction.editReply({embeds: [new EmojiEmbed()
.setTitle("Log Channel")
- .setDescription(`No changes were made`)
+ .setDescription("No changes were made")
.setStatus("Success")
.setEmoji("CHANNEL.TEXT.CREATE")
], components: []});
}
}
let clicks = 0;
- let data = await client.database.guilds.read(interaction.guild.id);
+ const data = await client.database.guilds.read(interaction.guild.id);
let channel = data.logging.logs.channel;
while (true) {
await interaction.editReply({embeds: [new EmojiEmbed()
@@ -110,17 +108,17 @@
let i;
try {
i = await m.awaitMessageComponent({time: 300000});
- } catch(e) { break }
- i.deferUpdate()
+ } catch(e) { break; }
+ i.deferUpdate();
if (i.component.customId === "clear") {
clicks += 1;
if (clicks === 2) {
clicks = 0;
- await client.database.guilds.write(interaction.guild.id, null, ["logging.logs.channel"])
+ await client.database.guilds.write(interaction.guild.id, null, ["logging.logs.channel"]);
channel = undefined;
}
} else {
- break
+ break;
}
}
await interaction.editReply({embeds: [new EmojiEmbed()
@@ -136,13 +134,13 @@
.setStyle("SECONDARY")
.setDisabled(true)
])]});
-}
+};
const check = (interaction: CommandInteraction, defaultCheck: WrappedCheck) => {
- let member = (interaction.member as Discord.GuildMember)
- if (!member.permissions.has("MANAGE_GUILD")) throw "You must have the *Manage Server* permission to use this command"
+ const member = (interaction.member as Discord.GuildMember);
+ if (!member.permissions.has("MANAGE_GUILD")) throw "You must have the *Manage Server* permission to use this command";
return true;
-}
+};
export { command };
export { callback };
diff --git a/src/commands/settings/logs/events.ts b/src/commands/settings/logs/events.ts
index ef303cb..88386c4 100644
--- a/src/commands/settings/logs/events.ts
+++ b/src/commands/settings/logs/events.ts
@@ -1,9 +1,9 @@
-import { LoadingEmbed } from './../../../utils/defaultEmbeds.js';
+import { LoadingEmbed } from "./../../../utils/defaultEmbeds.js";
import Discord, { CommandInteraction, MessageActionRow, MessageButton, MessageSelectMenu } from "discord.js";
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
import { WrappedCheck } from "jshaiku";
import EmojiEmbed from "../../../utils/generateEmojiEmbed.js";
-import client from '../../../utils/client.js';
+import client from "../../../utils/client.js";
import { toHexArray, toHexInteger } from "../../../utils/calculate.js";
@@ -27,20 +27,20 @@
"guildMemberVerify": "Member runs verify",
"autoModeratorDeleted": "Messages auto deleted by Nucleus",
"nucleusSettingsUpdated": "Nucleus' settings updated by a moderator",
- "ticketUpdate": "Tickets created or deleted",
-}
+ "ticketUpdate": "Tickets created or deleted"
+};
const command = (builder: SlashCommandSubcommandBuilder) =>
builder
- .setName("events")
- .setDescription("Sets what events should be logged")
+ .setName("events")
+ .setDescription("Sets what events should be logged");
const callback = async (interaction: CommandInteraction): Promise<any> => {
await interaction.reply({embeds: LoadingEmbed, fetchReply: true, ephemeral: true});
let m;
while (true) {
- let config = await client.database.guilds.read(interaction.guild.id)
- let converted = toHexArray(config.logging.logs.toLog)
+ const config = await client.database.guilds.read(interaction.guild.id);
+ const converted = toHexArray(config.logging.logs.toLog);
m = await interaction.editReply({embeds: [new EmojiEmbed()
.setTitle("Logging Events")
.setDescription("Below are the events being logged in the server. You can toggle them on and off in the dropdown")
@@ -68,25 +68,25 @@
.setStyle("DANGER")
.setCustomId("none")
])
- ]})
+ ]});
let i;
try {
i = await m.awaitMessageComponent({ time: 300000 });
} catch (e) {
- break
+ break;
}
- i.deferUpdate()
+ i.deferUpdate();
if (i.customId === "logs") {
- let selected = i.values;
- let newLogs = toHexInteger(selected.map(e => Object.keys(logs)[parseInt(e)]))
- await client.database.guilds.write(interaction.guild.id, {"logging.logs.toLog": newLogs})
+ const selected = i.values;
+ const newLogs = toHexInteger(selected.map(e => Object.keys(logs)[parseInt(e)]));
+ await client.database.guilds.write(interaction.guild.id, {"logging.logs.toLog": newLogs});
} else if (i.customId === "all") {
- let newLogs = toHexInteger(Object.keys(logs).map(e => e))
- await client.database.guilds.write(interaction.guild.id, {"logging.logs.toLog": newLogs})
+ const newLogs = toHexInteger(Object.keys(logs).map(e => e));
+ await client.database.guilds.write(interaction.guild.id, {"logging.logs.toLog": newLogs});
} else if (i.customId === "none") {
- await client.database.guilds.write(interaction.guild.id, {"logging.logs.toLog": 0})
+ await client.database.guilds.write(interaction.guild.id, {"logging.logs.toLog": 0});
} else {
- break
+ break;
}
}
m = await interaction.editReply({embeds: [new EmojiEmbed()
@@ -95,14 +95,14 @@
.setFooter({text: "Message timed out"})
.setStatus("Success")
.setEmoji("CHANNEL.TEXT.CREATE")
- ]})
-}
+ ]});
+};
const check = (interaction: CommandInteraction, defaultCheck: WrappedCheck) => {
- let member = (interaction.member as Discord.GuildMember)
- if (!member.permissions.has("MANAGE_GUILD")) throw "You must have the *Manage Server* permission to use this command"
+ const member = (interaction.member as Discord.GuildMember);
+ if (!member.permissions.has("MANAGE_GUILD")) throw "You must have the *Manage Server* permission to use this command";
return true;
-}
+};
export { command };
export { callback };
diff --git a/src/commands/settings/logs/staff.ts b/src/commands/settings/logs/staff.ts
index 5867338..2f0c819 100644
--- a/src/commands/settings/logs/staff.ts
+++ b/src/commands/settings/logs/staff.ts
@@ -1,85 +1,85 @@
-import { LoadingEmbed } from './../../../utils/defaultEmbeds.js';
-import { ChannelType } from 'discord-api-types';
+import { LoadingEmbed } from "./../../../utils/defaultEmbeds.js";
+import { ChannelType } from "discord-api-types";
import Discord, { CommandInteraction, MessageActionRow, MessageButton } from "discord.js";
import EmojiEmbed from "../../../utils/generateEmojiEmbed.js";
import confirmationMessage from "../../../utils/confirmationMessage.js";
import getEmojiByName from "../../../utils/getEmojiByName.js";
-import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
-import { WrappedCheck } from "jshaiku";
+import type { SlashCommandSubcommandBuilder } from "@discordjs/builders";
+// eslint-disable-next-line @typescript-eslint/ban-ts-comment
+// @ts-ignore
+import type { WrappedCheck } from "jshaiku";
import client from "../../../utils/client.js";
const command = (builder: SlashCommandSubcommandBuilder) =>
builder
- .setName("staff")
- .setDescription("Settings for the staff notifications channel")
- .addChannelOption(option => option.setName("channel").setDescription("The channel to set the staff notifications channel to").addChannelTypes([
- ChannelType.GuildNews, ChannelType.GuildText
- ]).setRequired(false))
+ .setName("staff")
+ .setDescription("Settings for the staff notifications channel")
+ .addChannelOption(option => option.setName("channel").setDescription("The channel to set the staff notifications channel to").addChannelTypes([
+ ChannelType.GuildNews, ChannelType.GuildText
+ ]).setRequired(false));
-const callback = async (interaction: CommandInteraction): Promise<any> => {
- let m;
- m = await interaction.reply({embeds: LoadingEmbed, ephemeral: true, fetchReply: true});
+const callback = async (interaction: CommandInteraction): Promise<unknown | void> => {
+ if (!interaction.guild) return;
+ const m = await interaction.reply({embeds: LoadingEmbed, ephemeral: true, fetchReply: true}) as Discord.Message<boolean>;
if (interaction.options.getChannel("channel")) {
- let channel
+ let channel;
try {
- channel = interaction.options.getChannel("channel")
+ channel = interaction.options.getChannel("channel");
} catch {
return await interaction.editReply({embeds: [new EmojiEmbed()
.setEmoji("CHANNEL.TEXT.DELETE")
.setTitle("Staff Notifications Channel")
.setDescription("The channel you provided is not a valid channel")
.setStatus("Danger")
- ]})
+ ]});
}
- channel = channel as Discord.TextChannel
+ channel = channel as Discord.TextChannel;
if (channel.guild.id !== interaction.guild.id) {
return interaction.editReply({embeds: [new EmojiEmbed()
.setTitle("Staff Notifications Channel")
- .setDescription(`You must choose a channel in this server`)
+ .setDescription("You must choose a channel in this server")
.setStatus("Danger")
.setEmoji("CHANNEL.TEXT.DELETE")
]});
}
- let confirmation = await new confirmationMessage(interaction)
+ const confirmation = await new confirmationMessage(interaction)
.setEmoji("CHANNEL.TEXT.EDIT")
.setTitle("Staff Notifications Channel")
.setDescription(
- `This will be the channel all notifications, updates, user reports etc. will be sent to.\n\n` +
+ "This will be the channel all notifications, updates, user reports etc. will be sent to.\n\n" +
`Are you sure you want to set the staff notifications channel to <#${channel.id}>?`
)
.setColor("Warning")
.setInverted(true)
- .send(true)
- if (confirmation.cancelled) return
+ .send(true);
+ if (confirmation.cancelled) return;
if (confirmation.success) {
try {
- await client.database.guilds.write(interaction.guild.id, {"logging.staff.channel": channel.id})
- const { log, NucleusColors, entry, renderUser, renderChannel } = client.logger
- try {
- let data = {
- meta:{
- type: 'staffChannelUpdate',
- displayName: 'Staff Notifications Channel Updated',
- calculateType: 'nucleusSettingsUpdated',
- color: NucleusColors.yellow,
- emoji: "CHANNEL.TEXT.EDIT",
- timestamp: new Date().getTime()
- },
- list: {
- memberId: entry(interaction.user.id, `\`${interaction.user.id}\``),
- changedBy: entry(interaction.user.id, renderUser(interaction.user)),
- channel: entry(channel.id, renderChannel(channel)),
- },
- hidden: {
- guild: interaction.guild.id
- }
+ await client.database.guilds.write(interaction.guild.id, {"logging.staff.channel": channel.id});
+ const { log, NucleusColors, entry, renderUser, renderChannel } = client.logger;
+ const data = {
+ meta:{
+ type: "staffChannelUpdate",
+ displayName: "Staff Notifications Channel Updated",
+ calculateType: "nucleusSettingsUpdated",
+ color: NucleusColors.yellow,
+ emoji: "CHANNEL.TEXT.EDIT",
+ timestamp: new Date().getTime()
+ },
+ list: {
+ memberId: entry(interaction.user.id, `\`${interaction.user.id}\``),
+ changedBy: entry(interaction.user.id, renderUser(interaction.user)),
+ channel: entry(channel.id, renderChannel(channel))
+ },
+ hidden: {
+ guild: interaction.guild.id
}
- log(data);
- } catch {}
+ };
+ log(data);
} catch (e) {
return interaction.editReply({embeds: [new EmojiEmbed()
.setTitle("Staff Notifications Channel")
- .setDescription(`Something went wrong and the staff notifications channel could not be set`)
+ .setDescription("Something went wrong and the staff notifications channel could not be set")
.setStatus("Danger")
.setEmoji("CHANNEL.TEXT.DELETE")
], components: []});
@@ -87,14 +87,14 @@
} else {
return interaction.editReply({embeds: [new EmojiEmbed()
.setTitle("Staff Notifications Channel")
- .setDescription(`No changes were made`)
+ .setDescription("No changes were made")
.setStatus("Success")
.setEmoji("CHANNEL.TEXT.CREATE")
], components: []});
}
}
let clicks = 0;
- let data = await client.database.guilds.read(interaction.guild.id);
+ const data = await client.database.guilds.read(interaction.guild.id);
let channel = data.logging.staff.channel;
while (true) {
await interaction.editReply({embeds: [new EmojiEmbed()
@@ -112,17 +112,17 @@
let i;
try {
i = await m.awaitMessageComponent({time: 300000});
- } catch(e) { break }
- i.deferUpdate()
- if (i.component.customId === "clear") {
+ } catch(e) { break; }
+ i.deferUpdate();
+ if ((i.component as MessageButton).customId === "clear") {
clicks += 1;
if (clicks === 2) {
clicks = 0;
- await client.database.guilds.write(interaction.guild.id, null, ["logging.staff.channel"])
+ await client.database.guilds.write(interaction.guild.id, null, ["logging.staff.channel"]);
channel = undefined;
}
} else {
- break
+ break;
}
}
await interaction.editReply({embeds: [new EmojiEmbed()
@@ -138,13 +138,13 @@
.setStyle("SECONDARY")
.setDisabled(true)
])]});
-}
+};
-const check = (interaction: CommandInteraction, defaultCheck: WrappedCheck) => {
- let member = (interaction.member as Discord.GuildMember)
- if (!member.permissions.has("MANAGE_GUILD")) throw "You must have the *Manage Server* permission to use this command"
+const check = (interaction: CommandInteraction, _defaultCheck: WrappedCheck) => {
+ const member = (interaction.member as Discord.GuildMember);
+ if (!member.permissions.has("MANAGE_GUILD")) throw "You must have the *Manage Server* permission to use this command";
return true;
-}
+};
export { command };
export { callback };