This commit is contained in:
insert 2025-02-02 10:18:36 -05:00
parent 5e828fc078
commit 87ba68f13e
Signed by: insert
GPG key ID: A70775C389ACF105

15
misc.py
View file

@ -63,7 +63,20 @@ class misc(commands.Cog):
else: else:
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.message_command(
name="Pin Thread Message",
guild_ids=[1247883904178978927],
)
async def pinthreadmessagenoowner(self, interaction: nextcord.Interaction, message: nextcord.Message):
if message.channel.type != nextcord.ChannelType.public_thread and message.channel.type != nextcord.ChannelType.private_thread:
await interaction.response.send_message("You don't have permission in this context", ephemeral=True)
return
if not message.pinned:
await message.pin()
await interaction.response.send_message("Pinned", ephemeral=True)
else:
await message.unpin()
await interaction.response.send_message("Unpinned", ephemeral=True)
def setup(bot: commands.Bot): def setup(bot: commands.Bot):