Special characters handling

* Fix README for python version
* Add discord-friendly unidecode function for channel names (avoiding
  special characted)
* Check if "items" is present before accessing in channel id request
  response
This commit is contained in:
BreadTube 2026-02-03 01:30:41 +09:00
commit d015927861
10 changed files with 315 additions and 13 deletions

View file

@ -15,6 +15,7 @@ class Config:
youtube_channel_refresh_interval: float = 600
youtube_channel_video_count: int = 10
youtube_channel_video_message: str = '[{{video_title}}](https://www.youtube.com/video/{{video_id}})'
youtube_channel_id_answer_seperator: str = ' -> '
def to_str(self) -> str:
return '\n'.join(['config', *[f'{k}={v}' for k, v in asdict(self).items()]])