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:

  "guild": {
    "id": "622757587489914880",
    "name": "Operarting System",
    "icon": ""
  "channel": {
    "id": "622761218532179968",
    "name": "robit-commands",
    "type": "text"
  "author": {
    "id": "139871249567318017",
    "bot": false,
    "avatar": "",
    "nickname": "Peter",
    "username": "Big P",
    "colour": "#f1c40f",
    "roles": [
        "guild": "622757587489914880",
        "id": "666984345055264799",
        "name": "Big P",
        "color": 15844367,
        "hoist": true,
        "rawPosition": 45,
        "permissions": 104324808,
        "managed": false,
        "mentionable": false,
        "deleted": false,
        "createdTimestamp": 1579091859831
        "guild": "622757587489914880",
        "id": "622757587489914880",
        "name": "@everyone",
        "color": 0,
        "hoist": false,
        "rawPosition": 0,
        "permissions": 104193728,
        "managed": false,
        "mentionable": false,
        "deleted": false,
        "createdTimestamp": 1568547379134
  "content": "!test hello world",
  "reference": {
  "id": "828587624310505513",
  "timestamp": 1617621084049,
  "attachments": [""],
  "embeds": [{"title":"Spaghetti Again","type":"rich","description":null,"url":"","timestamp":null,"color":16711680,"fields":[],"thumbnail":{"url":"","proxyURL":"","height":720,"width":1280},"image":null,"author":{"name":"Spaghetti Again","url":""},"footer":null}]

Field Reference


This is the Discord server that the message was executed in.


The channel that the command was executed in.


The User that triggered the custom function



Last updated