Class Discord


  • public class Discord
    extends java.lang.Object
    • Constructor Summary

      Constructors 
      Constructor Description
      Discord​(KSContext ctx)  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean sendWebhookMessage​(java.lang.String message)
      Send a simple webhook message without a file attachment
      boolean sendWebhookWithFile​(java.lang.String message, java.io.File file)
      Send a webhook message with optional file attachment
      void testWebhookUrl()  
      • Methods inherited from class java.lang.Object

        equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • sendWebhookWithFile

        public boolean sendWebhookWithFile​(java.lang.String message,
                                           java.io.File file)
        Send a webhook message with optional file attachment
        Parameters:
        webhookUrl - The Discord webhook URL to send the message to
        message - The message content to send
        file - Optional file attachment (screenshot)
        ctx - Context for logging errors
        Returns:
        Whether the webhook was sent successfully
      • sendWebhookMessage

        public boolean sendWebhookMessage​(java.lang.String message)
        Send a simple webhook message without a file attachment
        Parameters:
        webhookUrl - The Discord webhook URL to send the message to
        message - The message content to send
        ctx - Context for logging errors
        Returns:
        Whether the webhook was sent successfully
      • testWebhookUrl

        public void testWebhookUrl()