Compare commits

...

2 Commits

Author SHA1 Message Date
090f217f93 Fixed scheduled_events #410
All checks were successful
Deploy staging on push / on-push-deploy_sh-edraft (push) Successful in 3m37s
Deploy dev on push / on-push-deploy_sh-edraft (push) Successful in 3m39s
2023-11-30 17:57:43 +01:00
b98828fce3 Fixed mass move #444 2023-11-30 17:54:31 +01:00
3 changed files with 4 additions and 2 deletions

View File

@ -38,7 +38,7 @@ class MassMoveCommand(DiscordCommandABC):
self, self,
ctx: Context, ctx: Context,
channel_to: discord.VoiceChannel, channel_to: discord.VoiceChannel,
channel_from: Transform[str, VoiceChannelTransformer] = None, channel_from: Transform[discord.VoiceChannel, VoiceChannelTransformer] = None,
): ):
self._logger.debug(__name__, f"Received command mass-move {ctx}") self._logger.debug(__name__, f"Received command mass-move {ctx}")

View File

@ -25,7 +25,7 @@ class VoiceChannelTransformer(Transformer):
return [ return [
app_commands.Choice( app_commands.Choice(
name=f"{vc.name}" if vc.category is None else f"{vc.name}: {vc.category.name}", name=f"{vc.name}" if vc.category is None else f"{vc.name}: {vc.category.name}",
value=vc.name, value=str(vc.id),
) )
for vc in get_client_utils().get_auto_complete_list(voice_channels, current, lambda x: x.name) for vc in get_client_utils().get_auto_complete_list(voice_channels, current, lambda x: x.name)
] ]

View File

@ -64,6 +64,8 @@ class ScheduledEventsWatcher(TaskABC):
elif interval == ScheduledEventIntervalEnum.yearly: elif interval == ScheduledEventIntervalEnum.yearly:
ts = ts + timedelta(days=365) ts = ts + timedelta(days=365)
if ts < now:
return self._append_interval(interval, ts)
return ts return ts
@tasks.loop(hours=24) @tasks.loop(hours=24)