fix: compare guild by id so an uninitialized int-guild routes correctly

_get_channel compared guild == self.guild; when initialize() was not called, self.guild stays an int while the passed guild is a Guild object, so the comparison was always False and routing silently fell through to the bot.settings lookup instead of using the constructed channel. now compares by .id on both sides.

Signed-off-by: disqualifier <dev@disqualifier.me>
This commit is contained in:
disqualifier 2026-06-28 17:46:20 -04:00
parent 7a5684e065
commit 988464ef12

View File

@ -128,7 +128,7 @@ class DPYLogger:
if not guild:
raise ValueError("[dpy_logger] cannot resolve channel without a guild")
if not override and guild == self.guild:
if not override and getattr(guild, "id", guild) == getattr(self.guild, "id", self.guild):
if isinstance(self.channel, discord.TextChannel):
return self.channel
if isinstance(self.channel, int):