You can not select more than 25 topicsTopics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.
In Discord.Net, once a client has been started, it will automatically
maintain a connection to Discord's gateway until it is manually
stopped.
Usage
To start a connection, invoke the StartAsync method on a client that
supports a WebSocket connection; to end a connection, invoke the StopAsync method, which gracefully closes any open WebSocket or
UdpSocket connections.
Since the Start/Stop methods only signal to an underlying connection
manager that a connection needs to be started, they return before a
connection is made.
As a result, you need to hook into one of the connection-state
based events to have an accurate representation of when a client is
ready for use.
All clients provide a Connected and Disconnected event, which is
raised respectively when a connection opens or closes. In the case of
the DiscordSocketClient, this does not mean that the client is
ready to be used.
A separate event, Ready, is provided on DiscordSocketClient, which
is raised only when the client has finished guild stream or guild
sync and has a completed guild cache.
Reconnection
[!TIP]
Avoid running long-running code on the gateway! If you deadlock the
gateway (as explained in events), the connection manager will NOT be able to recover and reconnect.
Assuming the client disconnected because of a fault on Discord's end,
and not a deadlock on your end, we will always attempt to reconnect
and resume a connection.
Don't worry about trying to maintain your own connections, the
connection manager is designed to be bulletproof and never fail - if
your client does not manage to reconnect, you have found a bug!
Please read the following content carefully:
Dear OpenI User
Thank you for your continuous support to the Openl Qizhi Community AI Collaboration Platform. In order to protect your usage rights and ensure network security, we updated the Openl Qizhi Community AI Collaboration Platform Usage Agreement in January 2024. The updated agreement specifies that users are prohibited from using intranet penetration tools. After you click "Agree and continue", you can continue to use our services. Thank you for your cooperation and understanding.