TimerWithElapsedCancellationAsync SetupConnectedTimer() => new TimerWithElapsedCancellationAsync(5000, async () => {
if (!CommandAPI.IsConnected || !CommandAPI.IsReady)
return false;
try {
await ProcessSession().ConfigureAwait(false);
#if DEBUG
} catch (TimeoutException e) {
this.Logger().FormattedDebugException(e);
#else
} catch (TimeoutException) {
#endif
} catch (Exception e) {
this.Logger().FormattedWarnException(e);
}
return true;
});