Message Object
The message object is a global value passed into the custom command when it's run. It contains information about the message that triggered it such as the command or message containing the trigger word. Here is an example of the layout:
Field Reference
guild
This is the Discord server that the message was executed in.
Field | Content |
id | The ID of the Guild |
name | The name of the Guild |
icon | The URL of the current Guild Icon |
channel
The channel that the command was executed in.
Field | Content |
id | The ID of the Channel |
name | The name of the Channel |
type | The Type of the channel, technically can be one of these values: |
author
The User that triggered the custom function
Field | Content |
id | The ID of the User |
bot |
|
avatar | The URL of the User's current avatar |
nickname | The Users nickname in this server, if it isn't set this is blank |
username | The Users username |
colour | The display colour of the users name, set by the hoist role |
roles | An array of roles the User has. Always contains at least one role which is @everyone |
content | The raw content of the message |
reference | If the message is a reply to another message, the guild, channel and message IDs of that message are here. |
id | The message ID |
timestamp | The timestamp that the message was sent at, in milliseconds |
attachments | An array of URLs attached to this message |
embeds | An array of embeds attached to this message |
author.roles
Field | Content |
guild | The Guild ID that this role belongs to |
id | The ID of the role |
name | The name of the role |
color | The colour of the role, represented as an integer |
hoist | Whether or not this role is displayed separately in the user list |
rawPosition | The position of the role in the role list |
permissions | The bitfield of the role's permissions |
managed | Whether the role belongs to an integration |
mentionable | Whether or not you can mention the role |
deleted | Whether or not the role has been deleted |
createdTimestamp | The timestamp the role was created, in milliseconds |
embeds
Field | Content |
title | The title of the embed |
type | Embed type, usually "rich" |
description | The text body of the embed |
url | The URL that the embed title links to |
timestamp | Timestamp set in the embed |
color | The colour of the embed, as a decimal |
fields | An array of fields |
thumbnail | The thumbnail in the embed with direct URL and proxyURL |
image | Image attached to the embed |
author | The author specifying in the embed as name, url |
footer | Embed footer |
Last updated