Example #1
0
        public async Task FivemHex([Remainder] string id)
        {
            var foundedSteamId = _steamService.ConvertSteamHexInt64(id.Replace("steam:", ""));

            if (foundedSteamId != 0)
            {
                id = foundedSteamId.ToString();
            }
            var convertedHex = "steam:";
            var steamprofile = _steamService.GetProfileSteamId(id);

            if (steamprofile.Profile == null)
            {
                steamprofile = _steamService.GetProfileId(id);
            }
            if (steamprofile.Profile != null)
            {
                convertedHex += _steamService.GetSteamHex(Convert.ToInt64(steamprofile.Profile.SteamId64));
                var eb = new EmbedBuilder();
                eb.WithDescription(convertedHex);
                var lastGame = "";
                if (steamprofile.Profile.MostPlayedGames != null)
                {
                    lastGame = "\n" + steamprofile.Profile.MostPlayedGames.MostPlayedGame[0].GameName.CdataSection + "\n" + steamprofile.Profile.MostPlayedGames.MostPlayedGame[0].HoursOnRecord + " Saat";
                }
                eb.WithAuthor(steamprofile.Profile.SteamId.CdataSection + lastGame);
                eb.WithThumbnailUrl(steamprofile.Profile.AvatarFull.CdataSection);
                await Context.Channel.SendMessageAsync("", false, eb.Build());

                return;
            }
            await ReplyAsync("Steam Profili bulunamadı!");
        }