resetting linux lol
diff --git a/src/commands/settings/logs/channel.ts b/src/commands/settings/logs/channel.ts
index 19a389b..10a5887 100644
--- a/src/commands/settings/logs/channel.ts
+++ b/src/commands/settings/logs/channel.ts
@@ -53,6 +53,28 @@
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
+ }
+ }
+ log(data);
+ } catch {}
} catch (e) {
console.log(e)
return interaction.editReply({embeds: [new EmojiEmbed()
@@ -120,7 +142,7 @@
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"
+ if (!member.permissions.has("MANAGE_GUILD")) throw "You must have the Manage Server permission to use this command"
return true;
}
diff --git a/src/commands/settings/logs/ignore.ts b/src/commands/settings/logs/ignore.ts
index 12af085..3b81d42 100644
--- a/src/commands/settings/logs/ignore.ts
+++ b/src/commands/settings/logs/ignore.ts
@@ -103,14 +103,38 @@
if (role) data.logging.logs.ignore.roles.concat([role.id])
if (interaction.options.getString("action") == "add") {
await client.database.guilds.append(interaction.guild.id, data)
+ } else {
+ await client.database.guilds.remove(interaction.guild.id, data)
}
+ const { log, NucleusColors, entry, renderUser, renderChannel } = client.logger
+ try {
+ let data = {
+ meta:{
+ type: 'logIgnoreUpdated',
+ displayName: 'Ignored Groups 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: interaction.guild.id
+ }
+ }
+ log(data);
+ } catch {}
}
}
}
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"
+ if (!member.permissions.has("MANAGE_GUILD")) throw "You must have the Manage Server permission to use this command"
return true;
}
diff --git a/src/commands/settings/rolemenu.ts b/src/commands/settings/rolemenu.ts
new file mode 100644
index 0000000..ec54820
--- /dev/null
+++ b/src/commands/settings/rolemenu.ts
@@ -0,0 +1,26 @@
+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 client from "../../utils/client.js";
+
+const command = (builder: SlashCommandSubcommandBuilder) =>
+ builder
+ .setName("role")
+ .setDescription("Sets or shows the role given to users after using /verify")
+ .addRoleOption(option => option.setName("role").setDescription("The role to give after verifying"))
+
+const callback = async (interaction: CommandInteraction): Promise<any> => {
+}
+
+const check = (interaction: CommandInteraction, defaultCheck: WrappedCheck) => {
+ let member = (interaction.member as Discord.GuildMember)
+ if (!member.permissions.has("MANAGE_ROLES")) throw "You must have the Manage roles permission to use this command"
+ return true;
+}
+
+export { command };
+export { callback };
+export { check };
\ No newline at end of file
diff --git a/src/commands/settings/staff/channel.ts b/src/commands/settings/staff.ts
similarity index 77%
rename from src/commands/settings/staff/channel.ts
rename to src/commands/settings/staff.ts
index 74605cf..e0d2776 100644
--- a/src/commands/settings/staff/channel.ts
+++ b/src/commands/settings/staff.ts
@@ -1,19 +1,19 @@
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 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 client from "../../../utils/client.js";
+import client from "../../utils/client.js";
const command = (builder: SlashCommandSubcommandBuilder) =>
builder
- .setName("channel")
- .setDescription("Sets or shows the staff notifications channel")
+ .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;
@@ -56,6 +56,28 @@
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: 'logIgnoreUpdated',
+ 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 {}
} catch (e) {
return interaction.editReply({embeds: [new EmojiEmbed()
.setTitle("Staff Notifications Channel")
@@ -122,7 +144,7 @@
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"
+ if (!member.permissions.has("MANAGE_GUILD")) throw "You must have the Manage Server permission to use this command"
return true;
}
diff --git a/src/commands/settings/staff/_meta.ts b/src/commands/settings/staff/_meta.ts
deleted file mode 100644
index 9c3cd62..0000000
--- a/src/commands/settings/staff/_meta.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-const name = "warnings";
-const description = "Settings for mod warnings";
-
-export { name, description };
\ No newline at end of file
diff --git a/src/commands/settings/tickets.ts b/src/commands/settings/tickets.ts
index b505c5c..e664bd0 100644
--- a/src/commands/settings/tickets.ts
+++ b/src/commands/settings/tickets.ts
@@ -404,7 +404,7 @@
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"
+ if (!member.permissions.has("MANAGE_GUILD")) throw "You must have the Manage Server permission to use this command"
return true;
}
diff --git a/src/commands/settings/verify/role.ts b/src/commands/settings/verify.ts
similarity index 75%
rename from src/commands/settings/verify/role.ts
rename to src/commands/settings/verify.ts
index 44406e9..7a68c64 100644
--- a/src/commands/settings/verify/role.ts
+++ b/src/commands/settings/verify.ts
@@ -1,16 +1,16 @@
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 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 client from "../../../utils/client.js";
+import client from "../../utils/client.js";
const command = (builder: SlashCommandSubcommandBuilder) =>
builder
- .setName("role")
- .setDescription("Sets or shows the role given to users after using /verify")
- .addRoleOption(option => option.setName("role").setDescription("The role to give after verifying"))
+ .setName("verify")
+ .setDescription("Manage the role given after typing /verify")
+ .addRoleOption(option => option.setName("role").setDescription("The role to give after verifying").setRequired(false))
const callback = async (interaction: CommandInteraction): Promise<any> => {
let m;
@@ -50,6 +50,28 @@
if (confirmation.success) {
try {
await client.database.guilds.write(interaction.guild.id, {"verify.role": role.id, "verify.enabled": true});
+ const { log, NucleusColors, entry, renderUser, renderRole } = client.logger
+ try {
+ let data = {
+ meta:{
+ type: 'verifyRoleChanged',
+ displayName: 'Ignored Groups Changed',
+ calculateType: 'nucleusSettingsUpdated',
+ color: NucleusColors.green,
+ emoji: "CONTROL.BLOCKTICK",
+ timestamp: new Date().getTime()
+ },
+ list: {
+ memberId: entry(interaction.user.id, `\`${interaction.user.id}\``),
+ changedBy: entry(interaction.user.id, renderUser(interaction.user)),
+ role: entry(role.id, renderRole(role)),
+ },
+ hidden: {
+ guild: interaction.guild.id
+ }
+ }
+ log(data);
+ } catch {}
} catch (e) {
console.log(e)
return interaction.editReply({embeds: [new EmojiEmbed()
@@ -117,7 +139,7 @@
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"
+ if (!member.permissions.has("MANAGE_GUILD")) throw "You must have the Manage Server permission to use this command"
return true;
}
diff --git a/src/commands/settings/verify/_meta.ts b/src/commands/settings/verify/_meta.ts
deleted file mode 100644
index 999c50b..0000000
--- a/src/commands/settings/verify/_meta.ts
+++ /dev/null
@@ -1,4 +0,0 @@
-const name = "verify";
-const description = "Settings for verification";
-
-export { name, description };
\ No newline at end of file