Skip to content

Commit

Permalink
tellraw: log uncaught errors
Browse files Browse the repository at this point in the history
  • Loading branch information
Erisa committed Feb 20, 2025
1 parent 5021a5d commit 0a5c4da
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Commands/FunCmds.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,10 @@ public async Task TellRaw(CommandContext ctx, [Parameter("channel"), Description
{
await channelObj.SendMessageAsync(new DiscordMessageBuilder().WithContent(input).WithReply(Convert.ToUInt64(replyID), pingreply, false));
}
catch
catch (Exception e)
{
await ctx.RespondAsync($"Your dumb message didn't want to send. Congrats, I'm proud of you.", ephemeral: true);
ctx.Client.Logger.LogError(e, "An error ocurred trying to send a tellraw message.");
return;
}
await ctx.RespondAsync($"I sent your stupid message to {channelObj.Mention}.", ephemeral: true);
Expand Down

0 comments on commit 0a5c4da

Please sign in to comment.