minor logging patches
This commit is contained in:
parent
860659fd8e
commit
e8e7c07570
3
.gitignore
vendored
3
.gitignore
vendored
@ -1,5 +1,8 @@
|
||||
.env
|
||||
.venv
|
||||
**/*.log
|
||||
build/
|
||||
dist/
|
||||
*.spec
|
||||
.idea/**
|
||||
uv.lock
|
||||
@ -12,6 +12,7 @@ dependencies = [
|
||||
[project.optional-dependencies]
|
||||
spielverabredungen = [
|
||||
"click",
|
||||
"pyinstaller",
|
||||
]
|
||||
|
||||
[tool.setuptools_scm]
|
||||
|
||||
@ -34,10 +34,12 @@ class SpielverabredungenClient(Client):
|
||||
def __get_channel(self) -> ForumChannel:
|
||||
guild = self.get_guild(self.config_object.guild_id)
|
||||
assert guild, f'Guild with ID {self.config_object.guild_id} not found'
|
||||
logging.info('Server name is "%s"', guild.name)
|
||||
channel = discord.utils.get(guild.channels, id=self.config_object.channel_id)
|
||||
assert channel, f'Channel with ID {self.config_object.channel_id} not found in guild {self.config_object.guild_id}'
|
||||
assert isinstance(channel,
|
||||
ForumChannel), f'Channel with ID {self.config_object.channel_id} is not a forum channel'
|
||||
logging.info('Channel name is "%s"', channel.name)
|
||||
return channel
|
||||
|
||||
def __check_duplicate_channels(self, channel: ForumChannel, dates: Iterable[datetime.date],
|
||||
|
||||
Loading…
Reference in New Issue
Block a user