huge changes once again
diff --git a/src/commands/settings/logs/channel.ts b/src/commands/settings/logs/channel.ts
index 448f26a..19a389b 100644
--- a/src/commands/settings/logs/channel.ts
+++ b/src/commands/settings/logs/channel.ts
@@ -1,6 +1,6 @@
import { ChannelType } from 'discord-api-types';
import Discord, { CommandInteraction, MessageActionRow, MessageButton } from "discord.js";
-import generateEmojiEmbed from "../../../utils/generateEmojiEmbed.js";
+import EmojiEmbed from "../../../utils/generateEmojiEmbed.js";
import confirmationMessage from "../../../utils/confirmationMessage.js";
import getEmojiByName from "../../../utils/getEmojiByName.js";
import { SlashCommandSubcommandBuilder } from "@discordjs/builders";
@@ -17,7 +17,7 @@
const callback = async (interaction: CommandInteraction): Promise<any> => {
let m;
- m = await interaction.reply({embeds: [new generateEmojiEmbed()
+ m = await interaction.reply({embeds: [new EmojiEmbed()
.setTitle("Loading")
.setStatus("Danger")
.setEmoji("NUCLEUS.LOADING")
@@ -27,7 +27,7 @@
try {
channel = interaction.options.getChannel("channel")
} catch {
- return await interaction.editReply({embeds: [new generateEmojiEmbed()
+ return await interaction.editReply({embeds: [new EmojiEmbed()
.setEmoji("CHANNEL.TEXT.DELETE")
.setTitle("Log Channel")
.setDescription("The channel you provided is not a valid channel")
@@ -36,7 +36,7 @@
}
channel = channel as Discord.TextChannel
if (channel.guild.id != interaction.guild.id) {
- return interaction.editReply({embeds: [new generateEmojiEmbed()
+ return interaction.editReply({embeds: [new EmojiEmbed()
.setTitle("Log Channel")
.setDescription(`You must choose a channel in this server`)
.setStatus("Danger")
@@ -52,10 +52,10 @@
.send(true)
if (confirmation.success) {
try {
- await client.database.write(interaction.guild.id, {"logging.logs.channel": channel.id})
+ await client.database.guilds.write(interaction.guild.id, {"logging.logs.channel": channel.id})
} catch (e) {
console.log(e)
- return interaction.editReply({embeds: [new generateEmojiEmbed()
+ return interaction.editReply({embeds: [new EmojiEmbed()
.setTitle("Log Channel")
.setDescription(`Something went wrong and the log channel could not be set`)
.setStatus("Danger")
@@ -63,7 +63,7 @@
], components: []});
}
} else {
- return interaction.editReply({embeds: [new generateEmojiEmbed()
+ return interaction.editReply({embeds: [new EmojiEmbed()
.setTitle("Log Channel")
.setDescription(`No changes were made`)
.setStatus("Success")
@@ -72,10 +72,10 @@
}
}
let clicks = 0;
- let data = await client.database.read(interaction.guild.id);
+ let data = await client.database.guilds.read(interaction.guild.id);
let channel = data.logging.logs.channel;
while (true) {
- await interaction.editReply({embeds: [new generateEmojiEmbed()
+ await interaction.editReply({embeds: [new EmojiEmbed()
.setTitle("Log channel")
.setDescription(channel ? `Your log channel is currently set to <#${channel}>` : "This server does not have a log channel")
.setStatus("Success")
@@ -96,14 +96,14 @@
clicks += 1;
if (clicks == 2) {
clicks = 0;
- await client.database.write(interaction.guild.id, {}, ["logging.logs.channel"])
+ await client.database.guilds.write(interaction.guild.id, {}, ["logging.logs.channel"])
channel = undefined;
}
} else {
break
}
}
- await interaction.editReply({embeds: [new generateEmojiEmbed()
+ await interaction.editReply({embeds: [new EmojiEmbed()
.setTitle("Log channel")
.setDescription(channel ? `Your log channel is currently set to <#${channel}>` : "This server does not have a log channel")
.setStatus("Success")