Discord options for every write inside an effect; None leaves a
field as the enclosing options set it.
notify_users,notify_roles,notify_everyoneandnotify_replied_user: who a write may notify. Default: nobody, and a reply does not ping its author.notify_everyoneallows@everyoneand@here.suppress_embeds: default true, which sends theSUPPRESS_EMBEDSflag on the post and on every edit, so a link a later edit adds gets no embed either. False sends no flag on a post and clears it on an edit.fail_if_not_exists: what a post withreply_todoes when that message is gone. Default true: Discord refuses the post. False sendsfail_if_not_exists: false, and Discord posts the message without the reference.auto_archive_duration: forstart_thread, in minutes. Default: the channel's.
Attributes#
| Attribute | Type | Description |
|---|---|---|
notify_users | Sequence[str] | None = None | |
notify_roles | Sequence[str] | None = None | |
notify_everyone | bool | None = None | |
notify_replied_user | bool | None = None | |
suppress_embeds | bool | None = None | |
fail_if_not_exists | bool | None = None | |
auto_archive_duration | AutoArchiveDuration | None = None |
Functions#
__init__#
__init__(*, notify_users=None, notify_roles=None, notify_everyone=None, notify_replied_user=None, suppress_embeds=None, fail_if_not_exists=None, auto_archive_duration=None) -> None| Parameter | Type | Description |
|---|---|---|
notify_users | Sequence[str] | None = None | |
notify_roles | Sequence[str] | None = None | |
notify_everyone | bool | None = None | |
notify_replied_user | bool | None = None | |
suppress_embeds | bool | None = None | |
fail_if_not_exists | bool | None = None | |
auto_archive_duration | AutoArchiveDuration | None = None |
merge#
merge(inner) -> DiscordPostOptionsThese options with inner's set fields winning.
| Parameter | Type | Description |
|---|---|---|
inner | DiscordPostOptions |
Returns DiscordPostOptions
def merge(self, inner: DiscordPostOptions) -> DiscordPostOptions:
"""These options with ``inner``'s set fields winning."""
changes: dict[str, object] = {
field.name: value
for field in fields(inner)
if (value := getattr(inner, field.name)) is not None
}
return replace(self, **changes)