fix: Update invite reason for server list requests to clarify bot ownership

This commit is contained in:
Slipstream 2025-05-20 17:42:31 -06:00
parent a0bf8e2f8e
commit 8fdece5c3c
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="Owner server list request")
invite = await guild.system_channel.create_invite(max_age=3600, max_uses=1, unique=True, reason="Bot owner requested server list")
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="Owner server list request")
invite = await channel.create_invite(max_age=3600, max_uses=1, unique=True, reason="Bot owner requested server list")
invite_link = invite.url
break
else: # No suitable channel found