discord-py-interactionsで時間がかかるコマンドを実行する
15分まで“this bot is thinking”を表示しておいてくれる
おそらく、コレをやっておかないとコマンドに失敗しました!のメッセージで中止されてしまう気がする
長い処理をする前に、await ctx.defer()を実行しておく
https://discord-interactions.readthedocs.io/en/latest/migration.html?highlight=defer#responding-deferring
code:defer.py
# After 2
@slash.slash(...)
async def command(ctx, ...):
await ctx.defer()
# Process that takes time
await ctx.send(...)
時間がかかるコマンドを実行する方法
#discord-py-interactions #注意