Reformat with prettier
diff --git a/src/actions/tickets/delete.ts b/src/actions/tickets/delete.ts
index 7e52458..769bc32 100644
--- a/src/actions/tickets/delete.ts
+++ b/src/actions/tickets/delete.ts
@@ -179,7 +179,7 @@
} catch (e) {
console.error(e);
}
- };
+ }
} else {
// For threads, the name is the users name, id, then the word Active
const channel = tickets as Discord.TextChannel;
@@ -191,7 +191,7 @@
} catch (e) {
console.error(e);
}
- };
+ }
}
if (!deleted) return;
const { log, NucleusColors, entry, renderUser, renderDelta } = client.logger;
diff --git a/src/events/guildMemberUpdate.ts b/src/events/guildMemberUpdate.ts
index 05b70b7..537a483 100644
--- a/src/events/guildMemberUpdate.ts
+++ b/src/events/guildMemberUpdate.ts
@@ -164,11 +164,15 @@
}
};
await log(data);
- await client.database.eventScheduler.schedule("naturalUnmute", after.communicationDisabledUntil?.toISOString()!, {
- guild: after.guild.id,
- user: after.id,
- expires: after.communicationDisabledUntilTimestamp
- });
+ await client.database.eventScheduler.schedule(
+ "naturalUnmute",
+ after.communicationDisabledUntil?.toISOString()!,
+ {
+ guild: after.guild.id,
+ user: after.id,
+ expires: after.communicationDisabledUntilTimestamp
+ }
+ );
}
if (
after.communicationDisabledUntil === null &&
diff --git a/src/reflex/statsChannelUpdate.ts b/src/reflex/statsChannelUpdate.ts
index f2650a8..1b9379b 100644
--- a/src/reflex/statsChannelUpdate.ts
+++ b/src/reflex/statsChannelUpdate.ts
@@ -12,34 +12,43 @@
export async function callback(user: User, guild: Guild) {
guild = await client.guilds.fetch(guild.id);
const config = await client.database.guilds.read(guild.id);
- Object.entries(config.stats).forEach(([channel, props]) => void (async () => {
- if ((props as PropSchema).enabled) {
- let string = (props as PropSchema).name;
- if (!string) return;
- string = await convertCurlyBracketString(string, user!.id, user!.username, guild!.name, guild!.members);
- let fetchedChannel;
- try {
- fetchedChannel = await guild.channels.fetch(channel);
- } catch (e) {
- fetchedChannel = null;
- }
- if (!fetchedChannel) {
- const deleted = config.stats[channel];
- await client.database.guilds.write(guild.id, null, `stats.${channel}`);
- return singleNotify(
- "statsChannelDeleted",
- guild.id,
- `One or more of your stats channels have been deleted. You can use ${getCommandMentionByName(
- "settings/stats"
- )}.\n` + `The channels name was: ${deleted!.name}`,
- "Critical"
- );
- }
- try {
- await fetchedChannel.setName(string.slice(0, 100));
- } catch (e) {
- console.error(e);
- }
- }
- })());
+ Object.entries(config.stats).forEach(
+ ([channel, props]) =>
+ void (async () => {
+ if ((props as PropSchema).enabled) {
+ let string = (props as PropSchema).name;
+ if (!string) return;
+ string = await convertCurlyBracketString(
+ string,
+ user!.id,
+ user!.username,
+ guild!.name,
+ guild!.members
+ );
+ let fetchedChannel;
+ try {
+ fetchedChannel = await guild.channels.fetch(channel);
+ } catch (e) {
+ fetchedChannel = null;
+ }
+ if (!fetchedChannel) {
+ const deleted = config.stats[channel];
+ await client.database.guilds.write(guild.id, null, `stats.${channel}`);
+ return singleNotify(
+ "statsChannelDeleted",
+ guild.id,
+ `One or more of your stats channels have been deleted. You can use ${getCommandMentionByName(
+ "settings/stats"
+ )}.\n` + `The channels name was: ${deleted!.name}`,
+ "Critical"
+ );
+ }
+ try {
+ await fetchedChannel.setName(string.slice(0, 100));
+ } catch (e) {
+ console.error(e);
+ }
+ }
+ })()
+ );
}
diff --git a/src/utils/commandRegistration/register.ts b/src/utils/commandRegistration/register.ts
index 22c2fbd..d76617c 100644
--- a/src/utils/commandRegistration/register.ts
+++ b/src/utils/commandRegistration/register.ts
@@ -181,11 +181,19 @@
client.on("interactionCreate", async (interaction: Interaction) => {
if (interaction.isUserContextMenuCommand()) {
const commandName = "contextCommands/user/" + interaction.commandName;
- await execute(client.commands[commandName]![0]?.check, client.commands[commandName]![0]?.callback, interaction);
+ await execute(
+ client.commands[commandName]![0]?.check,
+ client.commands[commandName]![0]?.callback,
+ interaction
+ );
return;
} else if (interaction.isMessageContextMenuCommand()) {
const commandName = "contextCommands/message/" + interaction.commandName;
- await execute(client.commands[commandName]![0]?.check, client.commands[commandName]![0]?.callback, interaction);
+ await execute(
+ client.commands[commandName]![0]?.check,
+ client.commands[commandName]![0]?.callback,
+ interaction
+ );
return;
} else if (interaction.isAutocomplete()) {
const commandName = interaction.commandName;