I want to add info to database and I'm getting the "This interaction failed" error in discord
Using better-sqlite3, discord.js v13
For the code, I've used bits and pieces of tutorials and guides from around the internet and I think some of that may have interfered with what's already been written
const { MessageActionRow, MessageButton, MessageEmbed } = require('discord.js');
const db = require("better-sqlite3")("../../main.db")
module.exports = {
name: 'test',
description: "test buy",
options: [
{
name: 'buy',
description: 'ซื้อสคริป',
type: "SUB_COMMAND",
options: [
{
name: "link",
description: "ลิ้งซองเงิน 99 บาท",
type: "STRING",
required: true,
}
]
},
],
run: async(client, interaction, args) => {
if (interaction.options.getSubcommand() === 'buy') {
const button = new MessageActionRow()
.addComponents(
new MessageButton()
.setCustomId('confirm')
.setLabel('c')
.setStyle('SUCCESS'),
new MessageButton()
.setCustomId('cancel')
.setLabel('b')
.setStyle('DANGER'),
new MessageButton()
.setURL('https://www.youtube.com/')
.setLabel('a')
.setStyle('LINK'),
);
const embed = new MessageEmbed()
.setColor('#FF0000')
.setTitle('ShuShi')
.setDescription('info')
await interaction.reply({ephemeral: true, embeds: [embed], components: [button] });
const filter = i => i.user.id === interaction.member.id;
const collector = interaction.channel.createMessageComponentCollector({
filter,
time: 600000,
max: 1
});
collector.on('collect', async i => {
collector.stop();
if (i.customId === 'confirm') {
db.prepare(`INSERT INTO discorddata VALUES(:id,:own)`).run({
id: interaction.user.id,
own: 'true'
})
}
})
}
}}
Related
Wassup people. I am working on some admin commands. At this moment it's going to be a kick command. But it's only giving errors. If you remove a line or change anything, it will infect the code in another place.
That's what I am struggling with.
Here's my code:
const { Client, Intents } = require("discord.js");
const discord = require("discord.js");
const { MessageEmbed, Collection, Permissions } = require("discord.js");
module.exports = {
name: "kick",
description: "Kicks a specific member",
admin: true,
usage: "[Target] [Reason] [Messages]",
options: [
{
name: "Target",
description: "Provide A User To Kick.",
type: "USER",
required: true,
},
{
name: "Reason",
description: "Provide A Reason For The Kick.",
type: "STRING",
required: true,
},
],
async execute(message, args, client) {
const target = message.mentions.members.first();
const reason = args.slice(1, args.length - 1).join(" ");
console.log("Target: ");
const embed = new MessageEmbed().setTitle("There seems to be a error to execute this command").setColor("RED").setDescription("Are you sure you got the right permission? And are you providing a reason?");
if (!message.member.permissions.has(Permissions.FLAGS.KICK_MEMBERS))
return message.reply({ embeds: [embed] }).catch((err) => {
console.log(err);
});
if (target.id === message.member.id)
return message.reply({
embeds: [new MessageEmbed().setTitle("There seems to be a error to execute this command").setColor("RED").setDescription("Why would you kick yourself?")],
ephemeral: true,
});
if (target.permissions.has(Permissions.FLAGS.KICK_MEMBERS)) {
return message.reply({
embeds: [new MessageEmbed().setColor("RED").setDescription("You can't kick this person.")],
});
}
const DMEmbed = new MessageEmbed().setTitle(`You've Been Kicked From ${message.guild.name}`).setColor("RED").setTimestamp().addFields(
{
name: "Reason:",
value: reason,
},
{
name: "Kicked By:",
value: message.member.user.toString(),
}
);
await target
.send({
embeds: [DMEmbed],
})
.catch((err) => {
console.log(err);
});
},
};
From what I can see, it is most likely the reason field being empty.
You can change it to this to ensure there is a fallback!
{
name: "Reason:",
value: reason.replace(/\s/g, '') == "" ? "Not Provided" : reason,
},
I have been getting an error as mentioned in the title. Whenever I use that command, the bot creates a channel that brings up a select menu, through which the user can "teleport" to another channel while deleting the newly created channel in the process. This code successfully works twice, after which it gives the error. What should be done to fix the error so that the user can use the command as many times as they'd like? I'll work on this code further once the solution is found, but until then, I'm really stumped here. (Questions shall be answered upon questioning; apologies for the messy coding)
module.exports.run = async (client, msg, args) => {
const guild = client.guilds.cache.get('855845132879921214')
const channel = guild.channels.cache.get('959851265456734319')
const newChannel = await msg.guild.channels.create(`teleporter`)
await newChannel.permissionOverwrites.edit(msg.author.id, {
SEND_MESSAGES: false,
VIEW_CHANNEL: true,
})
const {MessageActionRow, MessageSelectMenu, MessageEmbed} = require('discord.js')
const embed = new MessageEmbed()
.setTitle(`Teleporter!`)
.setDescription("Through this interaction, you can now teleport to the main channel of the desired category!")
const row = new MessageActionRow()
.addComponents(
new MessageSelectMenu()
.setCustomId('teleport')
.setPlaceholder('Choose a channel')
.addOptions([
{
label: 'Rules',
description: "Click to check the rules",
value: 'rules',
},
{
label: 'General',
description: "Click to go to the main chat",
value: 'general',
},
{
label: 'Media',
description: "Click to go to media channel",
value: 'media',
},
{
label: 'Bots',
description: "Click to go to the bots channel",
value: 'bots',
}
]),
)
await newChannel.send({content: `<#${msg.author.id}>`,embeds: [embed], components: [row]})
const wait = require('util').promisify
client.on('interactionCreate', async interaction => {
const member = await interaction.guild.members.fetch({
user: interaction.user.id,
force: true
})
if(!interaction.isSelectMenu()) {
interaction.deferUpdate()}
else if (interaction.values == 'general'){
msg.member.roles.add('958421069650337822')
msg.member.roles.remove('943159431800172584')
let tele = msg.guild.channels.cache.find(channel => channel.name == 'teleporter')
tele.delete()
msg.member.roles.add('943159431800172584')
msg.member.roles.remove('958421069650337822')
}
}
)
}
Don't cache.find and delete, do it like;
const newChannel = await client.channels.fetch("id")
newChannel.delete()
This code should be separated with the first section as your command and the second part as a separate listener, so I have coded as such.
const {
MessageActionRow,
MessageSelectMenu,
MessageEmbed,
} = require('discord.js');
module.exports.run = async (client, msg, args) => {
const guild = client.guilds.cache.get('855845132879921214');
const channel = guild.channels.cache.get('959851265456734319');
const newChannel = await msg.guild.channels.create(`teleporter-${msg.author.username}`, {
permissionOverwrites: [{
id: guild.id,
deny: ["VIEW_CHANNEL"],
}, {
id: msg.author,
deny: ["SEND_MESSAGES"],
allow: ["VIEW_CHANNEL"],
}],
});
// In the event that more than one person uses this command at once, you will need to be able to tell the diffrence when you look up the channel later. So I added the username to the channel name.
const embed = new MessageEmbed()
.setTitle(`Teleporter!`)
.setDescription("Through this interaction, you can now teleport to the main channel of the desired category!");
const row = new MessageActionRow()
.addComponents(
new MessageSelectMenu()
.setCustomId('teleport')
.setPlaceholder('Choose a channel')
.addOptions([{
label: 'Rules',
description: "Click to check the rules",
value: 'rules',
}, {
label: 'General',
description: "Click to go to the main chat",
value: 'general',
}, {
label: 'Media',
description: "Click to go to media channel",
value: 'media',
}, {
label: 'Bots',
description: "Click to go to the bots channel",
value: 'bots',
}]),
);
await newChannel.send({
content: `${msg.author}`,
embeds: [embed],
components: [row],
});
};
This section would go either in the main bot.js file, or if you have your events in seperate files, it would go in the interactionCreate file (may need to be changed a bit if you don't have one, let me know)
const wait = require('util').promisify;
client.on('interactionCreate', async interaction => {
const member = interaction.member;
const guild = interaction.guild;
if (interaction.isSelectMenu()) {
const menuName = interaction.customId;
interaction.deferUpdate();
if (menuName === 'teleport') {
const tele = guild.channels.cache.find(channel => channel.name == `teleporter-${member.user.username}`);
// lookup the channel using the previously mentioned channel name setup
const choice = interaction.value;
if (choice === 'general') {
member.roles.add('958421069650337822');
member.roles.remove('943159431800172584');
} else if (choice === 'rules') {
member.roles.add('roleID');
member.roles.remove('roleID');
} else if (choice === 'media') {
member.roles.add('roleID');
member.roles.remove('roleID');
} else if (choice === 'bots') {
member.roles.add('roleID');
member.roles.remove('roleID');
}
tele.delete();
}
}
});
I am making a tickets bot.
When I try click of any of the embeds, it will run the code and create a new channel, then continue to ping me in it like I wanted, but then shows this error.
DiscordAPIError: Invalid Form Body
components[0].components[1].emoji.name: Invalid emoji
at RequestHandler.execute (C:\Users\wrigh\Documents\Discord Bots\Practice Bot - Copy\node_modules\discord.js\src\rest\RequestHandler.js:350:13)
at processTicksAndRejections (node:internal/process/task_queues:96:5)
at async RequestHandler.push (C:\Users\wrigh\Documents\Discord Bots\Practice Bot - Copy\node_modules\discord.js\src\rest\RequestHandler.js:51:14)
at async TextChannel.send (C:\Users\wrigh\Documents\Discord Bots\Practice Bot - Copy\node_modules\discord.js\src\structures\interfaces\TextBasedChannel.js:175:15)
The full error is here (sorry for link wouldn't let me post full error) :
https://sourceb.in/dOCoUtAQVx
The code is here:
const { ButtonInteraction, MessageEmbed, MessageActionRow, MessageButton } = require("discord.js");
const DB = require("../../Structures/Handlers/Schemas/Ticket");
const { PARENTID, EVERYONEID } = require("../../Structures/config.json");
const Ticket = require("../../Structures/Handlers/Schemas/Ticket");
module.exports = {
name: "interactionCreate",
/**
*
* #param {ButtonInteraction} interaction
*/
async execute(interaction) {
if(!interaction.isButton()) return;
const { guild, member, customId } = interaction;
if (!["player", "bug", "other"].includes(customId)) return;
const ID = Math.floor(Math.random() * 90000) + 10000;
await guild.channels
.create(`${customId + "-" + ID}`, {
type: "GUILD_TEXT",
parent: PARENTID,
permissionOverwrites: [
{
id: member.id,
allow: ["SEND_MESSAGES", "VIEW_CHANNEL", "READ_MESSAGE_HISTORY"],
},
{
id: EVERYONEID,
deny: ["SEND_MESSAGES", "VIEW_CHANNEL", "READ_MESSAGE_HISTORY"],
},
],
})
.then(async (channel) => {
await DB.create({
GuildID: guild.id,
MemberID: member.id,
TicketID: ID,
ChannelID: channel.id,
Closed: false,
Locked: false,
type: customId,
});
const Embed = new MessageEmbed()
.setAuthor(
`${guild.name} | Ticket: ${ID}`,
guild.iconURL({ dynamic: true })
)
.setDescription(
"Please wait patiently for a response from the Staff team, in the mean while, describe your issue in as much detail."
)
.setFooter("The buttons below are staff only buttons.");
const Buttons = new MessageActionRow();
Buttons.addComponents(
new MessageButton()
.setCustomId("close")
.setLabel("Save and close")
.setStyle("PRIMARY")
.setEmoji("📂"),
new MessageButton()
.setCustomId("lock")
.setLabel("lock")
.setStyle("SECONDARY")
.setEmoji("'🔒"),
new MessageButton()
.setCustomId("unlock")
.setLabel("unlock")
.setStyle("SUCCESS")
.setEmoji("❤"),
);
channel.send({
embeds: [Embed],
components: [Buttons],
});
await channel
.send({ content: `${member} here is your ticket` })
.then((m) => {
setTimeout(() => {});
}, 1 * 5000);
})
interaction.reply({
content: `${member} your ticket has been created: ${channel}`,
});
},
};
```js
I'm still learning JavaScript so please bear with me if I don't get it straight away, I will try my best.
You have an extra character in your lock button. It should be .setEmoji("🔒"), not .setEmoji("'🔒"). That's what the error is telling you: "Invalid Emoji" (because '{lock} isn't an emoji)
This is my code for a webhook discord alert bot. I used discord.js and the channel's webhooks. I used readline-sync for the input at the console but when I iterate through the answer at console to determine the embed colour, all signals show yellow from the last iteration for some reason.
const { MessageEmbed, WebhookClient } = require('discord.js');
const readline = require('readline-sync')
const webhookClient = new WebhookClient({ id: '', token: '' });
var signal = readline.question("Signal: ")
if (signal.content === "SELL")
{
const embed = new MessageEmbed()
.setTitle(signal)
.setColor('RED')
.setFooter({
text: "test"
})
webhookClient.send({
content: 'Webhook test',
username: "Logan's Signals",
avatarURL: 'https://i.imgur.com/AfFp7pu.png',
embeds: [embed],
});
}
else if (signal.content === "BUY")
{
const embed = new MessageEmbed()
.setTitle(signal)
.setColor('GREEN')
.setFooter({
text: "test"
})
webhookClient.send({
content: 'Webhook test',
username: "Logan's Signals",
avatarURL: 'https://i.imgur.com/AfFp7pu.png',
embeds: [embed],
});
}
else
{
const embed = new MessageEmbed()
.setTitle(signal)
.setColor('YELLOW')
.setFooter({
text: "test"
})
webhookClient.send({
content: 'Webhook test',
username: "Logan's Signals",
avatarURL: 'https://i.imgur.com/AfFp7pu.png',
embeds: [embed],
});
}
So I wanted to make a help embed in a channel, but when I started running it, it didn't work as I thought... I've looked at it, but I can't find any problems with it..
If there is someone that can help me, please do so.
I know this code is a little weird.
Packages I'm using:
#discordjs/rest 0.1.0-canary.0,
discord-api-types 0.22.0,
discord-buttons 4.0.0,
discord.js 13.1.0
i 0.3.6
npm 7.21.1
Here is the error I get when I use, node .
C:\Users\emilb\OneDrive\Desktop\Carly Support Center\node_modules\discord-buttons\src\v12\Classes\APIMessage.js:9
class sendAPICallback extends dAPIMessage {
^
TypeError: Class extends value undefined is not a constructor or null
at Object.<anonymous> (C:\Users\emilb\OneDrive\Desktop\Carly Support Center\node_modules\discord-buttons\src\v12\Classes\APIMessage.js:9:31)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
at Module.load (node:internal/modules/cjs/loader:981:32)
at Function.Module._load (node:internal/modules/cjs/loader:822:12)
at Module.require (node:internal/modules/cjs/loader:1005:19)
at require (node:internal/modules/cjs/helpers:94:18)
at Object.<anonymous> (C:\Users\emilb\OneDrive\Desktop\Carly Support Center\node_modules\discord-buttons\src\v12\Classes\WebhookClient.js:2:20)
at Module._compile (node:internal/modules/cjs/loader:1101:14)
at Object.Module._extensions..js (node:internal/modules/cjs/loader:1153:10)
Here is the index.js
const { Client, Intents, MessageActionRow, MessageButton } = require('discord.js');
const client = new Client({ intents: [Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES] });
//Importing Rest & api-types
const { REST } = require('#discordjs/rest')
const { Routes } = require('discord-api-types/v9')
//Loading Config
const config = require('./config.json');
const { default: discordButtons } = require('discord-buttons');
console.log('Config Loaded')
var owners = config.owners
//Ready Event
client.on('ready', async () => {
console.log(`${client.user.tag} is Ready!`)
client.user.setPresence({
status: "online",
activities: [{
name: config.status,
type: "LISTENING",
}]
})
//Registering Slash
if (config.enable_slash) {
const rest = new REST({ version: '9' }).setToken(config.token)
const commands = [{
name: 'create',
description: 'Replies with Help Embed!'
}]
try {
console.log('Started refreshing application (/) commands.')
await rest.put(
Routes.applicationCommands(client.user.id),
{ body: commands },
);
console.log('Successfully reloaded application (/) commands.')
}
catch (error) {
console.error(error)
}
}
})
/**
* #author Emiluvik#8447 <https://github.com/Emiluvik>
*/
client.on("interactionCreate", async (interaction) => {
var SupportEmbed =
{
author: { name: config.embed_content.title, icon_url: client.user.displayAvatarURL({ size: 2048, dynamic: false, format:"png"}) },
timestamp: new Date(),
color: `0x${config.embed_content.color}`,
thumbnail: { url: config.thumbnail ? config.thumbnail_url : client.user.displayAvatarURL({ size: 2048, format: "png", dynamic: false}) },
description: `\u200b\n1️⃣ ${config.embed_content.question_1}\n\u200b\n2️⃣ ${config.embed_content.question_2}\n\u200b\n3️⃣ ${config.embed_content.question_3}\n\u200b\n4️⃣ ${config.embed_content.question_4}\n\u200b\n5️⃣ ${config.embed_content.question_5}\n\u200b\n> **None Of The Above**\nIf Your Question is not in the Above List.(Further Assistance)\n\u200b\n`,
footer:{
text: interaction.guild.name
}
}
let button1 = new MessageButton()
.setStyle("SECONDARY")
.setEmoji("1️⃣")
.setCustomId("button_one")
let button2 = new MessageButton()
.setEmoji("2️⃣")
.setStyle("SECONDARY")
.setCustomId("button_two")
let button3 = new MessageButton()
.setEmoji("3️⃣")
.setStyle("SECONDARY")
.setCustomId("button_three")
let button4 = new MessageButton()
.setEmoji("4️⃣")
.setStyle("SECONDARY")
.setCustomId("button_four")
let button5 = new MessageButton()
.setEmoji("5️⃣")
.setStyle("SECONDARY")
.setCustomId("button_five")
let button6 = new MessageButton()
.setLabel("None Of The Above")
.setStyle("SUCCESS")
//.setEmoji("🤷🏻♂️")
.setCustomId("none_of_the_above")
let buttonRow1 = new MessageActionRow()
.addComponents([button1, button2, button3, button4, button5])
let buttonRow2 = new MessageActionRow()
.addComponents([button6])
if (interaction.isCommand()) {
if (!owners.includes(interaction.user.id)) {
await interaction.reply({ content: "You aren\'t Authorized To use This Command!", ephemeral: true })
}
await interaction.reply({ embeds: [SupportEmbed], components: [buttonRow1, buttonRow2] })
}
else if (interaction.isButton()) {
let responseembed =
{
author:{ name: config.title, icon_url: config.thumbnail ? config.thumbnail_url : client.user.displayAvatarURL({ size: 2048, format: "png", dynamic: false}) },
color: `0x${config.embed_content.color}`,
description: null,
timestamp: new Date(),
footer:{
text: interaction.guild.name
}
}
const logchannel = interaction.guild.channels.cache.get(config.log_channel_id)
if (interaction.customId === "button_one") {
responseembed.description = `\u200b\n**${config.responses.response_1}**\n\u200b\n`
logchannel.send(`> **${interaction.user.username + "#" + interaction.user.discriminator}**(${interaction.user.id}) Used ${interaction.customId}\nTimeStamp: ${new Date()}`)
// let invitecutie = new MessageButton()
// .setLabel("Invite Link")
// .setStyle("url")
// .setURL("Link")
// let buttonRow = new MessageActionRow()
// .addComponent(invitecutie)
//!If You Want Button in the Response remove // from the the Above 6 lines
return interaction.reply({ embeds: [responseembed], ephemeral: true })//If you want to send link button add ,component: buttonRow after the ephermeral: true declaration
}
if (interaction.customId === "button_two") {
responseembed.description = `**${config.responses.response_2}**\n\u200b\n`
logchannel.send(`> **${interaction.user.username + "#" + interaction.user.discriminator}**(${interaction.user.id}) Used ${interaction.customId}\nTimeStamp: ${new Date()}`)
return interaction.reply({ embeds: [responseembed], ephemeral: true })
}
if (interaction.customId === "button_three") {
responseembed.description = `**${config.responses.response_3}**`
logchannel.send(`> **${interaction.user.username + "#" + interaction.user.discriminator}**(${interaction.user.id}) Used ${interaction.customId}\nTimeStamp: ${new Date()}`)
return interaction.reply({ embeds: [responseembed], ephemeral: true })
}
if (interaction.customId === "button_four") {
responseembed.description = `**${config.responses.response_4}**`
logchannel.send(`> **${interaction.user.username + "#" + interaction.user.discriminator}**(${interaction.user.id}) Used ${interaction.customId}\nTimeStamp: ${new Date()}`)
return interaction.reply({ embeds: [responseembed], ephemeral: true })
}
if (interaction.customId === "button_five") {
responseembed.description = `**${config.responses.response_5}**`
logchannel.send(`> **${interaction.user.username + "#" + interaction.user.discriminator}**(${interaction.user.id}) Used ${interaction.customId}\nTimeStamp: ${new Date()}`)
return interaction.reply({ embeds: [responseembed], ephemeral: true })
}
if (interaction.customId === "none_of_the_above") {
responseembed.description = `**Go to <#${config.assistance_channel_id}> Channel and ask Your Questions.**`
interaction.guild.members.cache.get(interaction.user.id).roles.add('856799419402813440')
interaction.guild.channels.cache.get(config.assistance_channel_id).send(`<#${interaction.user.id}> Here you can Ask your Further Questions.`)
logchannel.send(`> **${interaction.user.username + "#" + interaction.user.discriminator}**(${interaction.user.id}) Used ${interaction.customId}\nTimeStamp: ${new Date()}`)
return interaction.reply({ embeds: [responseembed], ephemeral: true })
}
}
})
client.on("messageCreate", async (msg) => {
if (msg.author.bot) return
if (msg.channel.type === "dm") return
if (!owners.includes(msg.author.id)) return
if (msg.content !== `${config.prefix}create`) return
if (msg.content = `${config.prefix}create`) {
await msg.delete().catch(() => {})
let button1 = new MessageButton()
.setStyle("SECONDARY")
.setEmoji("1️⃣")
.setCustomId("button_one")
let button2 = new MessageButton()
.setEmoji("2️⃣")
.setStyle("SECONDARY")
.setCustomId("button_two")
let button3 = new MessageButton()
.setEmoji("3️⃣")
.setStyle("SECONDARY")
.setCustomId("button_three")
let button4 = new MessageButton()
.setEmoji("4️⃣")
.setStyle("SECONDARY")
.setCustomId("button_four")
let button5 = new MessageButton()
.setEmoji("5️⃣")
.setStyle("SECONDARY")
.setCustomId("button_five")
let button6 = new MessageButton()
.setLabel("None Of The Above")
.setStyle("SUCCESS")
//.setEmoji("🤷🏻♂️")
.setCustomId("none_of_the_above")
let buttonRow1 = new MessageActionRow()
.addComponents([button1, button2, button3, button4, button5])
let buttonRow2 = new MessageActionRow()
.addComponents([button6])
const supportembed = {
author: { name: config.embed_content.title, icon_url: client.user.displayAvatarURL({ size: 2048, dynamic: false, format:"png"}) },
timestamp: new Date(),
color: `0x${config.embed_content.color}`,
thumbnail: { url: config.thumbnail ? config.thumbnail_url : client.user.displayAvatarURL({ size: 2048, format: "png", dynamic: false}) },
description: `\u200b\n1️⃣ ${config.embed_content.question_1}\n\u200b\n2️⃣ ${config.embed_content.question_2}\n\u200b\n3️⃣ ${config.embed_content.question_3}\n\u200b\n4️⃣ ${config.embed_content.question_4}\n\u200b\n5️⃣ ${config.embed_content.question_5}\n\u200b\n> **None Of The Above**\nIf Your Question is not in the Above List.(Further Assistance)\n\u200b\n`,
footer:{
text: msg.guild.name
}
}
return msg.channel.send({ embeds: [supportembed], components: [buttonRow, buttonRow2] })
} else return
})
client.login(config.token).catch(() => console.log('Invalid Token.Make Sure To Fill config.json'))
And here is the config.json..
{
"token": "Token",
"status": "cs!help",
"prefix": "cs!",
"enable-slash": true,
"owners": ["468053162729799700"],
"embed_content": {
"title": "Carly Support",
"color": "FFA500",
"thumbnail": true,
"thumbnail_url": "profile.png",
"question_1": "How do I invite Carly?",
"question_2": "How do I setup Carly?",
"question_3": "Carly isn't responding",
"question_4": "How do I make a bug report?",
"question_5": "How do I suggest a command to Carly?"
},
"responses": {
"response_1": "If you type: [prefix]invite, Carly will you give an invite link!",
"response_2": "Carly is already set and done! If you wish to change the prefix\nto Carly, type ?prefix [prefix].",
"response_3": "If Carly isn't responding, it is because, the MongoDb pass failed\nto connect, or it's because the bot is shutting down.",
"response_4": "If you join the (support center)[https://discord.gg/nB84Fn6VGd]\nyou can make a report a bug!",
"response_5": "If you join the (support center)[https://discord.gg/nB84Fn6VGd]\nyou can make a suggestion!"
},
"log_channel_id": "880869600298954802",
"assistance_channel_id": "880869600298954802",
"assistance_role_id": "880870840030351520"
}
I've tried to install diferent npm packages, but it still wouldn't work.
So here I am asking for help.
The discord-buttons library currently only supports v12 of Discord.js and relies on a class from that lib that doesn't exist anymore in the latest version 13. There's also an issue to update the package to support v13 but it doesn't look like that's going to happen anytime soon. If you'd like to use the package, either downgrade your djs version to v12 or use something like patch-package to fix the problem yourself.
Hope this helps ;3