🚨 Fixed more code smells (JS-D1001)

This commit is contained in:
Axel Olausson Holtenäs 2022-10-21 20:24:05 +02:00
parent f34cf8dd91
commit 426eb7a85c
7 changed files with 9 additions and 0 deletions

View file

@ -8,6 +8,7 @@ export const options: IEventOptions = {
type: "on",
};
// Execute the function
export const execute = async (guild: Guild) => {
const { client } = guild;

View file

@ -9,6 +9,7 @@ export const options: IEventOptions = {
type: "on",
};
// Execute the function
export const execute = async (guild: Guild) => {
const { client } = guild;

View file

@ -11,6 +11,7 @@ export const options: IEventOptions = {
type: "on",
};
// Execute the function
export const execute = async (member: GuildMember) => {
const { client, user, guild } = member;

View file

@ -11,6 +11,7 @@ export const options: IEventOptions = {
type: "on",
};
// Execute the function
export const execute = async (member: GuildMember) => {
const { client, user, guild } = member;

View file

@ -11,6 +11,7 @@ export const options: IEventOptions = {
type: "once",
};
// Execute the event
export const execute = async (client: Client) => {
logger.info("Discord's API client is ready!");

View file

@ -4,6 +4,7 @@ import addSeconds from "../../helpers/addSeconds";
import logger from "../../middlewares/logger";
import prisma from "../database";
// Command cooldown
export const command = async (i: CommandInteraction, cooldown: number) => {
const { guild, user, commandId } = i;
@ -94,6 +95,7 @@ export const command = async (i: CommandInteraction, cooldown: number) => {
logger.silly(createCooldown);
};
// Button cooldown
export const button = async (i: ButtonInteraction, cooldown: number) => {
const { guild, user, customId } = i;
@ -184,6 +186,7 @@ export const button = async (i: ButtonInteraction, cooldown: number) => {
logger.silly(createCooldown);
};
// Message cooldown
export const message = async (msg: Message, cooldown: number, id: string) => {
const { guild, member } = msg;

View file

@ -7,6 +7,7 @@ export const options = {
schedule: "*/5 * * * *", // https://crontab.guru/
};
// Execute the function
export const execute = async (client: Client) => {
await RolesExecute(client);
};