[Docs] Update samples to use MessageContent intent & update v2 => v3 guide (#2471)

This commit is contained in:
Misha133
2022-09-25 23:27:14 +03:00
committed by GitHub
parent bc89d3c485
commit a4d34f6947
9 changed files with 22 additions and 9 deletions

View File

@@ -34,9 +34,16 @@ namespace BasicBot
public Program()
{
// Config used by DiscordSocketClient
// Define intents for the client
var config = new DiscordSocketConfig
{
GatewayIntents = GatewayIntents.AllUnprivileged | GatewayIntents.MessageContent
};
// It is recommended to Dispose of a client when you are finished
// using it, at the end of your app's lifetime.
_client = new DiscordSocketClient();
_client = new DiscordSocketClient(config);
// Subscribing to client events, so that we may receive them whenever they're invoked.
_client.Log += LogAsync;