示例#1
0
 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);
 }
示例#2
0
        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);
        }
示例#3
0
        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);
        }
示例#4
0
 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);
 }
示例#5
0
 private static void TimeStamp()
 {
     PrettyPrint.Write($"{DateTime.Now.ToString("hh:mm:ss")} ", ConsoleColor.DarkGray);
 }