💡 Added comments
This commit is contained in:
parent
26f9420f67
commit
b795d00d17
2 changed files with 2 additions and 0 deletions
|
@ -6,6 +6,7 @@ import guildSchema from "../../../../../models/guild";
|
||||||
import shopRoleSchema from "../../../../../models/shopRole";
|
import shopRoleSchema from "../../../../../models/shopRole";
|
||||||
import userSchema from "../../../../../models/user";
|
import userSchema from "../../../../../models/user";
|
||||||
|
|
||||||
|
// Execute the component
|
||||||
export const execute = async (client: Client, role: IShopRole) => {
|
export const execute = async (client: Client, role: IShopRole) => {
|
||||||
const { guildId, userId, roleId } = role;
|
const { guildId, userId, roleId } = role;
|
||||||
if (!userId) throw new Error("User ID not found for shop role.");
|
if (!userId) throw new Error("User ID not found for shop role.");
|
||||||
|
|
|
@ -8,6 +8,7 @@ export const options = {
|
||||||
schedule: "*/30 * * * *", // https://crontab.guru/
|
schedule: "*/30 * * * *", // https://crontab.guru/
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// Execute the job
|
||||||
export const execute = async () => {
|
export const execute = async () => {
|
||||||
const timeouts = await timeoutSchema.find();
|
const timeouts = await timeoutSchema.find();
|
||||||
await Promise.all(
|
await Promise.all(
|
||||||
|
|
Loading…
Add table
Reference in a new issue