public void GetSteamProfile()
 {
     Assert.IsNotNull(SteamService.GetSteamProfileAsync("criticalflaw").Result);
     Assert.IsNotNull(SteamService.GetSteamSummaryAsync("criticalflaw").Result);
     Assert.IsNull(SteamService.GetSteamProfileAsync("99999999999999999").Result);
     Assert.IsNull(SteamService.GetSteamSummaryAsync("99999999999999999").Result);
 }
Exemple #2
0
 public void GetSteamProfile()
 {
     Assert.IsNotNull(SteamService.GetSteamProfileAsync(TestSetup.Tokens.SteamToken, "criticalflaw")
                      .Result);
     Assert.IsNull(SteamService.GetSteamProfileAsync(TestSetup.Tokens.SteamToken, "99999999999999999")
                   .Result);
 }
        public async Task SteamUser(CommandContext ctx,
                                    [Description("User to find on Steam")][RemainingText] string query)
        {
            if (!BotServices.CheckUserInput(query))
            {
                return;
            }
            var profile = SteamService.GetSteamProfileAsync(query).Result;
            var summary = SteamService.GetSteamSummaryAsync(query).Result;

            if (profile is null && summary is null)
            {
                await BotServices.SendEmbedAsync(ctx, Resources.NOT_FOUND_GENERIC, EmbedType.Missing).ConfigureAwait(false);
            }