Skip to content

Commit

Permalink
Merge pull request #115 from BingusBoingus-Developer-Team/dev
Browse files Browse the repository at this point in the history
fix: hotfix caching error
  • Loading branch information
sanriodev authored Jul 23, 2024
2 parents 9a9b0d4 + 9842f19 commit a1006f6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/common/decoratos/role.decorator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ export function Role(requiredRole: CommandAccessLevel) {

descriptor.value = async function (...args) {
const interaction: CommandInteraction = args[0];
const roles = interaction.guild.roles.cache;
const roles = interaction.member.roles as any;
if (
!roles.has(requiredRole) &&
!roles?.cache?.has(requiredRole) &&
requiredRole !== CommandAccessLevel.member
) {
await interaction.reply({
Expand Down

0 comments on commit a1006f6

Please sign in to comment.