Added support for database updates/migration, added guild access timestamps

This commit is contained in:
Essem 2022-02-18 23:05:41 -06:00
parent 55f6271cd9
commit c568423870
No known key found for this signature in database
GPG key ID: 7D497397CC3A2A8C
5 changed files with 106 additions and 39 deletions

View file

@ -100,6 +100,7 @@ export default async (client, cluster, worker, ipc, message) => {
try {
await database.addCount(aliases.get(command) ?? command);
const startTime = new Date();
await database.updateTime(startTime, message.channel.guild.id);
// eslint-disable-next-line no-unused-vars
const commandClass = new cmd(client, cluster, worker, ipc, message, parsed._, message.content.substring(prefix.length).trim().replace(command, "").trim(), (({ _, ...o }) => o)(parsed)); // we also provide the message content as a parameter for cases where we need more accuracy
const result = await commandClass.run();