Class WebhookService

    • Constructor Detail

      • WebhookService

        public WebhookService​(Router router)
    • Method Detail

      • createWebhook

        public Mono<discord4j.discordjson.json.WebhookData> createWebhook​(long channelId,
                                                                          discord4j.discordjson.json.WebhookCreateRequest request,
                                                                          @Nullable
                                                                          String reason)
      • getChannelWebhooks

        public Flux<discord4j.discordjson.json.WebhookData> getChannelWebhooks​(long channelId)
      • getGuildWebhooks

        public Flux<discord4j.discordjson.json.WebhookData> getGuildWebhooks​(long guildId)
      • getWebhook

        public Mono<discord4j.discordjson.json.WebhookData> getWebhook​(long webhookId)
      • getWebhookWithToken

        public Mono<discord4j.discordjson.json.WebhookData> getWebhookWithToken​(long webhookId,
                                                                                String token)
      • modifyWebhook

        public Mono<discord4j.discordjson.json.WebhookData> modifyWebhook​(long webhookId,
                                                                          discord4j.discordjson.json.WebhookModifyRequest request,
                                                                          @Nullable
                                                                          String reason)
      • modifyWebhookWithToken

        public Mono<discord4j.discordjson.json.WebhookData> modifyWebhookWithToken​(long webhookId,
                                                                                   String token,
                                                                                   discord4j.discordjson.json.WebhookModifyWithTokenRequest request)
      • deleteWebhookWithToken

        public Mono<Void> deleteWebhookWithToken​(long webhookId,
                                                 String token)
      • executeWebhook

        public Mono<discord4j.discordjson.json.MessageData> executeWebhook​(long webhookId,
                                                                           String token,
                                                                           boolean wait,
                                                                           MultipartRequest<? extends discord4j.discordjson.json.WebhookExecuteRequest> request)
        Executes the specified webhook.
        Parameters:
        wait - true if you want to return message data and errors for the webhook.
        Returns:
        If wait is true, a mono that contains the message information of the execution or an error if the webhook is unsuccessful. If wait is false, the mono completes as soon as the request is finished sending, and DOES NOT result in an error if the message is not saved.
      • getWebhookMessage

        public Mono<discord4j.discordjson.json.MessageData> getWebhookMessage​(long webhookId,
                                                                              String webhookToken,
                                                                              String messageId)
      • modifyWebhookMessage

        public Mono<discord4j.discordjson.json.MessageData> modifyWebhookMessage​(long webhookId,
                                                                                 String webhookToken,
                                                                                 String messageId,
                                                                                 discord4j.discordjson.json.WebhookMessageEditRequest request)
      • modifyWebhookMessage

        public Mono<discord4j.discordjson.json.MessageData> modifyWebhookMessage​(long webhookId,
                                                                                 String webhookToken,
                                                                                 String messageId,
                                                                                 MultipartRequest<discord4j.discordjson.json.WebhookMessageEditRequest> request)
      • deleteWebhookMessage

        public Mono<Void> deleteWebhookMessage​(long webhookId,
                                               String webhookToken,
                                               String messageId)