$editMEssage

Edits an existing message.

Usage

$editMessage[channelID;messageID;content]

This function has three params.

Param
Description
Type
Required

channelID

The channel that this message belongs to.

Snowflake

Yes

messageID

The message to edit.

snowflake

Yes

content

The new contents of this message.

String

Yes

Example

bot.commands.add({
  type: "basicCommand",
  name: "example",
  code: `
    $let[msgid;$makeReturn[
      $channelSendMessage[$channelID;
        $title[1;Hello World!]
        $color[1;GREEN]
        $description[1;Hello, how are you?]
      ;yes]
    ]]

    $setTimeout[5s;
      $editMessage[$channelID;$get[msgid];
        $title[1;DBD.TS]
        $description[1;DBD.TS is epic!]
        $color[1;BLUE]
      ]
    ]
  `
})

Last updated

Was this helpful?