Error when creating Channel

Hi, I'm currently trying to do a support ticket bot. Sadly I'm getting the following problem HTTPError [TypeError] Do not know how to serialize a BigInt. My Code is
const ticketEmbed = new MessageEmbed()
.setColor("#7289da")
.setTitle(`${interaction.member.nickname}: ${ticketReason}`)
.addFields(
{ name: `${languagePath.ticket_explanation}`, value: `${ticketExplanation}` },
{ name: `${languagePath.ticket_additional}`, value: `${ticketOther}`}
)
.setFooter({ text: `${languagePath.credits}` });

interaction.guild.channels.create({
name: "ticket - " + interaction.member.nickname,
type: "GUILD_TEXT",
permissionOverwrites: [
{
id: interaction.guild.id,
deny: [Permissions.FLAGS.VIEW_CHANNEL],
},
{
id: interaction.member.id,
allow: [Permissions.FLAGS.VIEW_CHANNEL],
},
{
id: supportRoleID,
allow: [Permissions.FLAGS.VIEW_CHANNEL],
}
]
}).then( channel => {
channel.send({ embeds: [ticketEmbed]})
})
const ticketEmbed = new MessageEmbed()
.setColor("#7289da")
.setTitle(`${interaction.member.nickname}: ${ticketReason}`)
.addFields(
{ name: `${languagePath.ticket_explanation}`, value: `${ticketExplanation}` },
{ name: `${languagePath.ticket_additional}`, value: `${ticketOther}`}
)
.setFooter({ text: `${languagePath.credits}` });

interaction.guild.channels.create({
name: "ticket - " + interaction.member.nickname,
type: "GUILD_TEXT",
permissionOverwrites: [
{
id: interaction.guild.id,
deny: [Permissions.FLAGS.VIEW_CHANNEL],
},
{
id: interaction.member.id,
allow: [Permissions.FLAGS.VIEW_CHANNEL],
},
{
id: supportRoleID,
allow: [Permissions.FLAGS.VIEW_CHANNEL],
}
]
}).then( channel => {
channel.send({ embeds: [ticketEmbed]})
})
Also when I comment out the permissionOverwrites I get a different Error DiscordAPIError: Invalid Form Body, name: Could not interpret "{'name': 'ticket - null', 'type': 'GUILD_TEXT'}" as string.. I suppose that the options I set for the channel are somehow misinterpreted into strings, but why?
3 Replies
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Nils
NilsOP3y ago
Unknown User
Unknown User3y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server