Skip to content

Commit a8b47e9

Browse files
Remove hardcoded points since it causes more confusion
1 parent e0179e3 commit a8b47e9

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

bot.py

+6-5
Original file line numberDiff line numberDiff line change
@@ -296,20 +296,21 @@ def fetch_points_for_each_task() -> dict[str, int]:
296296
points_dict: dict[str, int] = json_load(f)
297297
if not isinstance(points_dict, dict) or not points_dict:
298298
raise ValueError
299+
return points_dict
299300

300301
except (FileNotFoundError, ValueError) as e:
301302
print(
302-
f"Could not read points.json in current directory so using hardcoded points. Error - {e}"
303+
f"Could not read points.json in current directory. Error - {type(e)} {e}"
303304
)
304-
exit()
305+
306+
exit()
305307

306-
return points_dict
307308

308309

309310
@bot.command()
310311
@commands.has_any_role("Leaderboard", "Cabinet Member")
311312
async def contribution(ctx, name, task):
312-
"""Add contribution to a member. !cyscom contribution "name" "task\""""
313+
"""Add contribution to a member. !cyscom contribution "name" "task\" """
313314
try:
314315
data = leaderboard_ref.get()
315316
if data != None:
@@ -348,7 +349,7 @@ async def contribution(ctx, name, task):
348349
@bot.command()
349350
@commands.has_any_role("Member", "Cabinet Member")
350351
async def attendance(ctx, channel_name):
351-
"""Attendance in a voice channel. !cyscom attendance "channel name\""""
352+
"""Attendance in a voice channel. !cyscom attendance "channel name\" """
352353
f"""Mark attendance in a voice channel. Call by {command_prefix} attendance voice_channel_name"""
353354

354355
# Get the voice channel by name

points.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,5 +18,5 @@
1818
"mini project": 100,
1919
"complete project": 200,
2020
"promotion medium": 25,
21-
"promotion large": 50
21+
"promotion large": 50""
2222
}

0 commit comments

Comments
 (0)