lenaverse-bot/lenaverse_bot/core/commands.py

16 lines
522 B
Python

import discord
@discord.app_commands.command()
async def lsstuff(interaction: discord.Interaction):
msg = ""
for guild in interaction.client.guilds:
msg += f"\n- {guild.name}"
for channel in guild.channels:
msg += f"\n - {channel.name}"
if isinstance(channel, discord.ForumChannel | discord.TextChannel):
for thread in channel.threads:
msg += f"\n - {thread.name}"
await interaction.response.send_message(msg, ephemeral=True)