Search in sources :

Example 11 with Tierlist

use of de.tectoast.emolga.utils.draft.Tierlist in project Emolga by TecToast.

the class TierCommand method process.

@Override
public void process(GuildCommandEvent e) {
    TextChannel tco = e.getChannel();
    Message m = e.getMessage();
    String msg = m.getContentDisplay();
    Member member = e.getMember();
    String pkmn = getDraftGerName(e.getArguments().getText("mon")).getTranslation();
    Tierlist tierlist = Tierlist.getByGuild(tco.getGuild().getId());
    if (tierlist == null) {
        e.reply("Auf diesem Server ist keine Tierliste hinterlegt! Wenn du dies tun möchtest, melde dich bei Flo/TecToast.");
        return;
    }
    String tier = tierlist.getTierOf(pkmn);
    if (!tier.equals("")) {
        tco.sendMessage(pkmn + " ist im " + tier + "-Tier!").queue();
    } else {
        tco.sendMessage(pkmn + " befindet sich nicht in der Tierliste!").queue();
    }
}
Also used : TextChannel(net.dv8tion.jda.api.entities.TextChannel) Tierlist(de.tectoast.emolga.utils.draft.Tierlist) Message(net.dv8tion.jda.api.entities.Message) Member(net.dv8tion.jda.api.entities.Member)

Aggregations

Tierlist (de.tectoast.emolga.utils.draft.Tierlist)11 Member (net.dv8tion.jda.api.entities.Member)11 TextChannel (net.dv8tion.jda.api.entities.TextChannel)11 Draft (de.tectoast.emolga.utils.draft.Draft)10 JSONObject (org.jsolf.JSONObject)10 Command (de.tectoast.emolga.commands.Command)9 CommandCategory (de.tectoast.emolga.commands.CommandCategory)9 GuildCommandEvent (de.tectoast.emolga.commands.GuildCommandEvent)9 RequestBuilder (de.tectoast.emolga.utils.RequestBuilder)8 Draft.getIndex (de.tectoast.emolga.utils.draft.Draft.getIndex)8 DraftPokemon (de.tectoast.emolga.utils.draft.DraftPokemon)8 Coord (de.tectoast.emolga.utils.records.Coord)8 Collectors (java.util.stream.Collectors)8 Logger (org.slf4j.Logger)8 LoggerFactory (org.slf4j.LoggerFactory)8 com.google.api.services.sheets.v4.model (com.google.api.services.sheets.v4.model)4 java.util (java.util)4 Arrays (java.util.Arrays)4 LinkedList (java.util.LinkedList)4 List (java.util.List)4