Update
This commit is contained in:
parent
bd4357ce03
commit
9e8a12f360
1 changed files with 3 additions and 3 deletions
6
misc.py
6
misc.py
|
@ -64,15 +64,15 @@ class misc(commands.Cog):
|
||||||
await interaction.response.send_message("You don't have permission in this context", ephemeral=True)
|
await interaction.response.send_message("You don't have permission in this context", ephemeral=True)
|
||||||
|
|
||||||
@nextcord.slash_command(
|
@nextcord.slash_command(
|
||||||
name="threadsummery",
|
name="threadsummary",
|
||||||
description="Generate a list of created threads with the owner",
|
description="Generate a list of created threads with the owner",
|
||||||
default_member_permissions=nextcord.Permissions(manage_messages=True),
|
default_member_permissions=nextcord.Permissions(manage_messages=True),
|
||||||
)
|
)
|
||||||
async def threadsummery(self, interaction: nextcord.Interaction):
|
async def threadsummary(self, interaction: nextcord.Interaction):
|
||||||
if interaction.channel.type != nextcord.ChannelType.text:
|
if interaction.channel.type != nextcord.ChannelType.text:
|
||||||
await interaction.response.send_message("This is not a text channel", ephemeral=True)
|
await interaction.response.send_message("This is not a text channel", ephemeral=True)
|
||||||
return
|
return
|
||||||
message = ""
|
message = f"Active threads in {interaction.channel.jump_url}\n"
|
||||||
for t in interaction.channel.threads:
|
for t in interaction.channel.threads:
|
||||||
if t.archived:
|
if t.archived:
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Reference in a new issue