Пример #1
0
        public async Task Status(CommandContext ctx)
        {
            dynamic lastStream = JArray.FromObject(da.GetLastStream(ctx.Guild.Id));
            var     streams    = JArray.FromObject(da.GetAllStreams(ctx.Guild.Id));
            var     avatar     = ctx.Guild.IconUrl;
            var     features   = ctx.Guild.Features.Cast <string>();
            var     large      = ctx.Guild.IsLarge;
            var     members    = ctx.Guild.MemberCount;
            var     splash     = ctx.Guild.SplashUrl;
            var     list       = "";

            foreach (var feature in features)
            {
                list += feature.ToLower().Replace("_", " ") + ", ";
            }

            var embed = DiscordEmbed.BotStatusBuilder($"{lastStream[0]["Twitch"]} - <@!{lastStream[0]["discordId"]}>",
                                                      $"{TwitchTasks.bRunning}", streams.Count().ToString(), avatar, list, large, members.ToString(), splash);
            await ctx.RespondAsync(embed : embed);
        }