From 988464ef12cbd314b0a062df9b2b49259f7da76f Mon Sep 17 00:00:00 2001 From: disqualifier Date: Sun, 28 Jun 2026 17:46:20 -0400 Subject: [PATCH] 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 --- src/dpy_logger/dpy_logger.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/dpy_logger/dpy_logger.py b/src/dpy_logger/dpy_logger.py index 14a5f2c..be32230 100644 --- a/src/dpy_logger/dpy_logger.py +++ b/src/dpy_logger/dpy_logger.py @@ -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):