$msg
A `Compact Function` pertaining to messages in a channel the bot can see with `21` options to choose from.

FUNCTION USAGE

  • $msg[channelID;messageID;option]

Properties:

channelID - Define the channel with the ID. messageID - Define the message with the ID. property - Define the property by its name.

Options:

  1. 1.
    author
  2. 2.
    authormention
  3. 3.
    authortag
  4. 4.
    authorname
  5. 5.
    channel
  6. 6.
    channelname
  7. 7.
    cleancontent
  8. 8.
    content
  9. 9.
    created
  10. 10.
    guildid
  11. 11.
    id
  12. 12.
    isdeletable
  13. 13.
    isdeleted
  14. 14.
    iseditable
  15. 15.
    isedited
  16. 16.
    ispinnable
  17. 17.
    ispinned
  18. 18.
    old
  19. 19.
    rawcontent
  20. 20.
    guildname
  21. 21.
    url
No brackets will return the message ID of the command being used.
undefined is returned when the property data cannot be fetched
author
authormention
authortag
authorname
channel
channelname
cleancontent
content
created
guildid
id
isdeleteable
isdeleted
iseditable
isedited
ispinnable
ispinned
rawcontent
old
guildname
url

Returns the ID of the user who sent the message.

Returns the mention value of the user who sent the message.

Returns the tag of the user who sent the message.

Returns the username of the user who sent the message.

Returns the ID of the channel where the message was sent.

Returns the name of the channel where the message was sent.

Returns the content of the message and cleans user and role mentions.

Does not clean @everyone or @here

Returns the raw content of the message including all mentions.

Returns the date and time at which the message was created.

Returns the guild ID of where the message was sent.

Returns the ID if the message.

Returns true or false if the message is deletable by the user running the command.

Returns true or false if the message has been deleted or no longer exists.

Returns true or false if the message is editable by the user running the command.

Returns true or false if the message has been edited.

Returns true or false if the message is pinnable by the user running the command.

Returns true or false if the message is currently pinned.

Returns the content of the message and removes ALL mentions from the response.

Returns the message before it was edited. See the isedited option.

Returns the guild name of where the message was sent .

Example 1: Fetching msg data in the current channel with message ID

bot.Command({
name: "msg",
code: `
$msg[$channelID[]$message[1];$message[2]]
`
})

Example 2: Fetching msg data with channel mention, name or ID and message ID

bot.Command({
name: "msg",
code: `
$msg[$findChannel[$message[1]];$message[2]];$message[3]]
`
})

Example 3: Returns the message ID of the command being used.

bot.Command({
name: "msg",
code: `
$msg
`
})
Last modified 1yr ago
Copy link