🚨 Fixed more code smells (JS-D1001)
This commit is contained in:
parent
f34cf8dd91
commit
426eb7a85c
7 changed files with 9 additions and 0 deletions
|
@ -8,6 +8,7 @@ export const options: IEventOptions = {
|
|||
type: "on",
|
||||
};
|
||||
|
||||
// Execute the function
|
||||
export const execute = async (guild: Guild) => {
|
||||
const { client } = guild;
|
||||
|
||||
|
|
|
@ -9,6 +9,7 @@ export const options: IEventOptions = {
|
|||
type: "on",
|
||||
};
|
||||
|
||||
// Execute the function
|
||||
export const execute = async (guild: Guild) => {
|
||||
const { client } = guild;
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ export const options: IEventOptions = {
|
|||
type: "on",
|
||||
};
|
||||
|
||||
// Execute the function
|
||||
export const execute = async (member: GuildMember) => {
|
||||
const { client, user, guild } = member;
|
||||
|
||||
|
|
|
@ -11,6 +11,7 @@ export const options: IEventOptions = {
|
|||
type: "on",
|
||||
};
|
||||
|
||||
// Execute the function
|
||||
export const execute = async (member: GuildMember) => {
|
||||
const { client, user, guild } = member;
|
||||
|
||||
|
|
|
@ -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!");
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ export const options = {
|
|||
schedule: "*/5 * * * *", // https://crontab.guru/
|
||||
};
|
||||
|
||||
// Execute the function
|
||||
export const execute = async (client: Client) => {
|
||||
await RolesExecute(client);
|
||||
};
|
||||
|
|
Loading…
Add table
Reference in a new issue