Some refactoring and staging limbo command
This commit is contained in:
+2
-2
@@ -11,7 +11,7 @@ const roleService = new RoleService(client);
|
||||
client.once(Events.ClientReady, async (readyClient) => {
|
||||
// Initialize & validate
|
||||
await commandService.init();
|
||||
roleService.validate();
|
||||
roleService.validate(client.guilds.cache);
|
||||
|
||||
// Ready!
|
||||
console.log(`Ready! Logged in as ${readyClient.user.tag}`);
|
||||
@@ -30,7 +30,7 @@ client.on("messageCreate", async (message) => {
|
||||
|
||||
Bun.cron("0 */6 * * *", async () => {
|
||||
for (const guild of client.guilds.cache.values()) {
|
||||
const lurkerRole = roleService.getRoleByName(guild, roleService.ROLES["LURKER"]);
|
||||
const lurkerRole = roleService.getRoleByName(guild, RoleService.ROLES["LURKER"]?.name);
|
||||
if (!lurkerRole) continue;
|
||||
|
||||
await guild.members.prune({ days: 5, roles: [lurkerRole] });
|
||||
|
||||
Reference in New Issue
Block a user