almost ready for discord.js 14!
This commit is contained in:
+1
-2
@@ -31,7 +31,7 @@ module.exports = () => {
|
||||
})
|
||||
|
||||
client.on("interactionCreate",(interaction) => {
|
||||
if (!interaction.isCommand()) return
|
||||
if (!interaction.isChatInputCommand()) return
|
||||
if (interaction.commandName != "add") return
|
||||
const user = interaction.options.getUser("user")
|
||||
|
||||
@@ -41,7 +41,6 @@ module.exports = () => {
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
interaction.channel.messages.fetchPinned().then(msglist => {
|
||||
var firstmsg = msglist.last()
|
||||
|
||||
|
||||
+5
-5
@@ -15,12 +15,12 @@ module.exports = () => {
|
||||
|
||||
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return msg.channel.send({embeds:[bot.errorLog.notInATicket]})
|
||||
|
||||
const closebutton = new discord.MessageActionRow()
|
||||
const closebutton = new discord.ActionRowBuilder()
|
||||
.addComponents([
|
||||
new discord.ButtonBuilder()
|
||||
.setCustomId("closeTicketTrue1")
|
||||
.setDisabled(false)
|
||||
.setStyle("SECONDARY")
|
||||
.setStyle(discord.ButtonStyle.Secondary)
|
||||
.setEmoji("🔒")
|
||||
])
|
||||
|
||||
@@ -34,7 +34,7 @@ module.exports = () => {
|
||||
})
|
||||
|
||||
client.on("interactionCreate",(interaction) => {
|
||||
if (!interaction.isCommand()) return
|
||||
if (!interaction.isChatInputCommand()) return
|
||||
if (interaction.commandName != "close") return
|
||||
|
||||
interaction.channel.messages.fetchPinned().then(msglist => {
|
||||
@@ -42,12 +42,12 @@ module.exports = () => {
|
||||
|
||||
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return interaction.reply({embeds:[bot.errorLog.notInATicket]})
|
||||
|
||||
const closebutton = new discord.MessageActionRow()
|
||||
const closebutton = new discord.ActionRowBuilder()
|
||||
.addComponents([
|
||||
new discord.ButtonBuilder()
|
||||
.setCustomId("closeTicketTrue1")
|
||||
.setDisabled(false)
|
||||
.setStyle("SECONDARY")
|
||||
.setStyle(discord.ButtonStyle.Secondary)
|
||||
.setEmoji("🔒")
|
||||
])
|
||||
|
||||
|
||||
+5
-5
@@ -18,12 +18,12 @@ module.exports = () => {
|
||||
|
||||
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return msg.channel.send({embeds:[bot.errorLog.notInATicket]})
|
||||
|
||||
const closebutton = new discord.MessageActionRow()
|
||||
const closebutton = new discord.ActionRowBuilder()
|
||||
.addComponents([
|
||||
new discord.ButtonBuilder()
|
||||
.setCustomId("deleteTicketTrue")
|
||||
.setDisabled(false)
|
||||
.setStyle("SECONDARY")
|
||||
.setStyle(discord.ButtonStyle.Secondary)
|
||||
.setEmoji("❌")
|
||||
])
|
||||
|
||||
@@ -37,7 +37,7 @@ module.exports = () => {
|
||||
})
|
||||
|
||||
client.on("interactionCreate",(interaction) => {
|
||||
if (!interaction.isCommand()) return
|
||||
if (!interaction.isChatInputCommand()) return
|
||||
if (interaction.commandName != "delete") return
|
||||
|
||||
const permsmember = client.guilds.cache.find(g => g.id == interaction.guild.id).members.cache.find(m => m.id == interaction.member.id)
|
||||
@@ -51,12 +51,12 @@ module.exports = () => {
|
||||
|
||||
if (firstmsg == undefined || firstmsg.author.id != client.user.id) return interaction.reply({embeds:[bot.errorLog.notInATicket]})
|
||||
|
||||
const closebutton = new discord.MessageActionRow()
|
||||
const closebutton = new discord.ActionRowBuilder()
|
||||
.addComponents([
|
||||
new discord.ButtonBuilder()
|
||||
.setCustomId("deleteTicketTrue")
|
||||
.setDisabled(false)
|
||||
.setStyle("SECONDARY")
|
||||
.setStyle(discord.ButtonStyle.Secondary)
|
||||
.setEmoji("❌")
|
||||
])
|
||||
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ module.exports = () => {
|
||||
})
|
||||
|
||||
client.on("interactionCreate",(interaction) => {
|
||||
if (!interaction.isCommand()) return
|
||||
if (!interaction.isChatInputCommand()) return
|
||||
if (interaction.commandName != "help") return
|
||||
|
||||
interaction.reply({embeds:[helpEmbed]})
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ module.exports = () => {
|
||||
})
|
||||
|
||||
client.on("interactionCreate",(interaction) => {
|
||||
if (!interaction.isCommand()) return
|
||||
if (!interaction.isChatInputCommand()) return
|
||||
if (interaction.commandName != "remove") return
|
||||
const user = interaction.options.getUser("user")
|
||||
|
||||
|
||||
+1
-1
@@ -45,7 +45,7 @@ module.exports = () => {
|
||||
})
|
||||
|
||||
client.on("interactionCreate",(interaction) => {
|
||||
if (!interaction.isCommand()) return
|
||||
if (!interaction.isChatInputCommand()) return
|
||||
if (interaction.commandName != "rename") return
|
||||
|
||||
interaction.channel.messages.fetchPinned().then(msglist => {
|
||||
|
||||
+3
-3
@@ -6,12 +6,12 @@ const log = bot.errorLog.log
|
||||
const l = bot.language
|
||||
|
||||
module.exports = () => {
|
||||
var reopenCommandBar = new discord.MessageActionRow()
|
||||
var reopenCommandBar = new discord.ActionRowBuilder()
|
||||
.addComponents(
|
||||
new discord.ButtonBuilder()
|
||||
.setCustomId("reopenTicket1")
|
||||
.setDisabled(false)
|
||||
.setStyle("SECONDARY")
|
||||
.setStyle(discord.ButtonStyle.Secondary)
|
||||
.setEmoji("🔓")
|
||||
)
|
||||
|
||||
@@ -32,7 +32,7 @@ module.exports = () => {
|
||||
})
|
||||
|
||||
client.on("interactionCreate",(interaction) => {
|
||||
if (!interaction.isCommand()) return
|
||||
if (!interaction.isChatInputCommand()) return
|
||||
if (interaction.commandName != "reopen") return
|
||||
|
||||
interaction.channel.messages.fetchPinned().then(msglist => {
|
||||
|
||||
+1
-1
@@ -35,7 +35,7 @@ module.exports = () => {
|
||||
})
|
||||
|
||||
client.on("interactionCreate", (interaction) => {
|
||||
if (!interaction.isCommand()) return
|
||||
if (!interaction.isChatInputCommand()) return
|
||||
if (interaction.commandName != "message") return
|
||||
|
||||
const permsmember = client.guilds.cache.find(g => g.id == interaction.guild.id).members.cache.find(m => m.id == interaction.member.id)
|
||||
|
||||
Reference in New Issue
Block a user