feat(commmands/rank): Update the buyer command's permission check to use the isOwner function
This commit is contained in:
parent
5f89afda04
commit
e1abcd5b24
1 changed files with 2 additions and 1 deletions
|
|
@ -4,6 +4,7 @@ import { prisma } from '@lib/prisma';
|
|||
import { Guild as GuildPrisma, User as UserPrisma } from '@prisma/client';
|
||||
import emoji from '../../../assets/emoji.json' assert { type: 'json' };
|
||||
import { log } from '@lib/log';
|
||||
import { isBuyer } from '@lib/perm.js';
|
||||
|
||||
export default {
|
||||
data: new SlashCommandBuilder()
|
||||
|
|
@ -182,7 +183,7 @@ export default {
|
|||
});
|
||||
return;
|
||||
case 'list':
|
||||
if (!userData.isBuyer) {
|
||||
if (!await isBuyer(interaction.user.id)) {
|
||||
await interaction.reply({
|
||||
content: `${emoji.answer.no} | This command is only for buyer`,
|
||||
flags: MessageFlags.Ephemeral,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue