Skip to content

Commit 0a5c4da

Browse files
committed
tellraw: log uncaught errors
1 parent 5021a5d commit 0a5c4da

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

Commands/FunCmds.cs

+2-1
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,10 @@ public async Task TellRaw(CommandContext ctx, [Parameter("channel"), Description
7171
{
7272
await channelObj.SendMessageAsync(new DiscordMessageBuilder().WithContent(input).WithReply(Convert.ToUInt64(replyID), pingreply, false));
7373
}
74-
catch
74+
catch (Exception e)
7575
{
7676
await ctx.RespondAsync($"Your dumb message didn't want to send. Congrats, I'm proud of you.", ephemeral: true);
77+
ctx.Client.Logger.LogError(e, "An error ocurred trying to send a tellraw message.");
7778
return;
7879
}
7980
await ctx.RespondAsync($"I sent your stupid message to {channelObj.Mention}.", ephemeral: true);

0 commit comments

Comments
 (0)