use of net.kodehawa.mantarobot.db.redis.RedisCachedDatabase in project MantaroBot by Mantaro.
the class MantaroData method db.
public static ManagedDatabase db() {
if (db == null) {
Config.RedisInfo i = config().get().redis;
if (i.enabled) {
RedissonClient client = redisson();
db = new RedisCachedDatabase(conn(), map(client, "custom-commands", i.customCommands), map(client, "guilds", i.guilds), map(client, "players", i.players), map(client, "users", i.users), map(client, "premium-keys", i.premiumKeys), client.getBucket("mantaro"));
} else {
db = new ManagedDatabase(conn());
}
}
return db;
}
Aggregations