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 { Guild as GuildPrisma, User as UserPrisma } from '@prisma/client';
|
||||||
import emoji from '../../../assets/emoji.json' assert { type: 'json' };
|
import emoji from '../../../assets/emoji.json' assert { type: 'json' };
|
||||||
import { log } from '@lib/log';
|
import { log } from '@lib/log';
|
||||||
|
import { isBuyer } from '@lib/perm.js';
|
||||||
|
|
||||||
export default {
|
export default {
|
||||||
data: new SlashCommandBuilder()
|
data: new SlashCommandBuilder()
|
||||||
|
|
@ -182,7 +183,7 @@ export default {
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
case 'list':
|
case 'list':
|
||||||
if (!userData.isBuyer) {
|
if (!await isBuyer(interaction.user.id)) {
|
||||||
await interaction.reply({
|
await interaction.reply({
|
||||||
content: `${emoji.answer.no} | This command is only for buyer`,
|
content: `${emoji.answer.no} | This command is only for buyer`,
|
||||||
flags: MessageFlags.Ephemeral,
|
flags: MessageFlags.Ephemeral,
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue