Search in sources :

Example 1 with ActionMessage

use of gartham.c10ver.response.actions.ActionMessage in project c10ver by Gartham.

the class PlayerController method info.

private DetailedActionReaction info(DetailedMenuMessage<DetailedActionReaction, DetailedActionButton> source) {
    return new DetailedActionReaction("\u2139", "Info", "Check battle queue or enemy stats.", t -> {
        var dam = new DetailedMenuMessage<>(new ActionMessage<>());
        DetailedActionReaction battleQueue = new DetailedActionReaction("Battle Queue", "Check the time until each creature's turn.", DetailedActionReaction.actionMessageAction(dam, t1 -> channel.sendMessage("Battle Queue:").setEmbeds(GarmonUtils.printBattleQueue(battle).build()).queue()));
        DetailedActionReaction back = new DetailedActionReaction("\u2B05", "Back", "Go back to attack menu.", DetailedActionReaction.actionMessageAction(source));
        dam.getReactions().add(battleQueue);
        dam.getReactions().add(back);
        dam.send(clover, channel, player);
    });
}
Also used : WebhookMessageBuilder(club.minnced.discord.webhook.send.WebhookMessageBuilder) Random(java.util.Random) TextChannel(net.dv8tion.jda.api.entities.TextChannel) Controller(gartham.c10ver.games.rpg.fighting.battles.api.Controller) User(net.dv8tion.jda.api.entities.User) List(java.util.List) DetailedActionReaction(gartham.c10ver.response.actions.DetailedActionReaction) GarmonUtils(gartham.c10ver.games.rpg.GarmonUtils) DetailedMenuMessage(gartham.c10ver.response.menus.DetailedMenuMessage) BigInteger(java.math.BigInteger) ActionMessage(gartham.c10ver.response.actions.ActionMessage) Clover(gartham.c10ver.Clover) DetailedActionButton(gartham.c10ver.response.actions.DetailedActionButton) DetailedMenuMessage(gartham.c10ver.response.menus.DetailedMenuMessage) DetailedActionReaction(gartham.c10ver.response.actions.DetailedActionReaction)

Aggregations

WebhookMessageBuilder (club.minnced.discord.webhook.send.WebhookMessageBuilder)1 Clover (gartham.c10ver.Clover)1 GarmonUtils (gartham.c10ver.games.rpg.GarmonUtils)1 Controller (gartham.c10ver.games.rpg.fighting.battles.api.Controller)1 ActionMessage (gartham.c10ver.response.actions.ActionMessage)1 DetailedActionButton (gartham.c10ver.response.actions.DetailedActionButton)1 DetailedActionReaction (gartham.c10ver.response.actions.DetailedActionReaction)1 DetailedMenuMessage (gartham.c10ver.response.menus.DetailedMenuMessage)1 BigInteger (java.math.BigInteger)1 List (java.util.List)1 Random (java.util.Random)1 TextChannel (net.dv8tion.jda.api.entities.TextChannel)1 User (net.dv8tion.jda.api.entities.User)1