示例#1
0
        public async Task AddingDrops(ulong id, ulong idItem)
        {
            if (!IsHavingThisRole((SocketGuildUser)Context.User, "Developer") &&
                !IsHavingThisRole((SocketGuildUser)Context.User, "Quiz Manager"))
            {
                return;
            }
            Quiz selected = Quizzes.GetQuiz(id);

            if (selected == null)
            {
                await Context.Channel.SendMessageAsync("`NO QUIZ FOUND WITH THAT ID`");

                return;
            }
            if (selected.Drop.Count >= 3)
            {
                await Context.Channel.SendMessageAsync("`CAN'T ADD MORE DROPS`");

                return;
            }
            Item drop = Drops.GetSpecificItem(idItem);

            if (drop == null)
            {
                await Context.Channel.SendMessageAsync("`NO ITEM FOUND WITH THAT ID`");

                return;
            }
            Quizzes.AddingDrops(selected, drop);
            await Context.Channel.SendMessageAsync("`DROP HAS BEEN ADDED`");
        }