This commit is contained in:
GZod01 2024-12-15 17:23:04 +01:00
parent 0d500319c8
commit 5714b0ddfd

View file

@ -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: