Search in sources :

Example 1 with GiveawayBuilder

use of me.piggypiglet.gary.core.objects.giveaways.GiveawayBuilder in project Gary by help-chat.

the class NewGiveaway method execute.

@Override
protected void execute(GuildMessageReceivedEvent e, String[] args) {
    GiveawayBuilder builder = new GiveawayBuilder();
    builder.setAuthor(e.getAuthor());
    builder.setEmote(args[0]);
    builder.setPrize(args[1]);
    TimeAPI time = new TimeAPI(args[2]);
    builder.setTime(time);
    builder.setTimeLeft(time);
    giveawayHandler.add(builder.build(garyBot));
}
Also used : TimeAPI(sh.okx.timeapi.TimeAPI) GiveawayBuilder(me.piggypiglet.gary.core.objects.giveaways.GiveawayBuilder)

Aggregations

GiveawayBuilder (me.piggypiglet.gary.core.objects.giveaways.GiveawayBuilder)1 TimeAPI (sh.okx.timeapi.TimeAPI)1