@@ -107,7 +107,7 @@ AEGIS_DECL void core::setup_shard_mgr()
107107{
108108 _shard_mgr = std::make_shared<shards::shard_mgr>(_token, *_io_context, log);
109109
110- _rest = std::make_shared<rest::rest_controller>(_token, " /api/v6" , " discordapp .com" , &get_io_context ());
110+ _rest = std::make_shared<rest::rest_controller>(_token, " /api/v6" , " discord .com" , &get_io_context ());
111111
112112 setup_gateway ();
113113
@@ -789,6 +789,18 @@ AEGIS_DECL void core::on_message(websocketpp::connection_hdl hdl, std::string ms
789789 if (!result[" s" ].is_null ())
790790 _shard->set_sequence (result[" s" ]);
791791
792+ /* XXX NOT WORKING
793+
794+ if (result["op"] == 7)
795+ {
796+ //Disconnect and RESUME
797+ log->debug("Discord requested reconnect for shard {}", _shard->get_id());
798+ //_shard_mgr->close(_shard);
799+ _shard->_heartbeat_status = heartbeat_status::waiting;
800+ _shard->lastheartbeat = std::chrono::steady_clock::now() - 21s;
801+ return;
802+ }*/
803+
792804 if (!result[" t" ].is_null ())
793805 {
794806 const std::string & cmd = result[" t" ];
@@ -899,11 +911,11 @@ AEGIS_DECL void core::on_message(websocketpp::connection_hdl hdl, std::string ms
899911 }
900912 }
901913 };
902- // If intents have been specified by create_bot_t, send them
903- // FIXME: We can't use aegis::intent within this lambda!
904- if (_intents != 0xffffffff ) {
905- obj[" d" ][" intents" ] = _intents;
906- }
914+ // If intents have been specified by create_bot_t, send them
915+ // FIXME: We can't use aegis::intent within this lambda!
916+ if (_intents != 0xffffffff ) {
917+ obj[" d" ][" intents" ] = _intents;
918+ }
907919 _shard_mgr->_last_identify = std::chrono::steady_clock::now ();
908920 if (!self_presence.empty ())
909921 {
0 commit comments