bwmarrin / discordgo

(Golang) Go bindings for Discord
BSD 3-Clause "New" or "Revised" License
5.11k stars 816 forks source link

Can't add SUPPRESS_EMBED flag to other user's message #1484

Closed SamusAranX closed 9 months ago

SamusAranX commented 10 months ago

I have a code snippet in my messageCreate handler like this:

edit := discordgo.NewMessageEdit(messageCreate.ChannelID, messageCreate.ID)
edit.Flags = messageCreate.Flags | discordgo.MessageFlagsSuppressEmbeds
_, err := session.ChannelMessageEditComplex(edit)
if err != nil {
    return err
}

and while this should work according to Discord's documentation, this keeps failing with the following error message:

HTTP 403 Forbidden, {"message": "Cannot edit a message authored by another user", "code": 50005}

Did I miss anything? Is there another way to apply the embed suppression flag to someone else's message while not touching anything else?

FedorLap2006 commented 10 months ago

You did not miss anything. Components and Embeds are the culprit here. When making request they're not omitted.

image