debug settings
This commit is contained in:
1 file changed
+9
-23
+9
-23
@@ -263,17 +263,6 @@ module.exports = {
|
||||
|
||||
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()
|
||||
.setTitle(`Are you sure you want to remove this channel from allowed channels?`)
|
||||
.setColor(client.config.EmbedColor)
|
||||
@@ -318,7 +307,7 @@ module.exports = {
|
||||
|
||||
const successEmbed = new MessageEmbed()
|
||||
.setColor("GREEN")
|
||||
.setTitle(`Successfully ${action} channel.`)
|
||||
.setTitle(`Success: You ${action} the channel.`)
|
||||
|
||||
return ButtonInteraction.update({ content: '', embeds: [successEmbed], components: [] });
|
||||
});
|
||||
@@ -329,8 +318,7 @@ module.exports = {
|
||||
const channelid = args[0].options[1].value;
|
||||
|
||||
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 = guild.server.actionChannel;
|
||||
const channelSetting = GuildDB.actionChannel;
|
||||
|
||||
const presetEmbed = new MessageEmbed()
|
||||
.setColor(client.config.EmbedColor)
|
||||
@@ -350,7 +338,7 @@ module.exports = {
|
||||
|
||||
const successEmbed = new MessageEmbed()
|
||||
.setColor("GREEN")
|
||||
.setTitle(`Successfully set <#${channelid}> for actions.`)
|
||||
.setDescription(`**Success:** Set <#${channelid}> as the action channel.`);
|
||||
|
||||
return interaction.send({ embeds: [successEmbed] });
|
||||
} else if (args[0].options[0].value == 'remove') {
|
||||
@@ -398,7 +386,7 @@ module.exports = {
|
||||
|
||||
const successEmbed = new MessageEmbed()
|
||||
.setColor("GREEN")
|
||||
.setTitle(`Successfully ${action} channel.`)
|
||||
.setTitle(`Success: You ${action} the channel.`)
|
||||
|
||||
return ButtonInteraction.update({ content: '', embeds: [successEmbed], components: [] });
|
||||
});
|
||||
@@ -409,8 +397,7 @@ module.exports = {
|
||||
const channelid = args[0].options[1].value;
|
||||
|
||||
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 = guild.server.tweetChannel;
|
||||
const channelSetting = GuildDB.tweetChannel;
|
||||
|
||||
const presetEmbed = new MessageEmbed()
|
||||
.setColor(client.config.EmbedColor)
|
||||
@@ -430,7 +417,7 @@ module.exports = {
|
||||
|
||||
const successEmbed = new MessageEmbed()
|
||||
.setColor("GREEN")
|
||||
.setTitle(`Successfully set <#${channelid}> for tweets.`)
|
||||
.setDescription(`**Success:** Set <#${channelid}> as the tweet channel.`);
|
||||
|
||||
return interaction.send({ embeds: [successEmbed] });
|
||||
} else if (args[0].options[0].value == 'remove') {
|
||||
@@ -478,7 +465,7 @@ module.exports = {
|
||||
|
||||
const successEmbed = new MessageEmbed()
|
||||
.setColor("GREEN")
|
||||
.setTitle(`Successfully ${action} channel.`)
|
||||
.setTitle(`Success: You ${action} the channel.`)
|
||||
|
||||
return ButtonInteraction.update({ content: '', embeds: [successEmbed], components: [] });
|
||||
});
|
||||
@@ -489,8 +476,7 @@ module.exports = {
|
||||
const channelid = args[0].options[1].value;
|
||||
|
||||
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 = guild.server.tweetChannel;
|
||||
const channelSetting = GuildDB.advertsChannel;
|
||||
|
||||
const presetEmbed = new MessageEmbed()
|
||||
.setColor(client.config.EmbedColor)
|
||||
@@ -558,7 +544,7 @@ module.exports = {
|
||||
|
||||
const successEmbed = new MessageEmbed()
|
||||
.setColor("GREEN")
|
||||
.setTitle(`Successfully ${action} channel.`)
|
||||
.setTitle(`Success: You ${action} the channel.`)
|
||||
|
||||
return ButtonInteraction.update({ content: '', embeds: [successEmbed], components: [] });
|
||||
});
|
||||
|
||||
Reference in new issue
Block a user