such cleanup
This commit is contained in:
@@ -14,14 +14,14 @@ import regex
|
||||
from regex import Pattern
|
||||
from aiohttp import ClientSession, ClientTimeout
|
||||
from discord.ext import bridge, commands, tasks
|
||||
|
||||
from disc_havoc import Havoc
|
||||
|
||||
|
||||
|
||||
class Util:
|
||||
"""Karma Utility"""
|
||||
def __init__(self, bot):
|
||||
self.bot = bot
|
||||
def __init__(self, bot: Havoc):
|
||||
self.bot: Havoc = bot
|
||||
self.api_key: str = constants.PRV_API_KEY
|
||||
self.karma_endpoints_base_url: str = "https://api.codey.lol/karma/"
|
||||
self.karma_retrieval_url: str = f"{self.karma_endpoints_base_url}get"
|
||||
@@ -146,9 +146,9 @@ class Util:
|
||||
|
||||
class Karma(commands.Cog):
|
||||
"""Karma Cog for Havoc"""
|
||||
def __init__(self, bot):
|
||||
def __init__(self, bot: Havoc):
|
||||
importlib.reload(constants)
|
||||
self.bot: discord.Bot = bot
|
||||
self.bot: Havoc = bot
|
||||
self.util = Util(self.bot)
|
||||
# self.karma_regex = regex.compile(r'(\w+)(\+\+|\-\-)')
|
||||
self.karma_regex: Pattern = regex.compile(r'(\b\w+(?:\s+\w+)*)(\+\+($|\s)|\-\-($|\s))')
|
||||
|
||||
Reference in New Issue
Block a user