v3.5.0 push 4

This commit is contained in:
DJj123dj
2023-12-13 21:39:18 +01:00
parent d51511fdb5
commit 94510bbfb0
10 changed files with 368 additions and 11 deletions
+53
View File
@@ -0,0 +1,53 @@
/**
!!! NEW !!!
The /stats command
(well, it's not finished yet 😉)
=================================================
client.on("messageCreate",async (msg) => {
if (!msg.content.startsWith("!test global")) return
msg.channel.send({
content:"testing `GLOBAL_STATS`",
embeds:[await createGlobalStatsEmbed()]
})
})
client.on("messageCreate",async (msg) => {
if (!msg.content.startsWith("!test ticket")) return
if (!existStats("ticket","STATUS",msg.channel.id)){
msg.channel.send({embeds:[bot.errorLog.notInATicket]})
return
}
msg.channel.send({
content:"testing `TICKET_STATS`",
embeds:[await createTicketStatsEmbed(msg.guild,msg.channel.id)]
})
})
client.on("messageCreate",async (msg) => {
if (!msg.content.startsWith("!test user")) return
const mention = msg.mentions.users.first()
if (mention){
if (!existStats("user","TICKETS_CREATED",mention.id)){
msg.channel.send({embeds:[bot.errorLog.serverError("This user can't be found in the stats database!")]})
return
}
msg.channel.send({
content:"testing `USER_STATS`",
embeds:[await createUserStatsEmbed(msg.guild,mention,msg.channel.id)]
})
}else{
if (!existStats("user","TICKETS_CREATED",msg.author.id)){
msg.channel.send({embeds:[bot.errorLog.serverError("This user can't be found in the stats database!")]})
return
}
msg.channel.send({
content:"testing `USER_STATS`",
embeds:[await createUserStatsEmbed(msg.guild,msg.author,msg.channel.id)]
})
}
})
*/