Reformat using prettier
diff --git a/src/reflex/guide.ts b/src/reflex/guide.ts
index a3027e4..1901d34 100644
--- a/src/reflex/guide.ts
+++ b/src/reflex/guide.ts
@@ -1,4 +1,4 @@
-import { getCommandMentionByName } from './../utils/getCommandDataByName.js';
+import { getCommandMentionByName } from "./../utils/getCommandDataByName.js";
import { LoadingEmbed } from "../utils/defaults.js";
import Discord, {
ActionRowBuilder,
@@ -19,19 +19,19 @@
export default async (guild: Guild, interaction?: CommandInteraction) => {
let c: GuildTextBasedChannel | null = guild.publicUpdatesChannel ? guild.publicUpdatesChannel : guild.systemChannel;
c = c
- ? c
- : (guild.channels.cache.find(
- (ch) =>
- [
- ChannelType.GuildText,
- ChannelType.GuildAnnouncement,
- ChannelType.PublicThread,
- ChannelType.PrivateThread,
- ChannelType.AnnouncementThread
- ].includes(ch.type) &&
- ch.permissionsFor(guild.roles.everyone).has("SendMessages") &&
- ch.permissionsFor(guild.members.me!).has("EmbedLinks")
- ) as GuildTextBasedChannel | undefined) ?? null;
+ ? c
+ : (guild.channels.cache.find(
+ (ch) =>
+ [
+ ChannelType.GuildText,
+ ChannelType.GuildAnnouncement,
+ ChannelType.PublicThread,
+ ChannelType.PrivateThread,
+ ChannelType.AnnouncementThread
+ ].includes(ch.type) &&
+ ch.permissionsFor(guild.roles.everyone).has("SendMessages") &&
+ ch.permissionsFor(guild.members.me!).has("EmbedLinks")
+ ) as GuildTextBasedChannel | undefined) ?? null;
if (interaction) c = interaction.channel as GuildTextBasedChannel;
if (!c) {
return;
@@ -71,12 +71,22 @@
"Nucleus can log server events and keep you informed with what content is being posted to your server.\n" +
"We have 2 different types of logs, which each can be configured to send to a channel of your choice:\n" +
"**General:** These are events like kicks and channel changes etc.\n" +
- `> These are standard logs and can be set with ${getCommandMentionByName("settings/logs/general")}\n` +
+ `> These are standard logs and can be set with ${getCommandMentionByName(
+ "settings/logs/general"
+ )}\n` +
"**Warnings:** Warnings like NSFW avatars and spam etc. that may require action by a server staff member.\n" +
- `> These may require special action by a moderator. You can set the channel with ${getCommandMentionByName("settings/logs/warnings")}\n` +
+ `> These may require special action by a moderator. You can set the channel with ${getCommandMentionByName(
+ "settings/logs/warnings"
+ )}\n` +
"**Attachments:** All images sent in the server - Used to keep a record of deleted images\n" +
- `> Sent to a separate log channel to avoid spam. This can be set with ${getCommandMentionByName("settings/logs/attachments")}\n` +
- `> ${getEmojiByName("NUCLEUS.PREMIUM")} Please note this feature is only available with ${getCommandMentionByName("nucleus/premium")}`
+ `> Sent to a separate log channel to avoid spam. This can be set with ${getCommandMentionByName(
+ "settings/logs/attachments"
+ )}\n` +
+ `> ${getEmojiByName(
+ "NUCLEUS.PREMIUM"
+ )} Please note this feature is only available with ${getCommandMentionByName(
+ "nucleus/premium"
+ )}`
)
.setEmoji("ICONS.LOGGING")
.setStatus("Danger")
@@ -90,15 +100,33 @@
.setTitle("Moderation")
.setDescription(
"Nucleus has a number of commands that can be used to moderate your server.\n" +
- `These commands are all found under ${getCommandMentionByName(("mod"))}, and they include:\n` +
- `${getEmojiByName("PUNISH.WARN.YELLOW")} ${getCommandMentionByName("mod/warn")}: The user is warned (via DM) that they violated server rules. More options given if DMs are disabled.\n` +
- `${getEmojiByName("PUNISH.CLEARHISTORY")} ${getCommandMentionByName("mod/purge")}: Deletes messages in a channel, giving options to only delete messages by a certain user.\n` +
- `${getEmojiByName("PUNISH.MUTE.YELLOW")} ${getCommandMentionByName("mod/mute")}: Stops users sending messages or joining voice chats.\n` +
- `${getEmojiByName("PUNISH.MUTE.GREEN")} ${getCommandMentionByName("mod/unmute")}: Allows user to send messages and join voice chats.\n` +
- `${getEmojiByName("PUNISH.KICK.RED")} ${getCommandMentionByName("mod/kick")}: Removes a member from the server. They will be able to rejoin.\n` +
- `${getEmojiByName("PUNISH.SOFTBAN")} ${getCommandMentionByName("mod/softban")}: Kicks the user, deleting their messages from every channel in a given time frame.\n` +
- `${getEmojiByName("PUNISH.BAN.RED")} ${getCommandMentionByName("mod/ban")}: Removes the user from the server, deleting messages from every channel and stops them from rejoining.\n` +
- `${getEmojiByName("PUNISH.BAN.GREEN")} ${getCommandMentionByName("mod/unban")}: Allows a member to rejoin the server after being banned.`
+ `These commands are all found under ${getCommandMentionByName(
+ "mod"
+ )}, and they include:\n` +
+ `${getEmojiByName("PUNISH.WARN.YELLOW")} ${getCommandMentionByName(
+ "mod/warn"
+ )}: The user is warned (via DM) that they violated server rules. More options given if DMs are disabled.\n` +
+ `${getEmojiByName("PUNISH.CLEARHISTORY")} ${getCommandMentionByName(
+ "mod/purge"
+ )}: Deletes messages in a channel, giving options to only delete messages by a certain user.\n` +
+ `${getEmojiByName("PUNISH.MUTE.YELLOW")} ${getCommandMentionByName(
+ "mod/mute"
+ )}: Stops users sending messages or joining voice chats.\n` +
+ `${getEmojiByName("PUNISH.MUTE.GREEN")} ${getCommandMentionByName(
+ "mod/unmute"
+ )}: Allows user to send messages and join voice chats.\n` +
+ `${getEmojiByName("PUNISH.KICK.RED")} ${getCommandMentionByName(
+ "mod/kick"
+ )}: Removes a member from the server. They will be able to rejoin.\n` +
+ `${getEmojiByName("PUNISH.SOFTBAN")} ${getCommandMentionByName(
+ "mod/softban"
+ )}: Kicks the user, deleting their messages from every channel in a given time frame.\n` +
+ `${getEmojiByName("PUNISH.BAN.RED")} ${getCommandMentionByName(
+ "mod/ban"
+ )}: Removes the user from the server, deleting messages from every channel and stops them from rejoining.\n` +
+ `${getEmojiByName("PUNISH.BAN.GREEN")} ${getCommandMentionByName(
+ "mod/unban"
+ )}: Allows a member to rejoin the server after being banned.`
)
.setEmoji("PUNISH.BAN.RED")
.setStatus("Danger")
@@ -112,7 +140,9 @@
.setTitle("Verify")
.setDescription(
"Nucleus has a verification system that allows users to prove they aren't bots.\n" +
- `This is done by running ${getCommandMentionByName("verify")} which sends a message only the user can see, giving them a link to a website to verify.\n` +
+ `This is done by running ${getCommandMentionByName(
+ "verify"
+ )} which sends a message only the user can see, giving them a link to a website to verify.\n` +
"After the user complete's the check, they are given a role, which can be set to unlock specific channels.\n" +
`You can set the role given with ${getCommandMentionByName("settings/verify")}`
)
@@ -129,7 +159,9 @@
.setDescription(
"Nucleus has a content scanning system that automatically scans links and images sent by users.\n" +
"The staff team can be notified when an NSFW image is detected, or malicious links are sent.\n" +
- `You can check and manage what to moderate in ${getCommandMentionByName("settings/automod")}`
+ `You can check and manage what to moderate in ${getCommandMentionByName(
+ "settings/automod"
+ )}`
)
.setEmoji("MOD.IMAGES.TOOSMALL")
.setStatus("Danger")
@@ -143,10 +175,16 @@
.setTitle("Tickets")
.setDescription(
"Nucleus has a ticket system which allows users to create tickets and talk to the server staff or support team.\n" +
- `Tickets can be created by users with ${getCommandMentionByName("ticket/create")}, or by clicking a button created by moderators.\n` +
+ `Tickets can be created by users with ${getCommandMentionByName(
+ "ticket/create"
+ )}, or by clicking a button created by moderators.\n` +
`After being created, a new channel or thread is created, and the user and support team are pinged. \n` +
- `The category or channel to create threads in can be set with ${getCommandMentionByName("settings/tickets")}\n` +
- `When the ticket is resolved, anyone can run ${getCommandMentionByName("ticket/close")} (or click the button) to close it.\n` +
+ `The category or channel to create threads in can be set with ${getCommandMentionByName(
+ "settings/tickets"
+ )}\n` +
+ `When the ticket is resolved, anyone can run ${getCommandMentionByName(
+ "ticket/close"
+ )} (or click the button) to close it.\n` +
`Running ${getCommandMentionByName("ticket/close")} again will delete the ticket.`
)
.setEmoji("GUILD.TICKET.CLOSE")
@@ -161,8 +199,12 @@
.setTitle("Tags")
.setDescription(
"Nucleus allows you to create tags, which allow a message to be sent when a specific tag is typed.\n" +
- `Tags can be created with ${getCommandMentionByName("tags/create")}, and can be edited with ${getCommandMentionByName("tags/edit")}\n` +
- `Tags can be deleted with ${getCommandMentionByName("tags/delete")}, and can be listed with ${getCommandMentionByName("tags/list")}\n` +
+ `Tags can be created with ${getCommandMentionByName(
+ "tags/create"
+ )}, and can be edited with ${getCommandMentionByName("tags/edit")}\n` +
+ `Tags can be deleted with ${getCommandMentionByName(
+ "tags/delete"
+ )}, and can be listed with ${getCommandMentionByName("tags/list")}\n` +
`To use a tag, you can type ${getCommandMentionByName("tag")}, followed by the tag to send`
)
.setEmoji("PUNISH.NICKNAME.RED")
@@ -177,9 +219,9 @@
.setTitle("Premium")
.setDescription(
"Nucleus Premium allows you to use extra features in your server, which are useful but not essential.\n" +
- "**No currently free commands will become premium features.**\n" +
- "Premium features include creating ticket transcripts and attachment logs.\n\n" +
- "Premium can be purchased in [our server](https://discord.gg/bPaNnxe) in the subscriptions page" // TODO: add a table graphic
+ "**No currently free commands will become premium features.**\n" +
+ "Premium features include creating ticket transcripts and attachment logs.\n\n" +
+ "Premium can be purchased in [our server](https://discord.gg/bPaNnxe) in the subscriptions page" // TODO: add a table graphic
)
.setEmoji("NUCLEUS.PREMIUM")
.setStatus("Danger")
@@ -203,10 +245,11 @@
if (selectPaneOpen) {
const options: Discord.StringSelectMenuOptionBuilder[] = [];
pages.forEach((embed) => {
- options.push(new Discord.StringSelectMenuOptionBuilder()
- .setLabel(embed.title)
- .setValue(embed.pageId.toString())
- .setDescription(embed.description || "")
+ options.push(
+ new Discord.StringSelectMenuOptionBuilder()
+ .setLabel(embed.title)
+ .setValue(embed.pageId.toString())
+ .setDescription(embed.description || "")
);
});
selectPane = [
@@ -257,7 +300,9 @@
try {
i = await m.awaitMessageComponent({
filter: interaction
- ? (i) => { return i.user.id === interaction.user.id && i.channel!.id === interaction.channel!.id }
+ ? (i) => {
+ return i.user.id === interaction.user.id && i.channel!.id === interaction.channel!.id;
+ }
: publicFilter,
time: 300000
});