v2.1.0 push 6

Added english.json
This commit is contained in:
DJj123dj
2022-06-15 18:29:50 +02:00
parent 6cd6799712
commit 09f9944cf7
5 changed files with 80 additions and 19 deletions
+5 -15
View File
@@ -32,27 +32,17 @@ module.exports = () => {
client.on("interactionCreate",(interaction) => {
if (!interaction.isCommand()) return
if (interaction.commandName != "add") return
const user = interaction.options.getUser("user")
const permsmember = client.guilds.cache.find(g => g.id == interaction.guild.id).members.cache.find(m => m.id == interaction.member.id)
if (config.main_adminroles.some((item)=>{return interaction.guild.members.cache.find((m) => m.id == interaction.member.id).roles.cache.has(item)}) == false && permsmember.permissions.has("ADMINISTRATOR")){
interaction.reply({embeds:[bot.errorLog.noPermsMessage]})
return
}
if (interaction.commandName != "reopen") return
interaction.channel.messages.fetchPinned().then(msglist => {
var firstmsg = msglist.last()
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return interaction.reply({embeds:[bot.errorLog.notInATicket]})
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return msg.channel.send({embeds:[bot.errorLog.notInATicket]})
interaction.channel.permissionOverwrites.create(user.id, { VIEW_CHANNEL:true, ADD_REACTIONS:true,ATTACH_FILES:true, EMBED_LINKS:true, SEND_MESSAGES:true})
interaction.reply({embeds:[bot.errorLog.success("User Added!",user.tag+" is added to this ticket")]})
interaction.reply({embeds:[bot.errorLog.success("Re-Open this ticket!","You can re-open this ticket by clicking on the button below!")],components:[reopenCommandBar]})
var loguser = user
log("command","someone used the 'add' command",[{key:"user",value:interaction.user.tag}])
log("system","user added to ticket",[{key:"user",value:interaction.user.tag},{key:"ticket",value:interaction.channel.name},{key:"added_user",value:loguser.tag}])
log("command","someone used the 'reopen' command",[{key:"user",value:interaction.user.tag}])
})