Kirito.
Kirito.
DIAdiscord.js - Imagine an app
Created by Kirito. on 9/26/2023 in #djs-questions
Creation of a channel and adds a role to this channel
Same problem, it appears in the log, but not on the channel permissions, maybe a bug from discord because it works perfectly before and I haven't change anything edit : I have added the type for each permissionOverwrites and it works again 👍
13 replies
DIAdiscord.js - Imagine an app
Created by Kirito. on 9/26/2023 in #djs-questions
Creation of a channel and adds a role to this channel
Thank you
13 replies
DIAdiscord.js - Imagine an app
Created by Kirito. on 9/26/2023 in #djs-questions
Creation of a channel and adds a role to this channel
Yes why not, I will try
13 replies
DIAdiscord.js - Imagine an app
Created by Kirito. on 9/26/2023 in #djs-questions
Creation of a channel and adds a role to this channel
It's not a problem to put it inside permissionOverwrites if the roleId can be null ?
13 replies
DIAdiscord.js - Imagine an app
Created by Kirito. on 9/26/2023 in #djs-questions
Creation of a channel and adds a role to this channel
Sometimes it works, sometimes not
13 replies
DIAdiscord.js - Imagine an app
Created by Kirito. on 9/26/2023 in #djs-questions
Creation of a channel and adds a role to this channel
const ticketCreate = await guild.channels.create({
name: `${nameChannel.toLowerCase()}-${numberTicket}`,
type: 0,
parent: categoryDb,
permissionOverwrites:
[
{
id: guild.id,
deny: [PermissionsBitField.Flags.ViewChannel]
},
{
id: inter.user.id,
allow: [PermissionsBitField.Flags.ViewChannel, PermissionsBitField.Flags.SendMessages, PermissionsBitField.Flags.EmbedLinks, PermissionsBitField.Flags.AttachFiles]
},
{
id: this.client.user.id,
allow: [PermissionsBitField.Flags.ViewChannel, PermissionsBitField.Flags.SendMessages, PermissionsBitField.Flags.EmbedLinks, PermissionsBitField.Flags.AttachFiles]
}],
reason: `${this.event.translate(inter.user.id, 'eventTicketNewTicketReason').replace('{user}', user.displayName)}`
}).catch(() => null);

if (inter.guild.roles.cache.get(roleId)) await ticketCreate.permissionOverwrites.create(roleId, {
ViewChannel: true,
SendMessages: true,
EmbedLinks: true,
AttachFiles: true
}, {
type: 0
}).catch(() => null);
const ticketCreate = await guild.channels.create({
name: `${nameChannel.toLowerCase()}-${numberTicket}`,
type: 0,
parent: categoryDb,
permissionOverwrites:
[
{
id: guild.id,
deny: [PermissionsBitField.Flags.ViewChannel]
},
{
id: inter.user.id,
allow: [PermissionsBitField.Flags.ViewChannel, PermissionsBitField.Flags.SendMessages, PermissionsBitField.Flags.EmbedLinks, PermissionsBitField.Flags.AttachFiles]
},
{
id: this.client.user.id,
allow: [PermissionsBitField.Flags.ViewChannel, PermissionsBitField.Flags.SendMessages, PermissionsBitField.Flags.EmbedLinks, PermissionsBitField.Flags.AttachFiles]
}],
reason: `${this.event.translate(inter.user.id, 'eventTicketNewTicketReason').replace('{user}', user.displayName)}`
}).catch(() => null);

if (inter.guild.roles.cache.get(roleId)) await ticketCreate.permissionOverwrites.create(roleId, {
ViewChannel: true,
SendMessages: true,
EmbedLinks: true,
AttachFiles: true
}, {
type: 0
}).catch(() => null);
13 replies
DIAdiscord.js - Imagine an app
Created by Kirito. on 9/26/2023 in #djs-questions
Creation of a channel and adds a role to this channel
No description
13 replies
DIAdiscord.js - Imagine an app
Created by Kirito. on 2/1/2023 in #djs-questions
Cache after restart
Yes you're right thanks 👍
8 replies
DIAdiscord.js - Imagine an app
Created by Kirito. on 2/1/2023 in #djs-questions
Cache after restart
Okay thank you !
8 replies
DIAdiscord.js - Imagine an app
Created by Kirito. on 2/1/2023 in #djs-questions
Cache after restart
Any solutions to avoid that ?
8 replies