Ejemplo n.º 1
0
        public static async Task Client_UnknownEvent(DiscordClient sender, UnknownEventArgs e)
        {
            var msg = "Unknown Event Triggered: " + e.EventName;

            sender.Logger.LogWarning(msg);
            await LogChannel.SendLogMessageAsync("Unknow Event", msg, LogLevel.Warning);
        }
Ejemplo n.º 2
0
        public static async Task Client_Ready(DiscordClient sender, ReadyEventArgs e)
        {
            sender.Logger.LogInformation("Client ready!");
            await LogChannel.SendLogMessageAsync("Client ready", $"Client started at {DateTime.Now}", LogLevel.Information);

            e.Handled = true;
        }
Ejemplo n.º 3
0
 public static async Task Client_ClientErrored(DiscordClient sender, ClientErrorEventArgs e)
 {
     sender.Logger.LogError(e.Exception.Message);
     await LogChannel.SendLogMessageAsync(e.EventName, e.Exception.Message, LogLevel.Error);
 }