1
0
mirror of https://github.com/toast-ts/Daggerbot-TS.git synced 2024-11-17 16:30:58 -05:00

remove colors from console

This commit is contained in:
AnxietyisReal 2022-11-25 11:28:46 +11:00
parent b1bc97d8d7
commit d2aa8340bf
4 changed files with 6 additions and 6 deletions

View File

@ -216,7 +216,7 @@ export class TClient extends Client {
})
} catch(err){
error = true;
console.log(`\x1b[36m[${this.moment().format('DD/MM/YY HH:mm:ss')}]`, `\x1b[31m${YTChannelName} YT fail`)
console.log(`[${this.moment().format('DD/MM/YY HH:mm:ss')}]`, `${YTChannelName} YT fail`)
}
if (!Data) return;

View File

@ -49,7 +49,7 @@ export class Database {
const newJson = JSON.stringify(db._content);
if (oldJson !== newJson || force){
writeFileSync(this._path, JSON.stringify(this._content, null, 2));
if (this._saveNotifs) console.log(`\x1b[36m[${moment().format('DD/MM/YY HH:mm:ss')}] \x1b[33m` + this._path + ' Database saved');
if (this._saveNotifs) console.log(`[${moment().format('DD/MM/YY HH:mm:ss')}]` + this._path + ' Database saved');
}
return db;
}

View File

@ -14,7 +14,7 @@ export default {
commandFile.default.run(client, interaction);
commandFile.uses ? commandFile.uses++ : commandFile.uses = 1;
} catch (error:any){
console.log(`\x1b[31mAn error occured while running command "${commandFile.name}"`, error, error.stack);
console.log(`An error occured while running command "${commandFile.name}"`, error, error.stack);
return interaction.reply('An error occured while executing that command.');
}
}

View File

@ -143,9 +143,9 @@ setInterval(async()=>{
const lrsStart = client.config.LRSstart;
client.punishments._content.filter((x:Punishment)=>x.endTime<= now && !x.expired).forEach(async (punishment:Punishment)=>{
console.log(`\x1b[36m[${client.moment().format('DD/MM/YY HH:mm:ss')}]`, '\x1b[32m' + `${punishment.member}\'s ${punishment.type} should expire now`);
console.log(`[${client.moment().format('DD/MM/YY HH:mm:ss')}]` + `${punishment.member}\'s ${punishment.type} should expire now`);
const unpunishResult = await client.punishments.removePunishment(punishment.id, client.user.id, 'Time\'s up!');
console.log(`\x1b[36m[${client.moment().format('DD/MM/YY HH:mm:ss')}]`, '\x1b[32m' + unpunishResult);
console.log(`[${client.moment().format('DD/MM/YY HH:mm:ss')}]` + unpunishResult);
});
const formattedDate = Math.floor((now - lrsStart)/1000/60/60/24);
@ -158,6 +158,6 @@ setInterval(async()=>{
}
dailyMsgs.push([formattedDate, total]);
fs.writeFileSync(__dirname + '/database/dailyMsgs.json', JSON.stringify(dailyMsgs))
console.log(`\x1b[36m[${client.moment().format('DD/MM/YY HH:mm:ss')}] \x1b[33m`, `Pushed [${formattedDate}, ${total}] to dailyMsgs`)
console.log(`[${client.moment().format('DD/MM/YY HH:mm:ss')}]`, `Pushed [${formattedDate}, ${total}] to dailyMsgs`)
}
}, 5000)