Exemplo n.º 1
0
        private Task LogError(LogMessage msg)
        {
            if (ravenClient == null)
            {
                Log(msg);
            }
            else
            {
                ravenClient.Capture(new SentryEvent(msg.Exception));
            }
            CommandException ce = msg.Exception as CommandException;

            if (ce != null)
            {
                ce.Context.Channel.SendMessageAsync("", false, new EmbedBuilder()
                {
                    Color       = Color.Red,
                    Title       = msg.Exception.InnerException.GetType().ToString(),
                    Description = Sentences.Error(ce.Context.Guild.Id, msg.Exception.InnerException.Message)
                }.Build());
            }
            return(Task.CompletedTask);
        }