fix: normalize construction-channel fetch errors; reject wrong-type channel objects at setup (dpylogger-7/8)
initialize() previously let a bad construction channel id leak raw discord.errors.NotFound/Forbidden/HTTPException past the documented ValueError-only setup contract, and let an already-resolved non-TextChannel object (Thread/VoiceChannel/ForumChannel) pass silently, later misrouting or blackholing every send. Wrap the construction-channel fetch in the same try/except as the settings path and type-check the resolved-object channel path, mirroring the existing int-path guard. Widened the normalization tuple to also catch discord.ClientException (covers InvalidData), fixing dpylogger-9 opportunistically since it's the same pattern. Bump to v0.1.5. Signed-off-by: disqualifier <dev@disqualifier.me>
This commit is contained in:
+1
-1
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
||||
|
||||
[project]
|
||||
name = "dpy_logger"
|
||||
version = "0.1.4"
|
||||
version = "0.1.5"
|
||||
description = "Leveled Discord channel logger for discord.py — config-free, injectable, installable."
|
||||
requires-python = ">=3.10"
|
||||
dependencies = [
|
||||
|
||||
Reference in New Issue
Block a user