mirror of
https://code.lenaisten.de/Lenaisten/lenaverse-bot.git
synced 2024-11-22 15:03:01 +00:00
16 lines
522 B
Python
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)
|