Fix discord channel name and add verification

This commit is contained in:
BreadTube 2026-05-26 23:59:13 +09:00
commit d645fecae0
7 changed files with 23 additions and 4 deletions

View file

@ -152,6 +152,11 @@ class DiscordManager:
raise RuntimeError(f'Error creating channel with params (no info): {params}')
return TextChannel.from_dict(channel_info)
def delete_text_channel(self, channel_id: int, request_timeout: float):
_, _ = self._send_request(
*Api.Guild.delete_channel(channel_id=channel_id), request_timeout=request_timeout,
expected_code=204)
def create_message(self, channel: TextChannel, params: Api.Message.CreateParams, request_timeout: float,
upload_files: list[tuple[str, FileMime, bytes]] | None = None) -> Message:
if 'content' in params and len(params['content']) >= self.MAX_MESSAGE_LENGTH: