feat(commmands/administration): Update the log command's permission check to use the isOwner function

This commit is contained in:
Raphael 2025-11-15 00:34:43 +01:00 committed by Raphaël
parent 0c081a7ace
commit dde23bf13a

View file

@ -16,6 +16,7 @@ import {
import emoji from '../../../assets/emoji.json' assert { type: 'json' };
import { Guild, User } from '@prisma/client';
import { log } from '@lib/log';
import { isOwner } from '@lib/perm.js';
export default {
data: new SlashCommandBuilder()
@ -106,7 +107,7 @@ export default {
switch (choice) {
case 'logs_show': {
if (!userData.isOwner) {
if (!await isOwner(interaction.user.id)) {
await interaction.reply({
content: `${emoji.answer.no} | This command is only for owner`,
flags: MessageFlags.Ephemeral,
@ -143,7 +144,7 @@ export default {
return;
}
case 'logs_auto': {
if (!userData.isOwner) {
if (!await isOwner(interaction.user.id)) {
await interaction.reply({
content: `${emoji.answer.no} | This command is only for owner`,
flags: MessageFlags.Ephemeral,
@ -319,7 +320,7 @@ export default {
break;
}
case 'logs_disable': {
if (!userData.isOwner) {
if (!await isOwner(interaction.user.id)) {
await interaction.reply({
content: `${emoji.answer.no} | This command is only for owner`,
flags: MessageFlags.Ephemeral,