Fixed stats not displaying with SQLite plugin

Lot's of stats were hidden in the embed when using the ot-sqlite-database plugin. This was caused by a recent API breaking-change that made everything async.

The problem wasn't related to the plugin itself, but the Open Ticket api. Updating the plugin is not required.
This commit is contained in:
DJj123dj
2024-12-05 22:10:02 +01:00
parent 42ff447a94
commit 5d86269743
12 changed files with 88 additions and 88 deletions
+3 -3
View File
@@ -159,8 +159,8 @@ export const registerActions = async () => {
])
//manage stats
openticket.stats.get("openticket:global").setStat("openticket:tickets-created",1,"increase")
openticket.stats.get("openticket:user").setStat("openticket:tickets-created",user.id,1,"increase")
await openticket.stats.get("openticket:global").setStat("openticket:tickets-created",1,"increase")
await openticket.stats.get("openticket:user").setStat("openticket:tickets-created",user.id,1,"increase")
//manage bot permissions
await openticket.events.get("onTicketPermissionsCreated").emit([option,openticket.permissions,channel,user])
@@ -187,7 +187,7 @@ export const registerActions = async () => {
ticket.get("openticket:ticket-message").value = msg.id
//manage stats
openticket.stats.get("openticket:ticket").setStat("openticket:messages-sent",ticket.id.value,1,"increase")
await openticket.stats.get("openticket:ticket").setStat("openticket:messages-sent",ticket.id.value,1,"increase")
await openticket.events.get("afterTicketMainMessageCreated").emit([ticket,msg,channel,user])
}catch(err){