Esempio n. 1
0
        public async Task Players(string argument = null, params IUser[] users)
        {
            GameContext context = GameContexts.getContext(Context.Guild.Id);

            switch (argument)
            {
            case "add":
                context.AddPlayers(users);
                break;

            case "remove":
                context.RemovePlayers(users);
                break;

            case "clear":
                context.Players.Clear();
                break;

            default:
                if (context.Players.Count > 0)
                {
                    EmbedBuilder embed = new EmbedBuilder();
                    embed.WithTitle("Superfight Players");
                    string description = string.Empty;
                    foreach (IUser user in context.Players)
                    {
                        description += ((IGuildUser)user).Nickname + Environment.NewLine;
                    }
                    embed.WithDescription(description);
                    await ReplyAsync("", false, embed.Build());
                }
                else
                {
                    await ReplyAsync("There are currently no players playing Superfight");
                }

                break;
            }
        }