handle unavailable prefix in DMs

This commit is contained in:
Infinidoge 2025-06-14 01:34:44 -04:00
parent e0ce382d5d
commit 78d010c2a4
Signed by: Infinidoge
SSH key fingerprint: SHA256:GT2StvPQMMfFHyiiFJymQxfTG/z6EWLJ6NWItf5K5sA

View file

@ -209,10 +209,10 @@ async def on_message(message: Message):
return
c = message.content.lower().split(" ")
prefix = await bot.get_guild_prefix(ctx.guild) or "@nomen "
if "help" in c and "nomen" in c:
help_timeouts[ctx.channel.id] = now + datetime.timedelta(minutes=5)
prefix = (await bot.get_guild_prefix(ctx.guild) if ctx.guild else DEFAULT_PREFIX) or "@nomen "
await message.reply(f"""\
Heya!