From 899f5e7292c3c57d7bd667fd0546dbee2e3a360d Mon Sep 17 00:00:00 2001 From: Interitio Date: Tue, 2 Sep 2025 22:12:43 +1000 Subject: [PATCH] Move timer url to config --- example-config/subathon.conf | 3 +++ subathon/component.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) create mode 100644 example-config/subathon.conf diff --git a/example-config/subathon.conf b/example-config/subathon.conf new file mode 100644 index 0000000..0b900fa --- /dev/null +++ b/example-config/subathon.conf @@ -0,0 +1,3 @@ +[SUBATHON] +timer_url = https://izashi.thewisewolf.dev/tracker/timer + diff --git a/subathon/component.py b/subathon/component.py index 6db5bb1..5069fdf 100644 --- a/subathon/component.py +++ b/subathon/component.py @@ -435,8 +435,8 @@ class SubathonComponent(cmds.Component): score_time=timescore, timecap=timecap ) - # TODO: Add this to config not hardcode - timer_link = f"https://izashi.thewisewolf.dev/tracker/timer?channelid={ctx.channel.id}" + base_timer_url = self.bot.config.subathon['timer_url'] + timer_link = f"{base_timer_url}?channelid={ctx.channel.id}" await ctx.reply(f"Setup your {name}! Use !subathon resume to get the timer running. Your timer link: {timer_link}") await self.channel.send_updates(cid)