python - Discord.py view doesn't call "on_timeout()" method - Stack Overflow

class MyView(discord.ui.View):async def on_timeout(self):print('TIMEOUT')...If I set the time

class MyView(discord.ui.View):
    async def on_timeout(self):
        print('TIMEOUT')
        ...

If I set the timeout time to 15 minutes, it works, but if I set it to 24 hours, it doesn't work.

discord.errors.ConnectionClosed: Shard ID None WebSocket closed with 1000
When I see this, it seems like the call isn't being made. Is this the problem?

I'm running my bot on AWS free server.

class MyView(discord.ui.View):
    async def on_timeout(self):
        print('TIMEOUT')
        ...

If I set the timeout time to 15 minutes, it works, but if I set it to 24 hours, it doesn't work.

discord.errors.ConnectionClosed: Shard ID None WebSocket closed with 1000
When I see this, it seems like the call isn't being made. Is this the problem?

I'm running my bot on AWS free server.

Share Improve this question asked Mar 22 at 4:37 cmaxyscmaxys 1
Add a comment  | 

1 Answer 1

Reset to default 0

Your bot is probably being restarted in this 24-hour period. When the bot is restarted, all running views are lost.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1744324965a4568602.html

相关推荐

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信