blob: 8ed968b2951dfb8dd8081187da86475295d42329 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
|
import { commandUsages } from '../db/models/command-usages.js';
import { enableAnalytics } from '../storage/consts.js';
export async function Analytics(command, interaction) {
if (enableAnalytics) {
if (!interaction.guild) return await commandUsages.create({
command: command.data.name,
userID: interaction.user.id
});
return await commandUsages.create({
command: command.data.name,
userID: interaction.user.id,
guildID: interaction.guild.id
});
}
}
|