resetting linux lol
diff --git a/src/commands/mod/ban.ts b/src/commands/mod/ban.ts
index 4581c0f..11c6c79 100644
--- a/src/commands/mod/ban.ts
+++ b/src/commands/mod/ban.ts
@@ -75,7 +75,7 @@
timestamp: new Date().getTime()
},
list: {
- id: entry(member.user.id, `\`${member.user.id}\``),
+ memberId: entry(member.user.id, `\`${member.user.id}\``),
name: entry(member.user.id, renderUser(member.user)),
banned: entry(new Date().getTime(), renderDelta(new Date().getTime())),
bannedBy: entry(interaction.user.id, renderUser(interaction.user)),
diff --git a/src/commands/mod/kick.ts b/src/commands/mod/kick.ts
index 97ead7b..b1464ee 100644
--- a/src/commands/mod/kick.ts
+++ b/src/commands/mod/kick.ts
@@ -71,7 +71,7 @@
timestamp: new Date().getTime()
},
list: {
- id: entry(member.id, `\`${member.id}\``),
+ memberId: entry(member.id, `\`${member.id}\``),
name: entry(member.id, renderUser(member.user)),
joined: entry(member.joinedAt, renderDelta(member.joinedAt)),
kicked: entry(new Date().getTime(), renderDelta(new Date().getTime())),
diff --git a/src/commands/mod/mute.ts b/src/commands/mod/mute.ts
index 5f42b27..4c326e7 100644
--- a/src/commands/mod/mute.ts
+++ b/src/commands/mod/mute.ts
@@ -163,7 +163,7 @@
}
if (config.moderation.mute.role) {
member.roles.add(config.moderation.mute.role)
- }
+ } // make sure this gets removed
} catch {
await interaction.editReply({embeds: [new EmojiEmbed()
.setEmoji("PUNISH.MUTE.RED")
diff --git a/src/commands/mod/nick.ts b/src/commands/mod/nick.ts
index e154277..8dcbf62 100644
--- a/src/commands/mod/nick.ts
+++ b/src/commands/mod/nick.ts
@@ -73,7 +73,7 @@
timestamp: new Date().getTime()
},
list: {
- id: entry(member.id, `\`${member.id}\``),
+ memberId: entry(member.id, `\`${member.id}\``),
before: entry(before, before ? before : '*None*'),
after: entry(nickname, nickname ? nickname : '*None*'),
updated: entry(new Date().getTime(), renderDelta(new Date().getTime())),
diff --git a/src/commands/mod/purge.ts b/src/commands/mod/purge.ts
index 9aab260..fd8e6b8 100644
--- a/src/commands/mod/purge.ts
+++ b/src/commands/mod/purge.ts
@@ -144,7 +144,7 @@
timestamp: new Date().getTime()
},
list: {
- id: entry(interaction.user.id, `\`${interaction.user.id}\``),
+ memberId: entry(interaction.user.id, `\`${interaction.user.id}\``),
purgedBy: entry(interaction.user.id, renderUser(interaction.user)),
channel: entry(interaction.channel.id, renderChannel(interaction.channel)),
messagesCleared: entry(deleted.length, deleted.length),
@@ -246,7 +246,7 @@
timestamp: new Date().getTime()
},
list: {
- id: entry(interaction.user.id, `\`${interaction.user.id}\``),
+ memberId: entry(interaction.user.id, `\`${interaction.user.id}\``),
purgedBy: entry(interaction.user.id, renderUser(interaction.user)),
channel: entry(interaction.channel.id, renderChannel(interaction.channel)),
messagesCleared: entry(messages.size, messages.size),
diff --git a/src/commands/mod/unban.ts b/src/commands/mod/unban.ts
index 7f605d9..e512084 100644
--- a/src/commands/mod/unban.ts
+++ b/src/commands/mod/unban.ts
@@ -53,7 +53,7 @@
timestamp: new Date().getTime()
},
list: {
- id: entry(member.id, `\`${member.id}\``),
+ memberId: entry(member.id, `\`${member.id}\``),
name: entry(member.id, renderUser(member)),
unbanned: entry(new Date().getTime(), renderDelta(new Date().getTime())),
unbannedBy: entry(interaction.user.id, renderUser(interaction.user)),
diff --git a/src/commands/mod/viewas.ts b/src/commands/mod/viewas.ts
index b3875a7..684fc3a 100644
--- a/src/commands/mod/viewas.ts
+++ b/src/commands/mod/viewas.ts
@@ -97,7 +97,6 @@
const check = (interaction: CommandInteraction, defaultCheck: WrappedCheck) => {
- return true // FIXME FOR RELEASE
let member = (interaction.member as GuildMember)
if (! member.permissions.has("MANAGE_ROLES")) throw "You do not have the Manage roles permission";
return true
diff --git a/src/commands/rolemenu.ts b/src/commands/rolemenu.ts
new file mode 100644
index 0000000..f53e10a
--- /dev/null
+++ b/src/commands/rolemenu.ts
@@ -0,0 +1,20 @@
+import { CommandInteraction } from "discord.js";
+import { SlashCommandBuilder } from "@discordjs/builders";
+import { WrappedCheck } from "jshaiku";
+import { callback as roleMenu } from "../automations/roleMenu.js"
+
+const command = new SlashCommandBuilder()
+ .setName("rolemenu")
+ .setDescription("Lets you choose from sets of roles to apply to yourself")
+
+const callback = async (interaction: CommandInteraction): Promise<any> => {
+ await roleMenu(interaction);
+}
+
+const check = (interaction: CommandInteraction, defaultCheck: WrappedCheck) => {
+ return true;
+}
+
+export { command };
+export { callback };
+export { check };
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
diff --git a/src/commands/tags/create.ts b/src/commands/tags/create.ts
index c1ed839..6dbecf4 100644
--- a/src/commands/tags/create.ts
+++ b/src/commands/tags/create.ts
@@ -78,7 +78,7 @@
const check = (interaction: CommandInteraction, defaultCheck: WrappedCheck) => {
let member = (interaction.member as Discord.GuildMember)
- if (!member.permissions.has("MANAGE_MESSAGES")) throw "You must have the `manage_messages` permission to use this command"
+ if (!member.permissions.has("MANAGE_MESSAGES")) throw "You must have the Manage Messages permission to use this command"
return true;
}
diff --git a/src/commands/tags/delete.ts b/src/commands/tags/delete.ts
index f24a5fc..2707465 100644
--- a/src/commands/tags/delete.ts
+++ b/src/commands/tags/delete.ts
@@ -60,7 +60,7 @@
const check = (interaction: CommandInteraction, defaultCheck: WrappedCheck) => {
let member = (interaction.member as Discord.GuildMember)
- if (!member.permissions.has("MANAGE_MESSAGES")) throw "You must have the `manage_messages` permission to use this command"
+ if (!member.permissions.has("MANAGE_MESSAGES")) throw "You must have the Manage Messages permission to use this command"
return true;
}
diff --git a/src/commands/tags/edit.ts b/src/commands/tags/edit.ts
index b0a4835..77e21ae 100644
--- a/src/commands/tags/edit.ts
+++ b/src/commands/tags/edit.ts
@@ -93,7 +93,7 @@
const check = (interaction: CommandInteraction, defaultCheck: WrappedCheck) => {
let member = (interaction.member as Discord.GuildMember)
- if (!member.permissions.has("MANAGE_MESSAGES")) throw "You must have the `manage_messages` permission to use this command"
+ if (!member.permissions.has("MANAGE_MESSAGES")) throw "You must have the Manage Messages permission to use this command"
return true;
}