Search in sources :

Example 1 with GuildLogObject

use of com.github.vaerys.objects.GuildLogObject in project DiscordSailv2 by Vaerys-Dawn.

the class GuildObject method sendDebugLog.

public void sendDebugLog(CommandObject command, String type, String name, String contents) {
    GuildLogObject object = new GuildLogObject(command, type, name, contents);
    String output = object.getOutput(command);
    if (command.guild.get() != null) {
        guildLog.addLog(object, command.guild.longID);
    } else {
        Globals.addToLog(new LogObject(object, -1));
    }
    logger.trace(output);
}
Also used : GuildLogObject(com.github.vaerys.objects.GuildLogObject) GuildLogObject(com.github.vaerys.objects.GuildLogObject) LogObject(com.github.vaerys.objects.LogObject)

Example 2 with GuildLogObject

use of com.github.vaerys.objects.GuildLogObject in project DiscordSailv2 by Vaerys-Dawn.

the class GuildLog method addLog.

public void addLog(GuildLogObject logObject, long guildID) {
    logs.add(logObject);
    Globals.addToLog(new LogObject(logObject, guildID));
    if (logs.size() > 1000) {
        logs.remove(0);
    }
}
Also used : LogObject(com.github.vaerys.objects.LogObject) GuildLogObject(com.github.vaerys.objects.GuildLogObject)

Aggregations

GuildLogObject (com.github.vaerys.objects.GuildLogObject)2 LogObject (com.github.vaerys.objects.LogObject)2