Update
This commit is contained in:
parent
5e828fc078
commit
87ba68f13e
1 changed files with 16 additions and 3 deletions
19
misc.py
19
misc.py
|
@ -62,9 +62,22 @@ class misc(commands.Cog):
|
|||
await interaction.response.send_message("Unpinned", ephemeral=True)
|
||||
else:
|
||||
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):
|
||||
bot.add_cog(misc(bot))
|
Loading…
Reference in a new issue