Skip to content

Commit

Permalink
allow contributors to upload files to tickets
Browse files Browse the repository at this point in the history
  • Loading branch information
danieldietzler committed Dec 15, 2023
1 parent fc4babc commit 490aa95
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/events/helpTicket/helpticket.ts
Original file line number Diff line number Diff line change
Expand Up @@ -194,8 +194,10 @@ export class HelpTicket {
content: `This command can only be invoked in <#${Constants.Channels.HelpDesk}> tickets.`,
});
}
const members = interaction.guild?.members.cache;
const isContributor = members?.get(interaction.user.id)?.roles.cache.has(Constants.Roles.Contributor);

if (channel.ownerId !== interaction.user.id) {
if (channel.ownerId !== interaction.user.id && !isContributor) {
return interaction.reply({ ephemeral: true, content: 'Only the OP can add files to this thread.' });
}

Expand Down

0 comments on commit 490aa95

Please sign in to comment.