fix: Update invite reason in server list command to clarify permission implications

This commit is contained in:
Slipstream 2025-05-20 17:44:50 -06:00
parent 8fdece5c3c
commit bfd20931fa
Signed by: slipstream
GPG Key ID: 13E498CE010AC6FD

View File

@ -132,13 +132,13 @@ class StatusCog(commands.Cog):
try:
# Try system channel first
if guild.system_channel and guild.system_channel.permissions_for(guild.me).create_instant_invite:
invite = await guild.system_channel.create_invite(max_age=3600, max_uses=1, unique=True, reason="Bot owner requested server list")
invite = await guild.system_channel.create_invite(max_age=3600, max_uses=1, unique=True, reason="Bot owner requested server list (Remove create invite permission to prevent this)")
invite_link = invite.url
else:
# Fallback to the first channel the bot can create an invite in
for channel in guild.text_channels:
if channel.permissions_for(guild.me).create_instant_invite:
invite = await channel.create_invite(max_age=3600, max_uses=1, unique=True, reason="Bot owner requested server list")
invite = await channel.create_invite(max_age=3600, max_uses=1, unique=True, reason="Bot owner requested server list (Remove create invite permission to prevent this)")
invite_link = invite.url
break
else: # No suitable channel found