.
.
DIAdiscord.js - Imagine an app
Created by . on 5/25/2024 in #djs-questions
ticket bot reacts to own messages
I have a ticket bot and basically its supposed ot give reactions and open a channel based on which one they chose. It pings the customer once they open it. However, the bot opens its own ticket and reacts and then removes the reaction and it just doesnt work. Ticketembed is the command:
const { MessageEmbed } = require("discord.js")


module.exports = {
name: 'ticketembed',
async execute(message, client) {

const ticketEmbed = new MessageEmbed()
.setTitle(":tickets: | Support Tickets")
.setDescription(`Found a bug, or error? Have a question, or another concern? Would you like to partner with us? Click one of the buttons corresponding to what we listed here!\n\nšŸ› - Report a bug\nā“ - General Support\nā” - Partnerships`)
.setColor("#2F3136")

await message.delete();
const ticketEmbedMsg = await message.channel.send({ embeds: [ticketEmbed] });
await ticketEmbedMsg.react(":bug:");
await ticketEmbedMsg.react(":question:");
await ticketEmbedMsg.react(":grey_question:");

}
}
const { MessageEmbed } = require("discord.js")


module.exports = {
name: 'ticketembed',
async execute(message, client) {

const ticketEmbed = new MessageEmbed()
.setTitle(":tickets: | Support Tickets")
.setDescription(`Found a bug, or error? Have a question, or another concern? Would you like to partner with us? Click one of the buttons corresponding to what we listed here!\n\nšŸ› - Report a bug\nā“ - General Support\nā” - Partnerships`)
.setColor("#2F3136")

await message.delete();
const ticketEmbedMsg = await message.channel.send({ embeds: [ticketEmbed] });
await ticketEmbedMsg.react(":bug:");
await ticketEmbedMsg.react(":question:");
await ticketEmbedMsg.react(":grey_question:");

}
}
I am using discordjs 13.6.0
4 replies
DIAdiscord.js - Imagine an app
Created by . on 5/22/2024 in #djs-questions
help with command
so basically i run the command and its supposed to be an embed for users to click and the choose the reaction to open that ticket type and when i run tht command the bot reacts and then deletes that reaction and makes its own ticket and only keeps one reaction and that reaction doesnt even work if u know wha ti mean
6 replies
DIAdiscord.js - Imagine an app
Created by . on 5/21/2024 in #djs-questions
TypeError: pendingTicketsChannel.createChannel is not a function
This used to work, but discordjs has been updated throughout the years and now it just throws the following terminal error.
node:events:497
throw er; // Unhandled 'error' event
^

TypeError: pendingTicketsChannel.createChannel is not a function
at Client.<anonymous> (C:\Users\em08p\Downloads\bot\index.js:73:66)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Emitted 'error' event on Client instance at:
at emitUnhandledRejectionOrErr (node:events:402:10)
at process.processTicksAndRejections (node:internal/process/task_queues:84:21)
node:events:497
throw er; // Unhandled 'error' event
^

TypeError: pendingTicketsChannel.createChannel is not a function
at Client.<anonymous> (C:\Users\em08p\Downloads\bot\index.js:73:66)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Emitted 'error' event on Client instance at:
at emitUnhandledRejectionOrErr (node:events:402:10)
at process.processTicksAndRejections (node:internal/process/task_queues:84:21)
17 replies
DIAdiscord.js - Imagine an app
Created by . on 5/21/2024 in #djs-questions
ColorConvert error
Ive been getting this in my terminal
throw er; // Unhandled 'error' event
^

TypeError [ColorConvert]: Unable to convert color to a number.
at resolveColor (C:\Users\em08p\Downloads\bot\node_modules\discord.js\src\util\Util.js:260:63)
at EmbedBuilder.setColor (C:\Users\em08p\Downloads\bot\node_modules\discord.js\src\structures\EmbedBuilder.js:23:36)
at Client.<anonymous> (C:\Users\em08p\Downloads\bot\index.js:62:14)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Emitted 'error' event on Client instance at:
at emitUnhandledRejectionOrErr (node:events:402:10)
at process.processTicksAndRejections (node:internal/process/task_queues:84:21) {
code: 'ColorConvert'
}
throw er; // Unhandled 'error' event
^

TypeError [ColorConvert]: Unable to convert color to a number.
at resolveColor (C:\Users\em08p\Downloads\bot\node_modules\discord.js\src\util\Util.js:260:63)
at EmbedBuilder.setColor (C:\Users\em08p\Downloads\bot\node_modules\discord.js\src\structures\EmbedBuilder.js:23:36)
at Client.<anonymous> (C:\Users\em08p\Downloads\bot\index.js:62:14)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
Emitted 'error' event on Client instance at:
at emitUnhandledRejectionOrErr (node:events:402:10)
at process.processTicksAndRejections (node:internal/process/task_queues:84:21) {
code: 'ColorConvert'
}
once running a command with an embed
6 replies
DIAdiscord.js - Imagine an app
Created by . on 5/21/2024 in #djs-questions
Reconstruction
I had a bot designed for me back then that used Discord.js, Noblox.js, mongoose and fs and now most of the things don't work like they used to. I believe this was because node js and stuff was updated through the years, because this was made in 2022. I don't remember the versions that this was before. Is there anything I could do to make it work again? I could provide code. It used to work back then perfectly though.
2 replies