Example #1
0
 @Override
 public int getPosition() {
   List<TextChannel> channels = guild.getTextChannels();
   for (int i = 0; i < channels.size(); i++) {
     if (channels.get(i) == this) return i;
   }
   throw new RuntimeException(
       "Somehow when determining position we never found the TextChannel in the Guild's channels? wtf?");
 }