Skip to content

Commit

Permalink
change leaderboard-ref
Browse files Browse the repository at this point in the history
  • Loading branch information
vishalnandagopal committed Jan 14, 2024
1 parent d83f7e3 commit 5334f74
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ def check_if_required_env_variables_are_present():
"""The current leaderboard act"""


leaderboard_ref = db.reference("vitcc").child("owasp").child(current_act)
leaderboard_ref = db.reference("vitcc").child("owasp").child(f"leaderboard-act{current_act}")

# project_ref = base_ref.child("projects")
# certificate_ref = base_ref.child("certificates")
Expand Down Expand Up @@ -122,8 +122,8 @@ async def sum(ctx, numOne: int, numTwo: int):

@bot.command()
@commands.has_any_role("Cabinet Member")
async def add_data(ctx, name: str, rating: int = 0, contributions: int = 0):
f"""Add data to the leaderboard. Call it by {command_prefix} add_data "name" rating contribution"""
async def add_member(ctx, name: str, rating: int = 0, contributions: int = 0):
f"""Add data to the leaderboard. Call it by {command_prefix} add_member "name" rating contribution"""
try:
data = leaderboard_ref.get()
name = name.strip()
Expand Down Expand Up @@ -201,6 +201,7 @@ async def add_recruits(ctx):
@bot.command()
@commands.has_any_role("Cabinet Member")
async def set_points(ctx, name: str, rating=0, contributions=0):
f"""Specifically set a member's points. Call it by {command_prefix} set_points "name" rating contribution"""
try:
data = leaderboard_ref.get()
name = name.strip()
Expand Down

0 comments on commit 5334f74

Please sign in to comment.