Compare commits
No commits in common. "7f2b81e6a8790b0c9ba412e840ce7e454193d571" and "dd9f098e4e7e663337622e92d17ed5b71cc49fc3" have entirely different histories.
7f2b81e6a8
...
dd9f098e4e
1 changed files with 3 additions and 16 deletions
19
misc.py
19
misc.py
|
@ -62,22 +62,9 @@ class misc(commands.Cog):
|
||||||
await interaction.response.send_message("Unpinned", ephemeral=True)
|
await interaction.response.send_message("Unpinned", ephemeral=True)
|
||||||
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):
|
||||||
bot.add_cog(misc(bot))
|
bot.add_cog(misc(bot))
|
Loading…
Reference in a new issue