package com.avairebot.orion.scheduler;

import com.avairebot.orion.Orion;
import com.avairebot.orion.contracts.scheduler.Job;
import net.dv8tion.jda.core.entities.Game;

public class ChangeGameJob extends Job {

    private int index = 0;

    public ChangeGameJob(Orion orion) {
        super(orion);
    }

    @Override
    public void run() {
        if (orion.config.getPlaying().size() <= index) {
            index = 0;
        }

        orion.getJDA().getPresence().setGame(
                Game.of(orion.config.getPlaying().get(index++))
        );
    }
}

@@ -501,16 +501,27 @@
 Game.of(
+formatGame(
 orion.co
@@ -551,16 +551,17 @@
 ndex++))
+)
 %0A       
@@ -569,11 +569,519 @@
 );%0A    %7D
+%0A%0A    private String formatGame(String game) %7B%0A        game = game.replaceAll(%22%25users%25%22, %22%22 + orion.getJDA().getUsers().size());%0A        game = game.replaceAll(%22%25guilds%25%22, %22%22 + orion.getJDA().getGuilds().size());%0A%0A        if (orion.getJDA().getShardInfo() != null) %7B%0A            game = game.replaceAll(%22%25shard-id%25%22, %22%22 + orion.getJDA().getShardInfo().getShardId());%0A            game = game.replaceAll(%22%25shard-total%25%22, %22%22 + orion.getJDA().getShardInfo().getShardTotal());%0A        %7D%0A%0A        return game;%0A    %7D
 %0A%7D%0A

Add user variables to bot game playing status