Skip to content

messages: Support silent flag #161

Description

@InterLinked1

Describe the feature

I use this library for an IRC relay (bot), and it would be helpful to be able to use the @silent feature that seems to exist now, particularly for IRC join/part/quit messages, to avoid notifying everyone on Discord when these events happen, as there are currently a lot of complaints about this.

The message flag is documented here: https://github.com/discord/discord-api-docs/pull/5894/files

I confirmed by analyzing the network requests that the only different when using this feature is the flag is indeed set to 4096 (1 << 12), as opposed to 0, so this appears to be correct.

It appears that this would be the right place to add the flag: https://github.com/Cogmasters/concord/blob/master/gencodecs/api/channel.PRE.h#L30

I'm less certain about how the flag would be used. The only place I see any flags being used is here:

.flags = DISCORD_MESSAGE_EPHEMERAL // 1 << 6

However, I would think that flags would need to be provided in create_message, e.g. here:

discord_create_message(struct discord *client,

Since I don't see this, would the ability to specify flags when sending a message need to be added as well, or is the other example the proper way to send messages if flags need to be added? I'm less sure about this, otherwise I think this should be a fairly straightforward addition.

Metadata

Metadata

Labels

enhancementNew feature or request

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions