FabianBartl / HARIBOT

A discord bot specialized for the "MINT TANK Community" discord server. Bot invite below:
https://discord.com/oauth2/authorize?client_id=1024235031037759500&permissions=8&scope=bot
MIT License
2 stars 3 forks source link

disconnected by discord because of inactivity on the guild after 30 minutes #7

Closed FabianBartl closed 2 years ago

FabianBartl commented 2 years ago

Logfile extract:

28.09.2022 04:42:16 - [DEBUG]: For Shard ID None: WebSocket Event: {'t': None, 's': None, 'op': 11, 'd': None}
28.09.2022 04:42:58 - [DEBUG]: Keeping shard ID None websocket alive with sequence 8.
28.09.2022 04:42:58 - [DEBUG]: For Shard ID None: WebSocket Event: {'t': None, 's': None, 'op': 11, 'd': None}
28.09.2022 04:43:39 - [DEBUG]: Keeping shard ID None websocket alive with sequence 8.
28.09.2022 04:43:39 - [DEBUG]: For Shard ID None: WebSocket Event: {'t': None, 's': None, 'op': 11, 'd': None}
28.09.2022 04:44:20 - [DEBUG]: Keeping shard ID None websocket alive with sequence 8.
28.09.2022 04:44:20 - [DEBUG]: For Shard ID None: WebSocket Event: {'t': None, 's': None, 'op': 11, 'd': None}
28.09.2022 04:44:22 - [DEBUG]: For Shard ID None: WebSocket Event: {'t': 'PRESENCE_UPDATE', 's': 9, 'op': 0, 'd': {'user': {'id': '386249332711620608'}, 'status': 'online', 'guild_id': '1023614599502774362', 'client_status': {'desktop': 'online'}, 'activities': []}}
28.09.2022 04:44:22 - [DEBUG]: Dispatching event socket_event_type
28.09.2022 04:44:22 - [DEBUG]: Dispatching event presence_update
28.09.2022 04:44:42 - [DEBUG]: For Shard ID None: WebSocket Event: {'t': 'PRESENCE_UPDATE', 's': 10, 'op': 0, 'd': {'user': {'id': '386249332711620608'}, 'status': 'idle', 'guild_id': '1023614599502774362', 'client_status': {'desktop': 'idle'}, 'activities': []}}
28.09.2022 04:45:01 - [DEBUG]: Keeping shard ID None websocket alive with sequence 9.
28.09.2022 12:33:47 - [DEBUG]: Dispatching event socket_event_type
28.09.2022 12:33:47 - [DEBUG]: Dispatching event presence_update
28.09.2022 12:33:47 - [DEBUG]: Received WSMessage(type=<WSMsgType.CLOSE: 8>, data=1000, extra='')
28.09.2022 12:33:47 - [INFO]: Websocket closed with 1000, cannot reconnect.
28.09.2022 12:33:47 - [DEBUG]: Dispatching event disconnect
28.09.2022 12:33:47 - [ERROR]: Attempting a reconnect in 0.11s
Traceback (most recent call last):
  File "C:\Users\fabia\AppData\Roaming\Python\Python39\site-packages\nextcord\client.py", line 701, in connect
    await self.ws.poll_event()
  File "C:\Users\fabia\AppData\Roaming\Python\Python39\site-packages\nextcord\gateway.py", line 639, in poll_event
    raise ConnectionClosed(self.socket, shard_id=self.shard_id, code=code) from None
nextcord.errors.ConnectionClosed: Shard ID None WebSocket closed with 1000
28.09.2022 12:33:47 - [DEBUG]: GET https://discord.com/api/v10/gateway with None has returned 200
28.09.2022 12:33:47 - [DEBUG]: GET https://discord.com/api/v10/gateway has received {'url': 'wss://gateway.discord.gg'}
28.09.2022 12:33:47 - [DEBUG]: Created websocket connected to wss://gateway.discord.gg?encoding=json&v=10&compress=zlib-stream
28.09.2022 12:33:47 - [DEBUG]: For Shard ID None: WebSocket Event: {'t': None, 's': None, 'op': 10, 'd': {'heartbeat_interval': 41250, '_trace': ['["gateway-prd-us-east1-b-tc7f",{"micros":0.0}]']}}
28.09.2022 12:33:47 - [INFO]: Shard ID None has sent the RESUME payload.
28.09.2022 12:33:47 - [DEBUG]: For Shard ID None: WebSocket Event: {'t': None, 's': None, 'op': 11, 'd': None}
28.09.2022 12:33:47 - [DEBUG]: For Shard ID None: WebSocket Event: {'t': None, 's': None, 'op': 9, 'd': False}
28.09.2022 12:33:47 - [INFO]: Shard ID None session has been invalidated.
28.09.2022 12:33:47 - [INFO]: Got a request to IDENTIFY the websocket.
28.09.2022 12:33:47 - [DEBUG]: Dispatching event disconnect
28.09.2022 12:33:47 - [DEBUG]: GET https://discord.com/api/v10/gateway with None has returned 200
28.09.2022 12:33:47 - [DEBUG]: GET https://discord.com/api/v10/gateway has received {'url': 'wss://gateway.discord.gg'}
28.09.2022 12:33:48 - [DEBUG]: Created websocket connected to wss://gateway.discord.gg?encoding=json&v=10&compress=zlib-stream
28.09.2022 12:33:48 - [DEBUG]: For Shard ID None: WebSocket Event: {'t': None, 's': None, 'op': 10, 'd': {'heartbeat_interval': 41250, '_trace': ['["gateway-prd-us-east1-b-bw28",{"micros":0.0}]']}}
28.09.2022 12:33:53 - [INFO]: Shard ID None has sent the IDENTIFY payload.
28.09.2022 12:33:53 - [DEBUG]: For Shard ID None: WebSocket Event: {'t': None, 's': None, 'op': 11, 'd': None}
28.09.2022 12:33:53 - [DEBUG]: For Shard ID None: WebSocket Event: {'t': 'READY', 's': 1, 'op': 0, 'd': {'v': 10, 'user_settings': {}, 'user': {'verified': True, 'username': 'HARIBOT', 'mfa_enabled': True, 'id': '1024235031037759500', 'flags': 0, 'email': None, 'discriminator': '9118', 'bot': True, 'avatar': None}, 'session_type': 'normal', 'session_id': 'bf70af6dc67463335b5164bdd11b17a5', 'resume_gateway_url': 'wss://gateway-us-east1-b.discord.gg', 'relationships': [], 'private_channels': [], 'presences': [], 'guilds': [{'unavailable': True, 'id': '1023614599502774362'}], 'guild_join_requests': [], 'geo_ordered_rtc_regions': ['rotterdam', 'milan', 'stockholm', 'bucharest', 'finland'], 'application': {'id': '1024235031037759500', 'flags': 8953856}, '_trace': ['["gateway-prd-us-east1-b-bw28",{"micros":143284,"calls":["id_created",{"micros":811,"calls":[]},"session_lookup_time",{"micros":302,"calls":[]},"session_lookup_finished",{"micros":13,"calls":[]},"discord-sessions-green-prd-2-163",{"micros":139309,"calls":["start_session",{"micros":53095,"calls":["discord-api-8d47878f4-7jq4l",{"micros":47757,"calls":["get_user",{"micros":13859},"get_guilds",{"micros":3364},"send_scheduled_deletion_message",{"micros":9},"guild_join_requests",{"micros":601},"authorized_ip_coro",{"micros":14}]}]},"starting_guild_connect",{"micros":54,"calls":[]},"presence_started",{"micros":39306,"calls":[]},"guilds_started",{"micros":97,"calls":[]},"guilds_connect",{"micros":1,"calls":[]},"presence_connect",{"micros":46698,"calls":[]},"connect_finished",{"micros":46703,"calls":[]},"build_ready",{"micros":24,"calls":[]},"optimize_ready",{"micros":0,"calls":[]},"split_ready",{"micros":1,"calls":[]},"clean_ready",{"micros":28,"calls":[]}]}]}]']}}
28.09.2022 12:33:53 - [DEBUG]: Dispatching event socket_event_type
28.09.2022 12:33:53 - [INFO]: Shard ID None has connected to Gateway: ["gateway-prd-us-east1-b-bw28",{"micros":143284,"calls":["id_created",{"micros":811,"calls":[]},"session_lookup_time",{"micros":302,"calls":[]},"session_lookup_finished",{"micros":13,"calls":[]},"discord-sessions-green-prd-2-163",{"micros":139309,"calls":["start_session",{"micros":53095,"calls":["discord-api-8d47878f4-7jq4l",{"micros":47757,"calls":["get_user",{"micros":13859},"get_guilds",{"micros":3364},"send_scheduled_deletion_message",{"micros":9},"guild_join_requests",{"micros":601},"authorized_ip_coro",{"micros":14}]}]},"starting_guild_connect",{"micros":54,"calls":[]},"presence_started",{"micros":39306,"calls":[]},"guilds_started",{"micros":97,"calls":[]},"guilds_connect",{"micros":1,"calls":[]},"presence_connect",{"micros":46698,"calls":[]},"connect_finished",{"micros":46703,"calls":[]},"build_ready",{"micros":24,"calls":[]},"optimize_ready",{"micros":0,"calls":[]},"split_ready",{"micros":1,"calls":[]},"clean_ready",{"micros":28,"calls":[]}]}]}] (Session ID: bf70af6dc67463335b5164bdd11b17a5).
28.09.2022 12:33:53 - [DEBUG]: Dispatching event connect
FabianBartl commented 2 years ago

