Skip to content

Commit

Permalink
Fuck it, removed the request to GET a message by id
Browse files Browse the repository at this point in the history
  • Loading branch information
austinv11 committed Aug 23, 2016
1 parent 1e31567 commit d6a0aec
Showing 1 changed file with 1 addition and 12 deletions.
13 changes: 1 addition & 12 deletions src/main/java/sx/blah/discord/util/MessageList.java
Expand Up @@ -334,18 +334,7 @@ public void clear() {
* @return The message object found, or null if nonexistent.
*/
public IMessage get(String id) {
try {
return stream().filter((m) -> m.getID().equalsIgnoreCase(id)).findFirst().orElse(hasPermission ?
DiscordUtils.getMessageFromJSON(client, channel,
DiscordUtils.GSON.fromJson(
client.REQUESTS.GET.makeRequest(
DiscordEndpoints.CHANNELS + channel.getID() + "/messages/" + id,
new BasicNameValuePair("content-type", "application/json"),
new BasicNameValuePair("authorization", client.getToken())),
MessageResponse.class)) : null);
} catch (RateLimitException | DiscordException e) {
return null;
}
return stream().filter((m) -> m.getID().equalsIgnoreCase(id)).findFirst().orElse(null);
}

/**
Expand Down

0 comments on commit d6a0aec

Please sign in to comment.