MessageBuffer

Utility class for constructing messages that can be sent over discord, allowing for inteligent limiting of size and stripping of formatting characters.

Constructors

this
this(bool codeBlock, bool filter, size_t maxLength)

Members

Functions

append
bool append(string line)

Append a line to this message. Returns false if the buffer is full.

appendf
bool appendf(string fmt, T args)

Format and append a line to this message. Returns false if the buffer is full.

getContents
immutable(string) getContents()
Undocumented in source. Be warned that the author may not have intended to support it.
popBack
string popBack()

Remove the last line in the buffer

Properties

contents
string contents [@property getter]

Formatted contents of this message.

length
size_t length [@property getter]

Current length of this message (without formatting)

maxLength
size_t maxLength [@property getter]

Max length of this message (subtracting for formatting)

Inherited Members

From BaseSendable

getEmbed
immutable(MessageEmbed) getEmbed()
Undocumented in source. Be warned that the author may not have intended to support it.
getContents
immutable(string) getContents()
Undocumented in source. Be warned that the author may not have intended to support it.
getNonce
immutable(string) getNonce()
Undocumented in source. Be warned that the author may not have intended to support it.
getTTS
immutable(bool) getTTS()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta