Initial Release of IGNCore version 2.5
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
import time
|
||||
|
||||
from core.decorators import instance
|
||||
from core.logger import Logger
|
||||
|
||||
|
||||
@instance()
|
||||
class UsageService:
|
||||
def __init__(self):
|
||||
self.logger = Logger(__name__)
|
||||
|
||||
def inject(self, registry):
|
||||
self.db = registry.get_instance("db")
|
||||
|
||||
def add_usage(self, command, handler, char_id, channel):
|
||||
self.db.exec("INSERT INTO command_usage (command, handler, char_id, channel, created_at) "
|
||||
"VALUES (?, ?, ?, ?, ?)",
|
||||
[command, handler, char_id, channel, int(time.time())])
|
||||
Reference in New Issue
Block a user