Пример #1
0
 private async Task DiscordShardedClientOnCurrentUserUpdated(SocketSelfUser arg1, SocketSelfUser arg2)
 {
     if (CurrentUserUpdated != null)
     {
         await CurrentUserUpdated.Invoke(this, arg1, arg2).ConfigureAwait(false);
     }
 }
Пример #2
0
        private void OnCurrentUserUpdated()
        {
            var args = new CurrentUserEventArgs
            {
                UserId   = _currentUser.UserId,
                UserName = _currentUser.Name
            };

            CurrentUserUpdated?.Invoke(this, args);
        }
Пример #3
0
        public event Func <Task> Connected; // Done

        internal async Task OnCurrentUserUpdated(SocketSelfUser before, SocketSelfUser after) => await(CurrentUserUpdated?.Invoke(before, after) ?? Task.CompletedTask);