Interface DiscordMessageContext
- All Superinterfaces:
MessageContext, StringMessageContext
A message that came from Discord.
Builds on
StringMessageContext.-
Nested Class Summary
Nested classes/interfaces inherited from interface MessageContext
MessageContext.CacheKey -
Method Summary
Modifier and TypeMethodDescriptionstatic net.flectone.pulse.module.integration.discord.model.DiscordMessageContextImpl.DiscordMessageContextImplBuilderbuilder()Starts building this context.@NonNull StringThe name shown for the author.@NonNull StringThe author's Discord display name.@NonNull Stringnickname()The author's nickname on the server.reply()The author and text of the replied-to message, or null.@NonNull StringuserName()The author's Discord handle.withDisplayName(@NonNull String displayName) Returns a copy carrying a different value.withGlobalName(@NonNull String globalName) Returns a copy carrying a different value.withNickname(@NonNull String nickname) Returns a copy carrying a different value.Returns a copy carrying a different value.withUserName(@NonNull String userName) Returns a copy carrying a different value.Methods inherited from interface MessageContext
addFlag, addFlags, addTagResolver, addTagResolvers, base, createCacheKey, flags, isFlag, message, receiver, sender, tagResolver, toBuilder, uuid, withBase, withFlags, withMessage, withReceiver, withSender, withTagResolver, withUuidMethods inherited from interface StringMessageContext
string, withString
-
Method Details
-
builder
static net.flectone.pulse.module.integration.discord.model.DiscordMessageContextImpl.DiscordMessageContextImplBuilder builder()Starts building this context.- Returns:
- a new builder
-
globalName
@NonNull String globalName()The author's Discord display name.- Returns:
- the author's Discord display name
-
nickname
@NonNull String nickname()The author's nickname on the server.- Returns:
- the author's nickname on the server
-
displayName
-
userName
-
reply
-
withGlobalName
Returns a copy carrying a different value.- Parameters:
globalName- the author's Discord display name- Returns:
- the copy
-
withNickname
Returns a copy carrying a different value.- Parameters:
nickname- the author's nickname on the server- Returns:
- the copy
-
withDisplayName
Returns a copy carrying a different value.- Parameters:
displayName- the name shown for the author- Returns:
- the copy
-
withUserName
Returns a copy carrying a different value.- Parameters:
userName- the author's Discord handle- Returns:
- the copy
-
withReply
Returns a copy carrying a different value.- Parameters:
reply- the author and text of the replied-to message, or null- Returns:
- the copy
-