diff --git a/requirements.txt b/requirements.txt old mode 100644 new mode 100755 index 8cf2b1b..4d56658 --- a/requirements.txt +++ b/requirements.txt @@ -1,3 +1,5 @@ +beautifulsoup4==4.9.3 discord.py==2.2.3 fastf1==3.0.3 +jdata==0.5.3 Requests==2.31.0 diff --git a/robottas.py b/robottas.py index 726069d..b5c4361 100755 --- a/robottas.py +++ b/robottas.py @@ -854,7 +854,7 @@ class Robottas(commands.Bot): @self.command() async def danger(ctx): - await ctx.send("That's some dangerous driving! " + name_dict["HAM"] + await ctx.send("That's some dangerous driving! " + name_dict["HAM"]) @self.command() @@ -864,7 +864,7 @@ class Robottas(commands.Bot): @self.command() async def flip(ctx): - await ctx.send( random.choice(["Heads","Tails") + await ctx.send( random.choice(["Heads","Tails"])) @self.command() @@ -877,10 +877,8 @@ class Robottas(commands.Bot): try: con = sqlite3.connect('races.db') cur = con.cursor() - for row in cur.execute("select * from quotes " + - "order by random() " + - "limit 1") - + for row in cur.execute('select * from quotes order by Random() limit 1'): + message = row[0] + " -- " + row[1] + " " + row[2] await ctx.send(message) break # There should only be one row anyway @@ -922,7 +920,7 @@ class Robottas(commands.Bot): cur = con.cursor() for row in cur.execute('select * from races ' + 'order by Random() ' + - 'limit 1') + 'limit 1'): watched = self.decode_watched(row[2]) await ctx.send(f"Location: {row[0]} Year: {row[1]} {watched}") @@ -943,7 +941,7 @@ class Robottas(commands.Bot): for row in cur.execute('select * from races ' + 'where watched = 0 ' + 'order by Random() ' + - 'limit 1') + 'limit 1'): watched = self.decode_watched(row[2]) await ctx.send(f"Location: {row[0]} Year: {row[1]}")