I’m using py-cord and my Discord bot is thinking even after it has already sent a response.
@client.slash_command() async def response(ctx, input): await ctx.defer(ephemeral=True) response = chatbot_client.response(input) await ctx.send(response.content)
I’m deferring since the .response function takes so long that the bot will exit out from the command if I don’t.
Is there any fix to it?
Advertisement
Answer
@client.slash_command() async def response(ctx, input): await ctx.defer(ephemeral=True) response = chatbot_client.response(input) await ctx.respond(response.content)
ctx.respond will respond to it: it will be viewable by anyone. Idk if i helped u. If no, you can dm me : Liam_#8834 .