Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- // Perms zodat iedereen niets kan lezen.
- // LET OP het is nu PascalCase i.p.v. snake_case ook NIET camelCase.
- createdchan.permissionOverwrites.edit(interaction.guild.roles.cache.find(x => x.name === "@everyone"), {
- SendMessages: false,
- ViewChannel: false
- // SEND_MESSAGES: false,
- // VIEW_CHANNEL: false
- });
- // Perms zodat de gebruiker die het command heeft getypt alles kan zien van zijn ticket.
- createdchan.permissionOverwrites.edit(interaction.user.id, {
- CreateInstantInvite: false,
- ReadMessageHistory: true,
- SendMessages: true,
- AttachFiles: true,
- Connect: true,
- AddReactions: true,
- ViewChannel: true
- });
- // Perms zodat de gebruikers die een bepaalde rol hebben alles kan zien van zijn ticket.
- createdchan.permissionOverwrites.edit(interaction.guild.roles.cache.find(x => x.name === "TBG"), {
- CreateInstantInvite: false,
- ReadMessageHistory: true,
- SendMessages: true,
- AttachFiles: true,
- Connect: true,
- AddReactions: true,
- ViewChannel: true
- });
- var embed = new EmbedBuilder()
- .setTitle("Ticket " + interaction.channel.name + " gesloten")
- .setDescription("Het ticket is gesloten")
- .setTimestamp();
- var ticketChannel = interaction.member.guild.channels.cache.find(channel => channel.name === "log");
- if (!ticketChannel) interaction.reply({ content: "Kanaal bestaat niet!" });
- ticketChannel.send({ embeds: [embed] });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement