Replace channel name spaces to hyphens

This commit is contained in:
BreadTube 2026-05-25 00:26:25 +09:00
commit 2cf87495fa
2 changed files with 3 additions and 1 deletions

View file

@ -365,6 +365,7 @@ class Bot:
break
if selected_category is None:
selected_category = category_ranges[-1][2]
self.logger.debug('Creating new channel: %s for id %s', subscription.name, subscription.channel_id)
sub_channel = self.discord_manager.create_text_channel(
self.guild_id, {
'name': subscription.name,

View file

@ -103,7 +103,8 @@ class SubscriptionHelper:
name = values[0].decode()
channel_id = values[1].decode()
subscriptions[channel_id] = SubscriptionInfo(
name=SubscriptionInfo.discord_compatible_name(name), channel_id=channel_id, last_update=0)
name=SubscriptionInfo.discord_compatible_name(
name.replace(' ', '-')), channel_id=channel_id, last_update=0)
return subscriptions
@staticmethod