Exemplo n.º 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);
 }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
 }