v2.4.0 push 4
This commit is contained in:
@@ -15,6 +15,7 @@ module.exports = () => {
|
||||
if (!msg.guild) return
|
||||
if (!permsChecker.command(msg.author.id,msg.guild.id)){
|
||||
permsChecker.sendUserNoPerms(msg.author)
|
||||
return
|
||||
}
|
||||
|
||||
msg.channel.messages.fetchPinned().then(msglist => {
|
||||
@@ -40,6 +41,7 @@ module.exports = () => {
|
||||
if (!interaction.guild) return
|
||||
if (!permsChecker.command(interaction.user.id,interaction.guild.id)){
|
||||
permsChecker.sendUserNoPerms(interaction.user)
|
||||
return
|
||||
}
|
||||
|
||||
interaction.deferReply()
|
||||
|
||||
@@ -13,6 +13,7 @@ module.exports = () => {
|
||||
if (!msg.guild) return
|
||||
if (!permsChecker.command(msg.author.id,msg.guild.id)){
|
||||
permsChecker.sendUserNoPerms(msg.author)
|
||||
return
|
||||
}
|
||||
|
||||
msg.channel.messages.fetchPinned().then(msglist => {
|
||||
@@ -47,6 +48,7 @@ module.exports = () => {
|
||||
if (!interaction.guild) return
|
||||
if (!permsChecker.command(interaction.user.id,interaction.guild.id)){
|
||||
permsChecker.sendUserNoPerms(interaction.user)
|
||||
return
|
||||
}
|
||||
|
||||
interaction.channel.messages.fetchPinned().then(msglist => {
|
||||
|
||||
@@ -15,6 +15,7 @@ module.exports = () => {
|
||||
if (!msg.guild) return
|
||||
if (!permsChecker.command(msg.author.id,msg.guild.id)){
|
||||
permsChecker.sendUserNoPerms(msg.author)
|
||||
return
|
||||
}
|
||||
|
||||
interaction.deferReply()
|
||||
@@ -43,6 +44,7 @@ module.exports = () => {
|
||||
if (!interaction.guild) return
|
||||
if (!permsChecker.command(interaction.user.id,interaction.guild.id)){
|
||||
permsChecker.sendUserNoPerms(interaction.user)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -18,6 +18,7 @@ module.exports = () => {
|
||||
if (!msg.guild) return
|
||||
if (!permsChecker.command(msg.author.id,msg.guild.id)){
|
||||
permsChecker.sendUserNoPerms(msg.author)
|
||||
return
|
||||
}
|
||||
|
||||
var newname = msg.content.split(config.prefix+"rename")[1].substring(1)
|
||||
@@ -60,6 +61,7 @@ module.exports = () => {
|
||||
if (!interaction.guild) return
|
||||
if (!permsChecker.command(interaction.user.id,interaction.guild.id)){
|
||||
permsChecker.sendUserNoPerms(interaction.user)
|
||||
return
|
||||
}
|
||||
|
||||
var newname = interaction.options.getString("name")
|
||||
|
||||
+8
-4
@@ -32,18 +32,22 @@ module.exports = () => {
|
||||
|
||||
})
|
||||
|
||||
client.on("interactionCreate",(interaction) => {
|
||||
client.on("interactionCreate",async (interaction) => {
|
||||
if (!interaction.isChatInputCommand()) return
|
||||
if (interaction.commandName != "reopen") return
|
||||
|
||||
interaction.deferReply()
|
||||
await interaction.deferReply()
|
||||
|
||||
interaction.channel.messages.fetchPinned().then(msglist => {
|
||||
interaction.channel.messages.fetchPinned().then(async msglist => {
|
||||
var firstmsg = msglist.last()
|
||||
|
||||
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return msg.channel.send({embeds:[bot.errorLog.notInATicket]})
|
||||
|
||||
interaction.reply({embeds:[bot.errorLog.success(l.commands.reopenTitle,l.commands.reopenDescription)],components:[reopenCommandBar]})
|
||||
try {
|
||||
await interaction.reply({embeds:[bot.errorLog.success(l.commands.reopenTitle,l.commands.reopenDescription)],components:[reopenCommandBar]})
|
||||
}catch{
|
||||
await interaction.editReply({embeds:[bot.errorLog.success(l.commands.reopenTitle,l.commands.reopenDescription)],components:[reopenCommandBar]})
|
||||
}
|
||||
|
||||
|
||||
log("command","someone used the 'reopen' command",[{key:"user",value:interaction.user.tag}])
|
||||
|
||||
@@ -20,6 +20,7 @@ module.exports = () => {
|
||||
if (!msg.guild) return
|
||||
if (!permsChecker.command(msg.author.id,msg.guild.id)){
|
||||
permsChecker.sendUserNoPerms(msg.author)
|
||||
return
|
||||
}
|
||||
|
||||
const id = msg.content.split(config.prefix+"msg")[1].substring(1) ? msg.content.split(config.prefix+"msg")[1].substring(1) : false
|
||||
@@ -43,6 +44,7 @@ module.exports = () => {
|
||||
if (!interaction.guild) return
|
||||
if (!permsChecker.command(interaction.user.id,interaction.guild.id)){
|
||||
permsChecker.sendUserNoPerms(interaction.user)
|
||||
return
|
||||
}
|
||||
|
||||
const id = interaction.options.getString("id")
|
||||
|
||||
Reference in New Issue
Block a user