1
0
Fork 0
mirror of https://code.lenaisten.de/Lenaisten/lenaverse-bot.git synced 2024-11-22 23:13:01 +00:00
lenaverse-bot/lenaverse_bot/core/commands.py

17 lines
522 B
Python
Raw Normal View History

2023-11-18 20:52:07 +00:00
import discord
2023-11-18 21:27:30 +00:00
@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)