/// <summary> /// Sends a reply indicating an error has occurred, by modifying the original deferred response. /// </summary> /// <param name="ex">The exception to log.</param> protected async Task SendDeferredErrorResponseAsync(Exception ex) { string errorMessage = GlobalConfiguration.GetGenericErrorMessage(Configuration["supportServerUrl"]); await Context.Interaction.ModifyOriginalResponseAsync((MessageProperties messageProperties) => messageProperties.Content = errorMessage); Logger.Error("Error al ejecutar comando.", ex); }
/// <summary> /// Sends a reply indicating an error has occurred. /// </summary> /// <param name="ex">The exception to log.</param> protected async Task SendErrorReply(Exception ex) { await ReplyAsync(GlobalConfiguration.GetGenericErrorMessage(Configuration["supportServerUrl"])); Logger.Error("Error al ejecutar comando.", ex); }