Interface IntegrationFormatter
public interface IntegrationFormatter
Create format for external integrations (Discord, Telegram, Twitch, etc.)
- Since:
- 1.10.0
-
Method Summary
Modifier and TypeMethodDescription@NonNull UnaryOperator<String> createFormat(@NonNull IntegrationMessageFormat integrationMessageFormat, @NonNull MessageContext messageContext) Creates a format function that processes and replaces placeholders in message templates.getExistedMessageNames(@NonNull ModuleName moduleName, @NonNull IntegrationMessageFormat integrationMessageFormat, MessageChannelSetting messageChannelSetting) Retrieves a list of message names that have corresponding non-empty channel configurations.booleanisVanished(MessageContext messageContext) Checks if the event sender is in vanish
-
Method Details
-
isVanished
Checks if the event sender is in vanish- Parameters:
messageContext- The message context containing sender information and optional vanish state- Returns:
- true if the sender is vanished and vanish should not be ignored, false otherwise
-
getExistedMessageNames
@NonNull List<String> getExistedMessageNames(@NonNull ModuleName moduleName, @NonNull IntegrationMessageFormat integrationMessageFormat, MessageChannelSetting messageChannelSetting) Retrieves a list of message names that have corresponding non-empty channel configurations.- Parameters:
moduleName- The module name to check for existence in message channelsintegrationMessageFormat- Contains the collection of message names to validatemessageChannelSetting- Configuration providing the mapping of channel names to message lists- Returns:
- A list of message names that have non-empty channel configurations, including the module name if applicable
-
createFormat
@NonNull UnaryOperator<String> createFormat(@NonNull IntegrationMessageFormat integrationMessageFormat, @NonNull MessageContext messageContext) Creates a format function that processes and replaces placeholders in message templates.- Parameters:
integrationMessageFormat- Provides integration-specific format transformationsmessageContext- The message context containing sender information and flags for message processing- Returns:
- A unary operator that takes an input string and returns the formatted message with all placeholders resolved
-