diff --git a/src/commands/config/modules/audits/index.ts b/src/commands/config/modules/audits/index.ts index a3d4c00..bc91291 100644 --- a/src/commands/config/modules/audits/index.ts +++ b/src/commands/config/modules/audits/index.ts @@ -33,7 +33,7 @@ export default { execute: async (interaction: ChatInputCommandInteraction) => { await deferReply(interaction, true); - await checkPermission(interaction, PermissionsBitField.Flags.ManageGuild); + checkPermission(interaction, PermissionsBitField.Flags.ManageGuild); const { guild, options } = interaction; const { successColor, footerText, footerIcon } = await getEmbedConfig( diff --git a/src/commands/config/modules/cpgg/index.ts b/src/commands/config/modules/cpgg/index.ts index b9ce119..56daed8 100644 --- a/src/commands/config/modules/cpgg/index.ts +++ b/src/commands/config/modules/cpgg/index.ts @@ -42,7 +42,7 @@ export default { execute: async (interaction: ChatInputCommandInteraction) => { await deferReply(interaction, true); - await checkPermission(interaction, PermissionsBitField.Flags.ManageGuild); + checkPermission(interaction, PermissionsBitField.Flags.ManageGuild); const { successColor, footerText, footerIcon } = await getEmbedConfig( interaction.guild diff --git a/src/commands/config/modules/credits/index.ts b/src/commands/config/modules/credits/index.ts index 7608bc9..70525f2 100644 --- a/src/commands/config/modules/credits/index.ts +++ b/src/commands/config/modules/credits/index.ts @@ -63,7 +63,7 @@ export default { execute: async (interaction: ChatInputCommandInteraction) => { await deferReply(interaction, true); - await checkPermission(interaction, PermissionsBitField.Flags.ManageGuild); + checkPermission(interaction, PermissionsBitField.Flags.ManageGuild); const { successColor, footerText, footerIcon } = await getEmbedConfig( interaction.guild diff --git a/src/commands/config/modules/embeds/index.ts b/src/commands/config/modules/embeds/index.ts index a9e1ae9..a4c8195 100644 --- a/src/commands/config/modules/embeds/index.ts +++ b/src/commands/config/modules/embeds/index.ts @@ -48,7 +48,7 @@ export default { execute: async (interaction: ChatInputCommandInteraction) => { await deferReply(interaction, true); - await checkPermission(interaction, PermissionsBitField.Flags.ManageGuild); + checkPermission(interaction, PermissionsBitField.Flags.ManageGuild); const { guild } = interaction; if (!guild) throw new Error("Guild not found"); diff --git a/src/commands/config/modules/points/index.ts b/src/commands/config/modules/points/index.ts index 7f89c8a..8761bbe 100644 --- a/src/commands/config/modules/points/index.ts +++ b/src/commands/config/modules/points/index.ts @@ -43,7 +43,7 @@ export default { execute: async (interaction: ChatInputCommandInteraction) => { await deferReply(interaction, true); - await checkPermission(interaction, PermissionsBitField.Flags.ManageGuild); + checkPermission(interaction, PermissionsBitField.Flags.ManageGuild); const { successColor, footerText, footerIcon } = await getEmbedConfig( interaction.guild diff --git a/src/commands/config/modules/shop/index.ts b/src/commands/config/modules/shop/index.ts index fd23ac1..577867b 100644 --- a/src/commands/config/modules/shop/index.ts +++ b/src/commands/config/modules/shop/index.ts @@ -31,7 +31,7 @@ export default { execute: async (interaction: ChatInputCommandInteraction) => { await deferReply(interaction, true); - await checkPermission(interaction, PermissionsBitField.Flags.ManageGuild); + checkPermission(interaction, PermissionsBitField.Flags.ManageGuild); const { successColor, footerText, footerIcon } = await getEmbedConfig( interaction.guild diff --git a/src/commands/config/modules/welcome/index.ts b/src/commands/config/modules/welcome/index.ts index 259a63f..0ac56e1 100644 --- a/src/commands/config/modules/welcome/index.ts +++ b/src/commands/config/modules/welcome/index.ts @@ -54,7 +54,7 @@ export default { execute: async (interaction: ChatInputCommandInteraction) => { await deferReply(interaction, true); - await checkPermission(interaction, PermissionsBitField.Flags.ManageGuild); + checkPermission(interaction, PermissionsBitField.Flags.ManageGuild); const { successColor, footerText, footerIcon } = await getEmbedConfig( interaction.guild diff --git a/src/commands/manage/modules/counters/modules/add/index.ts b/src/commands/manage/modules/counters/modules/add/index.ts index 13399bc..9c3dafe 100644 --- a/src/commands/manage/modules/counters/modules/add/index.ts +++ b/src/commands/manage/modules/counters/modules/add/index.ts @@ -41,7 +41,7 @@ export default { execute: async (interaction: ChatInputCommandInteraction) => { await deferReply(interaction, true); - await checkPermission(interaction, PermissionsBitField.Flags.ManageGuild); + checkPermission(interaction, PermissionsBitField.Flags.ManageGuild); const { successColor, footerText, footerIcon } = await getEmbedConfig( interaction.guild diff --git a/src/commands/manage/modules/counters/modules/remove/index.ts b/src/commands/manage/modules/counters/modules/remove/index.ts index dff0ec8..742ec9a 100644 --- a/src/commands/manage/modules/counters/modules/remove/index.ts +++ b/src/commands/manage/modules/counters/modules/remove/index.ts @@ -30,7 +30,7 @@ export default { execute: async (interaction: ChatInputCommandInteraction) => { await deferReply(interaction, true); - await checkPermission(interaction, PermissionsBitField.Flags.ManageGuild); + checkPermission(interaction, PermissionsBitField.Flags.ManageGuild); const { successColor, footerText, footerIcon } = await getEmbedConfig( interaction.guild diff --git a/src/commands/manage/modules/credits/modules/give/index.ts b/src/commands/manage/modules/credits/modules/give/index.ts index 28d7eeb..f2c070b 100644 --- a/src/commands/manage/modules/credits/modules/give/index.ts +++ b/src/commands/manage/modules/credits/modules/give/index.ts @@ -37,7 +37,7 @@ export default { execute: async (interaction: ChatInputCommandInteraction) => { await deferReply(interaction, true); - await checkPermission(interaction, PermissionsBitField.Flags.ManageGuild); + checkPermission(interaction, PermissionsBitField.Flags.ManageGuild); const { successColor, footerText, footerIcon } = await getEmbedConfig( interaction.guild diff --git a/src/commands/manage/modules/credits/modules/giveaway/index.ts b/src/commands/manage/modules/credits/modules/giveaway/index.ts index 3c2ea05..9a0518c 100644 --- a/src/commands/manage/modules/credits/modules/giveaway/index.ts +++ b/src/commands/manage/modules/credits/modules/giveaway/index.ts @@ -47,7 +47,7 @@ export default { execute: async (interaction: ChatInputCommandInteraction) => { await deferReply(interaction, true); - await checkPermission(interaction, PermissionsBitField.Flags.ManageGuild); + checkPermission(interaction, PermissionsBitField.Flags.ManageGuild); const { successColor, footerText, footerIcon } = await getEmbedConfig( interaction.guild diff --git a/src/commands/manage/modules/credits/modules/set/index.ts b/src/commands/manage/modules/credits/modules/set/index.ts index e8fe3cc..10dd37f 100644 --- a/src/commands/manage/modules/credits/modules/set/index.ts +++ b/src/commands/manage/modules/credits/modules/set/index.ts @@ -37,7 +37,7 @@ export default { execute: async (interaction: ChatInputCommandInteraction) => { await deferReply(interaction, true); - await checkPermission(interaction, PermissionsBitField.Flags.ManageGuild); + checkPermission(interaction, PermissionsBitField.Flags.ManageGuild); const { errorColor, successColor, footerText, footerIcon } = await getEmbedConfig(interaction.guild); diff --git a/src/commands/manage/modules/credits/modules/take/index.ts b/src/commands/manage/modules/credits/modules/take/index.ts index 8f55ad3..9e808af 100644 --- a/src/commands/manage/modules/credits/modules/take/index.ts +++ b/src/commands/manage/modules/credits/modules/take/index.ts @@ -38,7 +38,7 @@ export default { execute: async (interaction: ChatInputCommandInteraction) => { await deferReply(interaction, true); - await checkPermission(interaction, PermissionsBitField.Flags.ManageGuild); + checkPermission(interaction, PermissionsBitField.Flags.ManageGuild); const { errorColor, successColor, footerText, footerIcon } = await getEmbedConfig(interaction.guild); // Destructure diff --git a/src/commands/manage/modules/credits/modules/transfer/index.ts b/src/commands/manage/modules/credits/modules/transfer/index.ts index c75da60..6224ec4 100644 --- a/src/commands/manage/modules/credits/modules/transfer/index.ts +++ b/src/commands/manage/modules/credits/modules/transfer/index.ts @@ -40,7 +40,7 @@ export default { execute: async (interaction: ChatInputCommandInteraction) => { await deferReply(interaction, true); - await checkPermission(interaction, PermissionsBitField.Flags.ManageGuild); + checkPermission(interaction, PermissionsBitField.Flags.ManageGuild); const { successColor, footerText, footerIcon } = await getEmbedConfig( interaction.guild diff --git a/src/commands/moderation/modules/prune/index.ts b/src/commands/moderation/modules/prune/index.ts index 0245a33..3641d98 100644 --- a/src/commands/moderation/modules/prune/index.ts +++ b/src/commands/moderation/modules/prune/index.ts @@ -30,10 +30,7 @@ export default { execute: async (interaction: ChatInputCommandInteraction) => { await deferReply(interaction, false); - await checkPermission( - interaction, - PermissionsBitField.Flags.ManageMessages - ); + checkPermission(interaction, PermissionsBitField.Flags.ManageMessages); const { errorColor, footerText, footerIcon } = await getEmbedConfig( interaction.guild diff --git a/src/helpers/checkPermission/index.ts b/src/helpers/checkPermission/index.ts index 2de1162..a14c82d 100644 --- a/src/helpers/checkPermission/index.ts +++ b/src/helpers/checkPermission/index.ts @@ -1,6 +1,6 @@ import { BaseInteraction, PermissionResolvable } from "discord.js"; -export default async ( +export default ( interaction: BaseInteraction, permission: PermissionResolvable ) => { diff --git a/src/schedules/shop/modules/roles/components/dueForPayment.ts b/src/schedules/shop/modules/roles/components/dueForPayment.ts index f87c94c..ee2eb3f 100644 --- a/src/schedules/shop/modules/roles/components/dueForPayment.ts +++ b/src/schedules/shop/modules/roles/components/dueForPayment.ts @@ -3,7 +3,7 @@ import logger from "../../../../../middlewares/logger"; import { GuildShopRoles } from "@prisma/client"; -export const execute = async (_client: Client, role: GuildShopRoles) => { +export const execute = (_client: Client, role: GuildShopRoles) => { const { roleId } = role; logger.silly(`Shop role ${roleId} is not due for payment.`); diff --git a/src/schedules/shop/modules/roles/index.ts b/src/schedules/shop/modules/roles/index.ts index 6dea00e..6b863d0 100644 --- a/src/schedules/shop/modules/roles/index.ts +++ b/src/schedules/shop/modules/roles/index.ts @@ -15,7 +15,7 @@ export const execute = async (client: Client) => { const now = new Date(); if (nextPayment > now) { - await dueForPayment.execute(client, role); + dueForPayment.execute(client, role); return; }