Miniontoby
Miniontoby
DIAdiscord.js - Imagine an app
Created by Miniontoby on 7/29/2024 in #djs-questions
create channel overrides adds to interaction.channel instead
When creating a channel with permissions overrides, it seems to add the overrides to the channel from where interaction Here is the code I used, but the perm overrides are added to the channel from where the interaction is made in...
const channel = await interaction.guild.channels.create({
name: `ticket-${interaction.user.username}`,
topic: `${channelTopic} for ${interaction.member}`,
type: ChannelType.GuildText,
parent: categoryChannel,
permissionOverwrites: [
{
id: interaction.member.id,
allow: GenerateTicketUserPerms(),
},
{
id: interaction.guild.id,
deny: [PermissionFlagsBits.SendMessages, PermissionFlagsBits.ViewChannel],
},
{
id: supportRole.id,
allow: [PermissionFlagsBits.SendMessages, PermissionFlagsBits.ViewChannel],
},
],
});
const channel = await interaction.guild.channels.create({
name: `ticket-${interaction.user.username}`,
topic: `${channelTopic} for ${interaction.member}`,
type: ChannelType.GuildText,
parent: categoryChannel,
permissionOverwrites: [
{
id: interaction.member.id,
allow: GenerateTicketUserPerms(),
},
{
id: interaction.guild.id,
deny: [PermissionFlagsBits.SendMessages, PermissionFlagsBits.ViewChannel],
},
{
id: supportRole.id,
allow: [PermissionFlagsBits.SendMessages, PermissionFlagsBits.ViewChannel],
},
],
});
4 replies
DIAdiscord.js - Imagine an app
Created by Miniontoby on 5/13/2023 in #djs-questions
Default selected channel
How to set/select the current/default channel in a ChannelSelectMenu? Or is this not possible at the moment?
3 replies
DIAdiscord.js - Imagine an app
Created by Miniontoby on 10/17/2022 in #djs-questions
Embed not working (since update)
TypeError: (intermediate value).setDescription(...).setAuthor(...).setThumbnail(...).setColor(...).addField is not a function
TypeError: (intermediate value).setDescription(...).setAuthor(...).setThumbnail(...).setColor(...).addField is not a function
With just
const weatherinfo = new EmbedBuilder()
.setDescription('The weather right now!')
.setAuthor({ name: `Weather Forecast For ${current.observationpoint}` })
.setThumbnail(current.imageUrl)
(...)
const weatherinfo = new EmbedBuilder()
.setDescription('The weather right now!')
.setAuthor({ name: `Weather Forecast For ${current.observationpoint}` })
.setThumbnail(current.imageUrl)
(...)
15 replies