$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.
    author
    2.
    authormention
    3.
    authortag
    4.
    authorname
    5.
    channel
    6.
    channelname
    7.
    cleancontent
    8.
    content
    9.
    created
    10.
    guildid
    11.
    id
    12.
    isdeletable
    13.
    isdeleted
    14.
    iseditable
    15.
    isedited
    16.
    ispinnable
    17.
    ispinned
    18.
    old
    19.
    rawcontent
    20.
    guildname
    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

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

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

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

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

1
bot.Command({
2
name: "msg",
3
code: `
4
$msg
5
`
6
})
Copied!
Last modified 3mo ago
Copy link