Skip to content

Commit

Permalink
Blah blabh blah
Browse files Browse the repository at this point in the history
  • Loading branch information
optimumtact committed Nov 26, 2024
1 parent 52ab231 commit 7012475
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion gbp/gbp.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ def __init__(self, bot):
)
self.usertogbp = dict()
self.postouser = dict()
self.usertopos = dict()

default_global = {"gbp": {}}
self.config.register_global(**default_global)
Expand Down Expand Up @@ -56,6 +57,7 @@ async def get_latest_gbp(self):
index = index + 1 # count like a human
gbp, user = item
self.postouser[index] = user
self.usertopos[user] = index

@gbp.command()
async def find(self, ctx, name=""):
Expand All @@ -65,7 +67,8 @@ async def find(self, ctx, name=""):
for name, ratio in choices:
if ratio >= 90:
gbp = self.usertogbp[name]
msg += f"{name} - {gbp}\n"
pos = self.usertopos[name]
msg += f"#{pos}: {name} - {gbp}\n"
if msg == "":
await ctx.send("No user found!")
return
Expand Down

0 comments on commit 7012475

Please sign in to comment.