ImplMessage.java 文件源码

java
阅读 17 收藏 0 点赞 0 评论 0

项目:Javacord 作者:
@Override
public Future<Void> removeAllReactions() {
    return api.getThreadPool().getExecutorService().submit(new Callable<Void>() {
        @Override
        public Void call() throws Exception {
            logger.debug("Trying to remove all reactions from message {}", ImplMessage.this);
            HttpResponse<JsonNode> response = Unirest
                    .delete("https://discordapp.com/api/v6/channels/" + channelId + "/messages/" + getId() + "/reactions")
                    .header("authorization", api.getToken())
                    .asJson();
            api.checkResponse(response);
            if (isPrivateMessage()) {
                api.checkRateLimit(response, RateLimitType.UNKNOWN, null, null);
            } else {
                api.checkRateLimit(response, RateLimitType.UNKNOWN, null, getChannelReceiver());
            }
            logger.debug("Removed all reactions from message {}", ImplMessage.this);
            return null;
        }
    });
}
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号