Fix discord channel name and add verification
This commit is contained in:
parent
cc40e9dcf3
commit
d645fecae0
7 changed files with 23 additions and 4 deletions
|
|
@ -6,7 +6,6 @@ import http.client
|
|||
import logging
|
||||
import operator
|
||||
from pathlib import Path
|
||||
import re
|
||||
import sys
|
||||
import time
|
||||
from typing import Any
|
||||
|
|
@ -377,6 +376,10 @@ class Bot:
|
|||
allow=Permissions.VIEW_CHANNEL | Permissions.SEND_MESSAGES,
|
||||
deny=Permissions.NONE)]},
|
||||
request_timeout=self.config.request_timeout)
|
||||
if sub_channel != subscription.name:
|
||||
self.logger.error('Cannot create channel "%s" : mismatch name -> %s',
|
||||
subscription.name, sub_channel.name)
|
||||
self.discord_manager.delete_text_channel(sub_channel.id, request_timeout=self.config.request_timeout)
|
||||
return sub_channel
|
||||
|
||||
def _refresh_subscription(self, connection: http.client.HTTPSConnection, subscription: SubscriptionInfo):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue