Skip to content

API Reference / ProxiedMessage

Interface: ProxiedMessage<TFragment>

Defined in: types.ts:72

Type Parameters

TFragment

TFragment extends MessageFragment = MessageFragment

Properties

member

member: Member

Defined in: types.ts:74

The member that was identified to be sending the message.


system

system: System

Defined in: types.ts:77

The system that the member belongs to.


color

color: string | null

Defined in: types.ts:83

The color to display this member's name as in chat. Uses the member's color when set, and falls back to the system's color if not.


pronouns

pronouns: string | null

Defined in: types.ts:93

The pronouns to display for this member. This is free text (i.e. "they/them", or "she/they"). Uses the member's pronouns when set, and falls back to the system's if not. Note: When set, these should take precedent over other pronoun sources such as alejo, PronounDB, etc.


proxyUsed?

optional proxyUsed?: Proxy

Defined in: types.ts:99

The proxy that was detected in the message, if any. This will be undefined if an autoproxy was used.


cleanFragments

cleanFragments: TFragment[]

Defined in: types.ts:105

The message's fragments with the proxy removed. If no proxy was used, a copy of the original fragments will be returned.


changedFragments

changedFragments: Record<number, TFragment | null>

Defined in: types.ts:117

The fragments to change or remove in order to remove the proxy from the message. Fragments are keyed by their original index in the message. If a value is null, that fragment should be removed, otherwise it should be updated. This will be an empty object if no proxy was used.

Note: Depending on your use case, cleanFragments may be simpler. Check out both options to see which works best for you. You'll only need to use one or the other.


body

body: string

Defined in: types.ts:123

The content of the message with the proxy removed. If autoproxy was used, this will be the original message body.