Changed database ip
This commit is contained in:
@@ -2,6 +2,7 @@ import discord
|
||||
from discord.ext import commands
|
||||
from data.DatabaseConnection import *
|
||||
from datetime import datetime, timedelta
|
||||
from functions.emoji_check import *
|
||||
|
||||
class Leaderboards(commands.Cog):
|
||||
def __init__(self, client):
|
||||
@@ -32,7 +33,7 @@ class Leaderboards(commands.Cog):
|
||||
quizplayersdb = QuizPlayersDB()
|
||||
for player in quizplayersdb.get_top_players():
|
||||
discorduser = {}
|
||||
discorduser["playerName"] = (await self.client.fetch_user(player["discordid"])).name
|
||||
discorduser["playerName"] = deEmojify((await self.client.fetch_user(player["discordid"])).name).strip()
|
||||
discorduser["stat"] = player["stat"]
|
||||
top_players.append(discorduser)
|
||||
quizplayersdb.close()
|
||||
|
||||
@@ -7,6 +7,7 @@ import asyncio
|
||||
import threading
|
||||
from functions.timer import Timer
|
||||
from data import constants
|
||||
from functions.emoji_check import *
|
||||
import re
|
||||
from data.DatabaseConnection import *
|
||||
|
||||
@@ -37,15 +38,6 @@ def get_player_uuid(minecraftname):
|
||||
raise PlayerError()
|
||||
return data_string
|
||||
|
||||
def deEmojify(text):
|
||||
regrex_pattern = re.compile(pattern = "["
|
||||
u"\U0001F600-\U0001F64F" # emoticons
|
||||
u"\U0001F300-\U0001F5FF" # symbols & pictographs
|
||||
u"\U0001F680-\U0001F6FF" # transport & map symbols
|
||||
u"\U0001F1E0-\U0001F1FF" # flags (iOS)
|
||||
"]+", flags = re.UNICODE)
|
||||
return regrex_pattern.sub(r'',text)
|
||||
|
||||
def send_chat(discordname, minecraftname, code):
|
||||
HOST = '192.168.1.214' # The server's hostname or IP address
|
||||
PORT = 25224 # The port used by the server
|
||||
|
||||
Reference in New Issue
Block a user