public static Task LogAsync(LogSeverity severity, string source, string message) { PrettyPrint.WriteLine($"[{severity}] \t", ConsoleColor.DarkMagenta); PrettyPrint.Write($"{source}: ", ConsoleColor.Blue); PrettyPrint.Write(message, ConsoleColor.White); return(Task.CompletedTask); }
public override IConfigurationBase GetOrCreateConfiguration() { Configurations config = base.GetOrCreateConfiguration() as Configurations; if (config.Tokens.DiscordBotToken == "") { PrettyPrint.Log(LogSeverity.Info, "Token", "Please enter your discord bot token: "); string intoken = Console.ReadLine(); Tokens.DiscordBotToken = intoken; SaveJson(); } return(config); }
public static void Log(CommandContext c) { var channel = (c.Channel as SocketGuildChannel); PrettyPrint.WriteLine(); if (channel == null) { PrettyPrint.Write($"[PM] ", ConsoleColor.Magenta); } else { PrettyPrint.Write($"[{c.Guild.Name} #{channel.Name}] ", ConsoleColor.DarkGreen); } PrettyPrint.Write($"{c.User}: ", ConsoleColor.Green); PrettyPrint.Write(c.Message.Content, ConsoleColor.White); }
public static void Log(IUserMessage msg) { var channel = (msg.Channel as IGuildChannel); PrettyPrint.WriteLine(); if (channel?.Guild == null) { PrettyPrint.Write($"[PM] ", ConsoleColor.Magenta); } else { PrettyPrint.Write($"[{channel.Guild.Name} #{channel.Name}] ", ConsoleColor.DarkGreen); } PrettyPrint.Write($"{msg.Author}: ", ConsoleColor.Green); PrettyPrint.Write(msg.Content, ConsoleColor.White); }
public static void Log(object severity, string source, string message) { PrettyPrint.WriteLine($"[{severity}] ", ConsoleColor.DarkMagenta); PrettyPrint.Write($"{source}: ", ConsoleColor.Blue); PrettyPrint.Write(message, ConsoleColor.White); }
private static void TimeStamp() { PrettyPrint.Write($"{DateTime.Now.ToString("hh:mm:ss")} ", ConsoleColor.DarkGray); }