From 5714b0ddfd9256b1615b64bd61bc61264da8cb06 Mon Sep 17 00:00:00 2001 From: GZod01 Date: Sun, 15 Dec 2024 17:23:04 +0100 Subject: [PATCH] a --- main-bot.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main-bot.py b/main-bot.py index 89be812..8725aa3 100644 --- a/main-bot.py +++ b/main-bot.py @@ -71,7 +71,7 @@ async def say_message(userid:int, guildid:int, shortname:str, message:str,channe webhook = None # print("ok2") print(channel.guild) - if channel.guild is None: + if channel.guild is None or bot.user.id not in [m.id for m in channel.guild.members] or not channel.permissions_for(channel.guild.me).manage_webhooks: await interaction_res.send_message(f"**{full_name}({short_name})**: {message}") return if discord.utils.get(await channel.webhooks(),name=short_name) is None: