forked from Supositware/Haha-Yes
Added timestamp
This commit is contained in:
parent
0bde6afdce
commit
49e13885fe
2 changed files with 7 additions and 14 deletions
|
@ -36,12 +36,8 @@ export default {
|
||||||
|
|
||||||
const isOptOut = await db.optout.findOne({ where: { userID: interaction.user.id } });
|
const isOptOut = await db.optout.findOne({ where: { userID: interaction.user.id } });
|
||||||
|
|
||||||
if (isOptOut) {
|
const timestamp = new Date();
|
||||||
console.log(`A user launched command \x1b[33m${commandName}\x1b[0m using slash`);
|
console.log(`[${timestamp.toISOString()}] \x1b[33m${ isOptOut ? 'A user' : `${userTag} (${userID})`}\x1b[0m launched command \x1b[33m${commandName}\x1b[0m using slash`);
|
||||||
}
|
|
||||||
else {
|
|
||||||
console.log(`\x1b[33m${userTag} (${userID})\x1b[0m launched command \x1b[33m${commandName}\x1b[0m using slash`);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// Owner only check
|
// Owner only check
|
||||||
|
@ -107,7 +103,7 @@ export default {
|
||||||
});
|
});
|
||||||
|
|
||||||
if (!isOptOut) {
|
if (!isOptOut) {
|
||||||
console.log(`\x1b[33m⤷\x1b[0m with args ${JSON.stringify(args)}`);
|
console.log(`[${timestamp.toISOString()}] \x1b[33m⤷\x1b[0m with args ${JSON.stringify(args)}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
await command.execute(interaction, args, client)
|
await command.execute(interaction, args, client)
|
||||||
|
|
|
@ -301,12 +301,9 @@ export default {
|
||||||
|
|
||||||
const isOptOut = await db.optout.findOne({ where: { userID: message.author.id } });
|
const isOptOut = await db.optout.findOne({ where: { userID: message.author.id } });
|
||||||
|
|
||||||
if (isOptOut) {
|
const timestamp = new Date();
|
||||||
console.log(`A user launched command \x1b[33m${commandName}\x1b[0m using prefix`);
|
console.log(`[${timestamp.toISOString()}] \x1b[33m${ isOptOut ? 'A user' : `${userTag} (${userID})`}\x1b[0m launched command \x1b[33m${commandName}\x1b[0m using slash`);
|
||||||
}
|
|
||||||
else {
|
|
||||||
console.log(`\x1b[33m${userTag} (${userID})\x1b[0m launched command \x1b[33m${commandName}\x1b[0m using prefix`);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Owner only check
|
// Owner only check
|
||||||
if (command.ownerOnly && message.author.id !== ownerId) {
|
if (command.ownerOnly && message.author.id !== ownerId) {
|
||||||
|
@ -429,7 +426,7 @@ export default {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isOptOut && argsLength > 0) {
|
if (!isOptOut && argsLength > 0) {
|
||||||
console.log(`\x1b[33m⤷\x1b[0m with args ${JSON.stringify(args)}`);
|
console.log(`[${timestamp.toISOString()}]\x1b[33m⤷\x1b[0m with args ${JSON.stringify(args)}`);
|
||||||
}
|
}
|
||||||
|
|
||||||
await command.execute(message, args, client)
|
await command.execute(message, args, client)
|
||||||
|
|
Loading…
Reference in a new issue