package dev.nincodedo.ninbot.common.logging;

import lombok.experimental.UtilityClass;
import net.dv8tion.jda.api.entities.Channel;
import net.dv8tion.jda.api.entities.Guild;
import net.dv8tion.jda.api.entities.Member;

@UtilityClass
public class UtilLogging {

    public static final String NAME_ID_ENTITY_FORMAT = "%s(%s)";

    /**
     * Returns the guild name and id formatted for logging.
     *
     * @param guild
     * @return
     */
    public static String logGuildName(Guild guild) {
        if (guild == null) {
            return "null guild";
        }
        return String.format(NAME_ID_ENTITY_FORMAT, guild.getName(), guild.getId());
    }

    public static String logGuildInfo(Guild guild) {
        if (guild == null) {
            return "null guild";
        }
        return String.format("Server %s, Owner %s", logGuildName(guild), logMemberInfo(guild.retrieveOwner()
                .complete()));
    }

    public static String logMemberInfo(Member member) {
        return String.format(NAME_ID_ENTITY_FORMAT, member.getEffectiveName(), member.getId());
    }

    public static String logChannelInfo(Channel channel) {
        if (channel == null) {
            return "null channel";
        }
        return String.format(NAME_ID_ENTITY_FORMAT, channel.getName(), channel.getId());
    }
}

@@ -415,16 +415,26 @@
 am guild
+ JDA guild
 %0A     * 
@@ -440,16 +440,47 @@
  @return
+ String of guild name(guild id)
 %0A     */
@@ -689,32 +689,229 @@
 etId());%0A    %7D%0A%0A
+    /**%0A     * Returns the guild name, id and owner name, id formatted for logging.%0A     *%0A     * @param guild JDA guild%0A     * @return String of guild name(guild id), owner name(owner id)%0A     */%0A
     public stati
@@ -1174,162 +1174,495 @@
     
-public static String logMemberInfo(Member member) %7B%0A        return String.format(NAME_ID_ENTITY_FORMAT, member.getEffectiveName(), member.getId());%0A    %7D%0A
+/**%0A     * Returns the member name and id formatted for logging.%0A     *%0A     * @param member JDA member%0A     * @return String of member name(member id)%0A     */%0A    public static String logMemberInfo(Member member) %7B%0A        return String.format(NAME_ID_ENTITY_FORMAT, member.getEffectiveName(), member.getId());%0A    %7D%0A%0A    /**%0A     * Returns the channel name and id formatted for logging.%0A     *%0A     * @param channel JDA channel%0A     * @return String of channel name(channel id)%0A     */
 %0A   

Add doc