v2.4.0 push 4

This commit is contained in:
DJj123dj
2022-07-29 18:17:26 +02:00
parent ffa075d177
commit a69f2ee5a1
17 changed files with 248 additions and 210 deletions
+2
View File
@@ -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()
+2
View File
@@ -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 => {
+2
View File
@@ -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
}
+2
View File
@@ -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
View File
@@ -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}])
+2
View File
@@ -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")