Exemplo n.º 1
0
                public async Task <RuntimeResult> SetSteamAsync([Remainder] string username)
                {
                    ulong id = await SteamService.GetIdFromVanityAsync(username).ConfigureAwait(false);

                    var record = await UserRepository.GetOrCreateGameAsync(Context.User).ConfigureAwait(false);

                    record.SteamId = id;
                    await UserRepository.SaveRepositoryAsync().ConfigureAwait(false);

                    return(CommandRuntimeResult.FromSuccess(
                               $"Successfully set steam to {Format.Bold((await SteamService.GetProfileAsync(id).ConfigureAwait(false))?.CustomURL ?? id.ToString())}"));
                }