Debugging get_history
This commit is contained in:
parent
f5cb646087
commit
055f7db17e
|
@ -317,4 +317,10 @@ def cache_history(Team_1, Team_1_Score, Team_2, Team_2_Score):
|
|||
conn.close()
|
||||
|
||||
def get_history():
|
||||
pass
|
||||
conn = create_connection()
|
||||
if conn is not None:
|
||||
c = conn.cursor()
|
||||
c.execute("SELECT * FROM teams")
|
||||
history_strings = c.fetchall()
|
||||
conn.close()
|
||||
return team_strings
|
||||
|
|
4
games.py
4
games.py
|
@ -720,6 +720,10 @@ def get_all_teams():
|
|||
teams.append(this_team)
|
||||
return teams
|
||||
|
||||
def get_history():
|
||||
for game in db.get_history():
|
||||
print(game)
|
||||
|
||||
def search_team(search_term):
|
||||
teams = []
|
||||
for team_pickle in db.search_teams(search_term):
|
||||
|
|
|
@ -315,6 +315,14 @@ class AssignOwnerCommand(Command):
|
|||
await msg.channel.send("We couldn't find that team. Typo?")
|
||||
#except:
|
||||
#await msg.channel.send("We hit a snag. Tell xvi.")
|
||||
class ShowHistoryCommand(Command):
|
||||
name = "showhistory"
|
||||
template = "m;showhistory"
|
||||
description = "Shows all game history"
|
||||
|
||||
async def execute(self, msg, command):
|
||||
#list_task = asyncio.create_task(history_pages(msg, game.get_history()))
|
||||
game.get_history()
|
||||
|
||||
|
||||
commands = [
|
||||
|
@ -335,6 +343,7 @@ commands = [
|
|||
CreditCommand(),
|
||||
RomanCommand(),
|
||||
HelpCommand(),
|
||||
ShowHistory(),
|
||||
]
|
||||
|
||||
client = discord.Client()
|
||||
|
|
Loading…
Reference in New Issue
Block a user