Skip to content

OnBotException handler

Arius Bronte edited this page Feb 23, 2020 · 1 revision

Basic usage

commands.OnBotException(async (api, message, e, token) =>
{
    await api.Messages.SendAsync(new MessagesSendParams
    {
        PeerId = message.Message.PeerId.Value,
        Message = "Why did you break the bot?",
        RandomId = random.Next(int.MinValue, int.MaxValue)
    });
});
Clone this wiki locally