Logfile extract

2022-09-29 02:13:55  [DEBUG]    For Shard ID None: WebSocket Event: {'t': 'PRESENCE_UPDATE', 's': 65, 'op': 0, 'd': {'user': {'id': '227495415048568843'}, 'status': 'online', 'guild_id': '1023614599502774362', 'client_status': {'desktop': 'online'}, 'activities': []}}
2022-09-29 02:13:55  [DEBUG]    Dispatching event socket_event_type
2022-09-29 02:13:55  [DEBUG]    Dispatching event presence_update
2022-09-29 02:14:07  [DEBUG]    Keeping shard ID None websocket alive with sequence 65.
2022-09-29 02:14:07  [DEBUG]    For Shard ID None: WebSocket Event: {'t': None, 's': None, 'op': 11, 'd': None}
2022-09-29 02:14:49  [DEBUG]    Keeping shard ID None websocket alive with sequence 65.
2022-09-29 02:14:49  [DEBUG]    For Shard ID None: WebSocket Event: {'t': None, 's': None, 'op': 11, 'd': None}
2022-09-29 02:15:30  [DEBUG]    Keeping shard ID None websocket alive with sequence 65.
2022-09-29 02:15:30  [DEBUG]    For Shard ID None: WebSocket Event: {'t': None, 's': None, 'op': 11, 'd': None}
2022-09-29 02:16:11  [DEBUG]    Keeping shard ID None websocket alive with sequence 65.
2022-09-29 02:16:11  [DEBUG]    For Shard ID None: WebSocket Event: {'t': None, 's': None, 'op': 11, 'd': None}
2022-09-29 02:16:46  [DEBUG]    For Shard ID None: WebSocket Event: {'t': None, 's': None, 'op': 7, 'd': None}
2022-09-29 02:16:46  [DEBUG]    Received RECONNECT opcode.
2022-09-29 02:16:47  [INFO] Got a request to RESUME the websocket.
2022-09-29 02:16:47  [DEBUG]    Dispatching event disconnect
2022-09-29 02:16:47  [INFO] bot was disconnected
2022-09-29 02:16:50  [DEBUG]    GET https://discord.com/api/v10/gateway with None has returned 200
2022-09-29 02:16:50  [DEBUG]    GET https://discord.com/api/v10/gateway has received {'url': 'wss://gateway.discord.gg'}
2022-09-29 02:16:50  [DEBUG]    Created websocket connected to wss://gateway.discord.gg?encoding=json&v=10&compress=zlib-stream
2022-09-29 02:16:50  [DEBUG]    For Shard ID None: WebSocket Event: {'t': None, 's': None, 'op': 10, 'd': {'heartbeat_interval': 41250, '_trace': ['["gateway-prd-us-east1-b-krgl",{"micros":0.0}]']}}
2022-09-29 02:16:50  [INFO] Shard ID None has sent the RESUME payload.
2022-09-29 02:16:50  [DEBUG]    For Shard ID None: WebSocket Event: {'t': None, 's': None, 'op': 11, 'd': None}
2022-09-29 02:16:50  [DEBUG]    For Shard ID None: WebSocket Event: {'t': 'RESUMED', 's': 66, 'op': 0, 'd': {'_trace': ['["gateway-prd-us-east1-b-krgl",{"micros":3216,"calls":["id_created",{"micros":0,"calls":[]},"session_lookup_time",{"micros":2641,"calls":[]},"session_lookup_finished",{"micros":21,"calls":[]},"discord-sessions-green-prd-2-89",{"micros":19}]}]']}}
2022-09-29 02:16:50  [DEBUG]    Dispatching event socket_event_type
2022-09-29 02:16:50  [INFO] Shard ID None has successfully RESUMED session 38a6395a0014041780a360bb46bb6316 under trace ["gateway-prd-us-east1-b-krgl",{"micros":3216,"calls":["id_created",{"micros":0,"calls":[]},"session_lookup_time",{"micros":2641,"calls":[]},"session_lookup_finished",{"micros":21,"calls":[]},"discord-sessions-green-prd-2-89",{"micros":19}]}].
2022-09-29 02:16:50  [DEBUG]    Dispatching event resumed
2022-09-29 02:17:31  [DEBUG]    Keeping shard ID None websocket alive with sequence 66.
2022-09-29 02:17:31  [DEBUG]    For Shard ID None: WebSocket Event: {'t': None, 's': None, 'op': 11, 'd': None}
FabianBartl commented 2 years ago

now reconnect on disconnect: 2022-09-29 02:16:47 [INFO] bot was disconnected