1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-18 00:31:00 -05:00

Compare commits

..

No commits in common. "5c0f2385314a89a6df31ca222522a0e300394407" and "137a0ae7b84f64471b6ac9ad2f343a35b9593dab" have entirely different histories.

4 changed files with 4 additions and 5 deletions

View File

@ -17,11 +17,11 @@ export default class Automoderator {
// If the count has reached the threshold amount, punish the user like most daddy would do to their child.
if (!this.lockQuery.has(message.author.id)) {
this.lockQuery.add(message.author.id);
Logger.console('log', 'AUTOMOD', `Lock acquired for ${message.author.tag} with reason: ${reason}`);
Logger.console('log', 'Automod', `Lock acquired for ${message.author.tag} with reason: ${reason}`);
await client.punishments.punishmentAdd('mute', {time: duration}, client.user.id, `AUTOMOD:${reason}`, message.author, message.member as Discord.GuildMember);
setTimeout(()=>{
this.lockQuery.delete(message.author.id);
Logger.console('log', 'AUTOMOD', `Lock released for ${message.author.tag}`);
Logger.console('log', 'Automod', `Lock released for ${message.author.tag}`);
}, 3500); // Wait 3.5 seconds before releasing the lock.
}
delete client.repeatedMessages[message.author.id];

View File

@ -2,5 +2,4 @@ import dayjs from 'dayjs';
export default class Logger {
public static console =(logType:'log'|'error', prefix:string, message:any)=>console[logType](`[${dayjs().format('DD/MM/YY HH:mm:ss')}]`, `[${prefix}]`, message);
public static debug =(prefix:string, message:any)=>console.log(`[${dayjs().format('DD/MM/YY HH:mm:ss')}]`, `[${prefix}:DEBUG]`, message);
}

View File

@ -114,7 +114,7 @@ export class UserLevelsSvc {
))
]});
} catch (why) {
Logger.debug('Cron:resetAllData', why)
Logger.console('error', 'Cron:resetAllData:DEBUG', why)
}
// Reset LRSstart to current Epoch and save it to config file

View File

@ -43,7 +43,7 @@ export default async(client:TClient)=>{
continue;
}
if (getVideoId(1) === cachedVideoId) {
Logger.debug('YTModule', `New video uploaded by ${YTChannelName} and notification sent to Discord`)
Logger.console('log', 'YTModule:DEBUG', `New video uploaded by ${YTChannelName} and notification sent to Discord`)
await CacheServer.delete(cacheKey).then(async()=>await CacheServer.set(cacheKey, getVideoId(0), false).then(async()=>await CacheServer.expiry(cacheKey, cacheExpiry)));
(client.channels.resolve(DiscordChannelID) as TextChannel).send({