HomeAITSYS Dev

Add a try-catch block on command update

Description

Add a try-catch block on command update

Instead of blindly running GetGuildApplicationCommandAsync, add a try catch block around it and try falling back to GetGlobalApplicationCommandAsync if a NotFoundException is thrown.

A better alternative would be to create a cache of all registered commands and first try fetching the command from the cache instead of running the web request.

Details

Provenance
KuraAuthored on Tue, Oct 12, 17:23
Parents
rDCS8415aeb2c94a: [skip appveyor] Fix invalid statement
Branches
Unknown
Tags
Unknown

Event Timeline

Ch. König <cking@users.noreply.github.com> committed rDCSd439db7c9e09: Add a try-catch block on command update (authored by Ch. König <cking@users.noreply.github.com>).Tue, Oct 12, 17:24