private async Task DiscordShardedClientOnCurrentUserUpdated(SocketSelfUser arg1, SocketSelfUser arg2) { if (CurrentUserUpdated != null) { await CurrentUserUpdated.Invoke(this, arg1, arg2).ConfigureAwait(false); } }
private void OnCurrentUserUpdated() { var args = new CurrentUserEventArgs { UserId = _currentUser.UserId, UserName = _currentUser.Name }; CurrentUserUpdated?.Invoke(this, args); }
public event Func <Task> Connected; // Done internal async Task OnCurrentUserUpdated(SocketSelfUser before, SocketSelfUser after) => await(CurrentUserUpdated?.Invoke(before, after) ?? Task.CompletedTask);