diff --git a/bot.py b/bot.py index 9e20fd6..a25e59d 100644 --- a/bot.py +++ b/bot.py @@ -146,52 +146,4 @@ class ApplicationModal(discord.ui.Modal): await user.send(f"Reason: {reason}") await interaction.response.send_message(content="Application declined", ephemeral=True) -@bot.slash_command() -async def test(ctx): - user = await ctx.author.create_dm() - await user.send("Hey! Your application has started. You have 300 seconds to complete it.") - - application = {'userId': ctx.author.id} - - modal_number = max_questions // 5 - - for i in range(1, max_questions+1): - modal = ApplicationModal(title=f"{SERVER_NAME} Application \n {questions[i]}") - modal.add_item(discord.ui.InputText(label=f"Answer: ", custom_id=f"question{question_index}")) - await ctx.send_modal(modal) - - - for i in range(1, max_questions+1): - modal.add_item(discord.ui.InputText(label=f"Question [{i}/{max_questions}]: {questions[i]}", placeholder="Placeholder Test"), custom_id=f"question{i}") - await user.send(embed=embed) - response = await bot.wait_for('message', check=lambda m: m.author == ctx.author and m.channel == user, timeout=300) - application[f'question{i}'] = response.content - - try: - with open('applications.json', 'r') as f: - data = json.load(f) - except (FileNotFoundError, json.JSONDecodeError): - data = [] - - data.append(application) - with open('applications.json', 'w') as f: - json.dump(data, f) - - - line = discord.ui.InputText(label="Short Input", placeholder="Placeholder Test") - line2 = discord.ui.InputText(label="Shorts Input", placeholder="Placeholsder Test") - #modal.children = [line] - #modal.callback - modal.add_item(discord.ui.InputText(label="Short Input", placeholder="Placeholder Test")) - await ctx.send_modal(modal) - - await modal.wait() - -async def callback(ctx, interact): - print(ctx) - print(ctx.message) - print(interact) - print("lol") - #await ctx.response.defer() - bot.run(TOKEN) \ No newline at end of file