debug settings

This commit is contained in:
SowinskiBraeden committed 2022-08-03 10:13:56 -07:00
1 parent 3a101e5046
commit 8199b9ba23
1 file changed
+9 -23
+9 -23
View File
@@ -263,17 +263,6 @@ module.exports = {
if (!GuildDB.allowedChannels.includes(channelid)) return interaction.send({ embeds: [embed] }); if (!GuildDB.allowedChannels.includes(channelid)) return interaction.send({ embeds: [embed] });
client.dbo.collection("guilds").updateOne({"server.serverID":GuildDB.serverID}, {$pull:{"server.allowedChannels": channelid}}, function (err, res) {
if (err) {
client.log(err);
const embed = new MessageEmbed()
.setDescriptions(`**Internal Error:** ${err}\nContact the Developers\nhttps://discord.gg/YCXhvy9uZw`)
.setColor("RED")
return interaction.send({ embeds: [embed] });
}
});
const prompt = new MessageEmbed() const prompt = new MessageEmbed()
.setTitle(`Are you sure you want to remove this channel from allowed channels?`) .setTitle(`Are you sure you want to remove this channel from allowed channels?`)
.setColor(client.config.EmbedColor) .setColor(client.config.EmbedColor)
@@ -318,7 +307,7 @@ module.exports = {
const successEmbed = new MessageEmbed() const successEmbed = new MessageEmbed()
.setColor("GREEN") .setColor("GREEN")
.setTitle(`Successfully ${action} channel.`) .setTitle(`Success: You ${action} the channel.`)
return ButtonInteraction.update({ content: '', embeds: [successEmbed], components: [] }); return ButtonInteraction.update({ content: '', embeds: [successEmbed], components: [] });
}); });
@@ -329,8 +318,7 @@ module.exports = {
const channelid = args[0].options[1].value; const channelid = args[0].options[1].value;
if (args[0].options[0].value == 'set') { if (args[0].options[0].value == 'set') {
const guild = await client.dbo.collection("guilds").findOne({"server.serverID":interaction.guild.id}).then(guild => guild); const channelSetting = GuildDB.actionChannel;
const channelSetting = guild.server.actionChannel;
const presetEmbed = new MessageEmbed() const presetEmbed = new MessageEmbed()
.setColor(client.config.EmbedColor) .setColor(client.config.EmbedColor)
@@ -350,7 +338,7 @@ module.exports = {
const successEmbed = new MessageEmbed() const successEmbed = new MessageEmbed()
.setColor("GREEN") .setColor("GREEN")
.setTitle(`Successfully set <#${channelid}> for actions.`) .setDescription(`**Success:** Set <#${channelid}> as the action channel.`);
return interaction.send({ embeds: [successEmbed] }); return interaction.send({ embeds: [successEmbed] });
} else if (args[0].options[0].value == 'remove') { } else if (args[0].options[0].value == 'remove') {
@@ -398,7 +386,7 @@ module.exports = {
const successEmbed = new MessageEmbed() const successEmbed = new MessageEmbed()
.setColor("GREEN") .setColor("GREEN")
.setTitle(`Successfully ${action} channel.`) .setTitle(`Success: You ${action} the channel.`)
return ButtonInteraction.update({ content: '', embeds: [successEmbed], components: [] }); return ButtonInteraction.update({ content: '', embeds: [successEmbed], components: [] });
}); });
@@ -409,8 +397,7 @@ module.exports = {
const channelid = args[0].options[1].value; const channelid = args[0].options[1].value;
if (args[0].options[0].value == 'set') { if (args[0].options[0].value == 'set') {
const guild = await client.dbo.collection("guilds").findOne({"server.serverID":interaction.guild.id}).then(guild => guild); const channelSetting = GuildDB.tweetChannel;
const channelSetting = guild.server.tweetChannel;
const presetEmbed = new MessageEmbed() const presetEmbed = new MessageEmbed()
.setColor(client.config.EmbedColor) .setColor(client.config.EmbedColor)
@@ -430,7 +417,7 @@ module.exports = {
const successEmbed = new MessageEmbed() const successEmbed = new MessageEmbed()
.setColor("GREEN") .setColor("GREEN")
.setTitle(`Successfully set <#${channelid}> for tweets.`) .setDescription(`**Success:** Set <#${channelid}> as the tweet channel.`);
return interaction.send({ embeds: [successEmbed] }); return interaction.send({ embeds: [successEmbed] });
} else if (args[0].options[0].value == 'remove') { } else if (args[0].options[0].value == 'remove') {
@@ -478,7 +465,7 @@ module.exports = {
const successEmbed = new MessageEmbed() const successEmbed = new MessageEmbed()
.setColor("GREEN") .setColor("GREEN")
.setTitle(`Successfully ${action} channel.`) .setTitle(`Success: You ${action} the channel.`)
return ButtonInteraction.update({ content: '', embeds: [successEmbed], components: [] }); return ButtonInteraction.update({ content: '', embeds: [successEmbed], components: [] });
}); });
@@ -489,8 +476,7 @@ module.exports = {
const channelid = args[0].options[1].value; const channelid = args[0].options[1].value;
if (args[0].options[0].value == 'set') { if (args[0].options[0].value == 'set') {
const guild = await client.dbo.collection("guilds").findOne({"server.serverID":interaction.guild.id}).then(guild => guild); const channelSetting = GuildDB.advertsChannel;
const channelSetting = guild.server.tweetChannel;
const presetEmbed = new MessageEmbed() const presetEmbed = new MessageEmbed()
.setColor(client.config.EmbedColor) .setColor(client.config.EmbedColor)
@@ -558,7 +544,7 @@ module.exports = {
const successEmbed = new MessageEmbed() const successEmbed = new MessageEmbed()
.setColor("GREEN") .setColor("GREEN")
.setTitle(`Successfully ${action} channel.`) .setTitle(`Success: You ${action} the channel.`)
return ButtonInteraction.update({ content: '', embeds: [successEmbed], components: [] }); return ButtonInteraction.update({ content: '', embeds: [successEmbed], components: [] });
}); });