$messagePin
Pins a message and optionally returns data about the message being pinned.

FUNCTION USAGE

  • $messagePin[channelID;messageID]
  • $messagePin[channelID;messageID;option]

Properties:

channelID - The ID of the channel where the message is located. messageID - The ID of the message being pinned. option - Optional data for the bot to return upon pinning a message.

Options:

  1. 1.
    id - Returns the ID of the message being pinned.
  2. 2.
    url - Returns the URL link of the message being pinned.
  3. 3.
    content - Returns the content of the message being pinned.
  4. 4.
    author - Returns the author ID of the message being pinned.
  5. 5.
    channel - Returns the ID of the channel where the message is being pinned.
  6. 6.
    You can omit the 3rd field or leave it blank to return nothing and just simply pin the message.

Example 1: Pinning a message in the current channel with no optional feedback.

1
bot.Command({
2
name: "pin",
3
code: `
4
$messagePin[$channelID[];$message[1];]
5
`
6
})
Copied!

Example 2: Pinning a message in another channel with some optional feedback of your choice.

1
bot.Command({
2
name: "pin",
3
code: `
4
$messagePin[$findchannel[$message[1]];$message[2];$message[3]]
5
`
6
})
Copied!
Last modified 4mo ago
Copy link