Skip to content

Commit

Permalink
I need to stop putting the version name as the commit name
Browse files Browse the repository at this point in the history
  • Loading branch information
metagn committed Dec 7, 2017
1 parent 13c0b55 commit 8f7a3ba
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 4 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,8 @@ i am about the list the pros and cons, but first some that might be one of both

* Uses Groovy's JSON parsers which are very fast and/but directly return Java objects.

* Based on Map<String, Object>s instead of immutable objects.
* Caches use JSON objects instead of immutable objects. This also allows for raw Discord data to be
observed. So if you did `group.object.application_id`, you would get the application_id Discord gave.

* No interfaces for Discord objects.

Expand Down
2 changes: 1 addition & 1 deletion examples/bot/CommandBotExample.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ bot.command("hello") {
bot.formatter = { "| $it |" }

bot.command(["say", "repeat", ~/echo+/]) {
respond arguments
formatted arguments
}

bot.command "mfw", category: "meme", {
Expand Down
2 changes: 1 addition & 1 deletion src/main/groovy/hlaaftana/discordg/net/RateLimit.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package hlaaftana.discordg.net

import groovy.transform.CompileStatic
import groovy.transform.InheritConstructors
import hlaaftana.discordg.DiscordObject;
import hlaaftana.discordg.DiscordObject

@InheritConstructors
@CompileStatic
Expand Down
4 changes: 3 additions & 1 deletion src/main/groovy/hlaaftana/discordg/objects/Channel.groovy
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,12 @@ class Channel extends DiscordObject {
boolean isGroup(){ type == 3 }
boolean isInGuild(){ text || voice || category }
boolean isCategory() { type == 4 }
String getCategoryId() { (String) object.parent_id }
Channel getCategory() { null == categoryId ? null : guild.channel(categoryId) }
boolean isNsfw() { (boolean) object.nsfw }
String getTopic(){ (String) object.topic }
Guild getGuild(){ dm || group ? null : client.guildCache.at(guildId) }
String getGuildId(){ (String) object.guild_id }
Guild getParent(){ guild }
List<User> getUsers(){
(List<User>) (inGuild ? members : (recipients + client.user))
}
Expand Down

0 comments on commit 8f7a3ba

Please sign in to comment.