authorgravatar for git@paperclover.netclover caruso <git@paperclover.net> 2021-01-13 09:03:33-05:00
committergravatar for git@paperclover.netclover caruso <git@paperclover.net> 2026-01-02 23:03:55-08:00
log619df698350e878a02ea0cad8cd2b2374b5ec3a2
treecaaa64ee3ddc062f92c9d662b0160be1caa8d982
parent1589bf2b740e0b92032d8209cb3cd11a09ea83cb
signaturelock-open Commit is signed but in an unrecognized format.

obvious fixes i'm too blind to see


1 files changed, 3 insertions(+), 1 deletions(-)

index.js+3-1
...@@ -41,6 +41,7 @@ const rateLimitCache2 = new Cache({...@@ -41,6 +41,7 @@ const rateLimitCache2 = new Cache({
4141
42async function cleanup(guild) {42async function cleanup(guild) {
43 clearTimeout(schedules[guild.id]);43 clearTimeout(schedules[guild.id]);
44 delete schedules[guild.id];
44 let n = 0;45 let n = 0;
45 const rolesToCheck = guild.roles.cache.filter(role => role.name.startsWith('#'));46 const rolesToCheck = guild.roles.cache.filter(role => role.name.startsWith('#'));
46 const allMembers = await guild.members.fetch();47 const allMembers = await guild.members.fetch();
...@@ -62,7 +63,7 @@ async function cleanup(guild) {...@@ -62,7 +63,7 @@ async function cleanup(guild) {
62}63}
6364
64async function scheduleClean(guild) {65async function scheduleClean(guild) {
65 if (!schedules[guild.id]) {66 if (schedules[guild.id]) {
66 return;67 return;
67 }68 }
68 schedules[guild.id] = setTimeout(() => {69 schedules[guild.id] = setTimeout(() => {
...@@ -79,6 +80,7 @@ client.on('message', async (msg) => {...@@ -79,6 +80,7 @@ client.on('message', async (msg) => {
79 if (msg.content.startsWith('!paint') || msg.content.startsWith('!color')) {80 if (msg.content.startsWith('!paint') || msg.content.startsWith('!color')) {
80 if(rateLimitCache.get(msg.author.id)) {81 if(rateLimitCache.get(msg.author.id)) {
81 msg.channel.send('> **Rate Limited**: This command can only be used every 12 seconds (per user).')82 msg.channel.send('> **Rate Limited**: This command can only be used every 12 seconds (per user).')
83 return;
82 }84 }
8385
84 const args = msg.content.split(' ');86 const args = msg.content.split(' ');