def __init__(self, client): self.client = client self.db = dbconn.DbConn() self.api = challonge_api.ChallongeAPI(self.client)
import discord import time import asyncio import math from humanfriendly import format_timespan as timeez from constants import ADMIN_PRIVILEGE_ROLES from utils.updation import match_score, round_score from utils import updation, cf_api from data import dbconn db = dbconn.DbConn() cf = cf_api.CodeforcesAPI() def has_admin_privilege(ctx): if ctx.channel.permissions_for(ctx.author).manage_guild: return True for role in ADMIN_PRIVILEGE_ROLES: if role.lower() in [x.name.lower() for x in ctx.author.roles]: return True return False async def send_message(ctx, message): await ctx.send(embed=discord.Embed(description=message, color=discord.Color.gold())) async def get_time_response(client, ctx, message, time, author, range_):
def __init__(self, client): self.client = client self.db = dbconn.DbConn() self.client.remove_command("help")
def __init__(self, client): self.client = client self.db = dbconn.DbConn() self.cf = cf_api.CodeforcesAPI()
def __init__(self, client): self.client = client self.db = dbconn.DbConn() self.uptime = int(time.time())