From 7853d0c1153359560138371e03b0f98004df6f14 Mon Sep 17 00:00:00 2001 From: Interitio Date: Wed, 24 Sep 2025 19:28:34 +1000 Subject: [PATCH] Remove old config command. --- subathon/component.py | 38 -------------------------------------- 1 file changed, 38 deletions(-) diff --git a/subathon/component.py b/subathon/component.py index 5dbed6d..1a61b62 100644 --- a/subathon/component.py +++ b/subathon/component.py @@ -494,44 +494,6 @@ class SubathonComponent(cmds.Component): else: await ctx.reply("No active subathon to adjust") - # subathon config - @group_subathon.command(name='config', aliases=('option',)) - @cmds.is_moderator() - async def cmd_subathon_config(self, ctx: Context, option: str, *, value: Optional[str] = None): - community = await self.bot.profiles.fetch_community(ctx.broadcaster) - cid = community.communityid - if (active := await self.get_active_subathon(cid)) is not None: - if option.lower() == 'cap': - if value: - # Set the timer cap - if not value.isdigit(): - await ctx.reply("Timer cap must be an integer number of hours!") - else: - await active.subathondata.update(timecap=int(value * 60 * 60)) - await self.dispatch_update(active) - await ctx.reply( - f"The timer cap has been set to {value} hours." - ) - else: - # Display the timer cap - cap = active.subathondata.timecap - if cap: - hours = cap / 3600 - await ctx.reply(f"The timer cap is currently {hours} hours") - elif option.lower() == 'name': - if value: - await active.subathondata.update(name=value) - await self.dispatch_update(active) - await ctx.reply(f"Updated the subathon name to \"{value}\"") - else: - name = active.subathondata.name - await ctx.reply(f"This subathon is called \"{name}\"") - else: - # TODO: Add score and timescore config, probably move this to subcommands - await ctx.reply( - f"Unknown option {option}! Configurable options: 'name', 'cap'" - ) - """ !subathon config name="Birthday Subathon" ; cap=10 (hours) ; scores=5 10 20 0.1 (t1, t2, t3, and bit points) ; timescore=10 (seconds per point); Use !subathon config