Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update and rename setgeneralchannel.js to setchatbot.js #53

Merged
merged 2 commits into from
Jun 13, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions commands/removegeneralchannel.js → commands/removechatbot.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ const General = require('../models/General')
const Modlog = require('../models/Modlog')
module.exports = {
data: new SlashCommandBuilder()
.setName('removegeneralchannel')
.setDescription('Remove the general message channel'),
.setName('removechatbot')
.setDescription('Remove the chatbot message channel'),
async execute(interaction) {
const insf_perms = new Discord.MessageEmbed()
.setColor('#FF0000')
.setTitle(`**:x: Insufficient Permission!**`)
.setDescription(`You don't have permission to use this command.`)
const gen_rem_embed = new Discord.MessageEmbed()
.setColor('#00ff00')
.setTitle(`**:white_check_mark: Removed General Channel**`)
.setTitle(`**:white_check_mark: Removed chatbot Channel**`)
const gen_rem_db_fail = new Discord.MessageEmbed()
.setColor('#FF0000')
.setTitle(`**:x: DataBase Error!**`)
Expand All @@ -30,7 +30,7 @@ module.exports = {
return
}
if(channel.length === 0){
interaction.reply(`There isn't any general channel in this server!`)
interaction.reply(`There isn't any chatbot channel in this server!`)
return
}
General.deleteOne({ guild_id: interaction.guild.id }, (err, settings) => {
Expand Down Expand Up @@ -59,4 +59,4 @@ module.exports = {
abc.send({embeds: [gen_rem_embed]})
}
}
}
}
10 changes: 5 additions & 5 deletions commands/setgeneralchannel.js → commands/setchatbot.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ const General = require('../models/General')
const Modlog = require('../models/Modlog')
module.exports = {
data: new SlashCommandBuilder()
.setName('setgeneralchannel')
.setDescription('Set the general message channel')
.addChannelOption(option => option.setName('general').setDescription('The channel to set as the general channel').setRequired(true)),
.setName('setchatbot')
.setDescription('Set the chatbot message channel')
.addChannelOption(option => option.setName('general').setDescription('The channel to set as the chatbot channel').setRequired(true)),
async execute(interaction) {
const msg_perms = new Discord.MessageEmbed()
.setColor('#FF0000')
Expand All @@ -23,7 +23,7 @@ module.exports = {
.setDescription(`This command is only applicable for text channels`)
const gen_embed = new Discord.MessageEmbed()
.setColor('#00ff00')
.setTitle(`**:white_check_mark: General channel has been set to ${interaction.options.getChannel('general')}**`)
.setTitle(`**:white_check_mark: Chatbot channel has been set to ${interaction.options.getChannel('general')}**`)
const gen_db_fail = new Discord.MessageEmbed()
.setColor('#FF0000')
.setTitle(`**:x: DataBase Error!**`)
Expand Down Expand Up @@ -82,4 +82,4 @@ module.exports = {
}
})
}
}
}