Skip to content

Commit

Permalink
Moved the callback note back to where it was
Browse files Browse the repository at this point in the history
  • Loading branch information
Henonicks committed May 13, 2024
1 parent ca180b8 commit d515cf6
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,14 @@

Sometimes we need to update an object, such as a message (whether it's plain text or an embed) or a channel. At first, it might seem confusing, but it's actually really simple! You need an object with all the properties being identical to the existing one. Say you're editing a message. You need to have an object with its ID the same as the one in Discord. Then you replace what you need, such as its content.

\note This example uses callback functions and embeds. To see more information about them, visit \ref callback-functions and

## Editing messages
Here we send a message and edit it after. To do so, we first reply to the command `msg-send` with some text, "This is a message" in our case. As described above, on the next step the message object is taken and the text is replaced with whatever the user desires.

\include{cpp} editing_messages1.cpp

\note Your bot can't edit messages sent by others!
\note This example uses callback functions and embeds. To see more information about them, visit \ref callback-functions and \ref embed-message.
\note Your bot can't edit messages sent by others!\ref embed-message.

Before editing the message:

Expand Down

0 comments on commit d515cf6

Please sign in to comment.