Example #1
0
        public async Task AddingHints(ulong id, [Remainder] string url1)
        {
            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.Hints.Count >= 3)
            {
                await Context.Channel.SendMessageAsync("`CAN'T ADD MORE HINT`");

                return;
            }

            Quizzes.AddingHints(selected, url1);
            await Context.Channel.SendMessageAsync("`HINT HAS BEEN ADDED`");
        }