Browse Source

Client is global variable (#789)

In the previous section of the tutorial https://github.com/RogueException/Discord.Net/blob/dev/docs/guides/getting_started/samples/intro/client.cs, the client it a global variable with an underscore
tags/2.0.0-beta
Alan Schapira Christopher F 7 years ago
parent
commit
d8c4b7537b
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      docs/guides/getting_started/samples/intro/message.cs

+ 2
- 2
docs/guides/getting_started/samples/intro/message.cs View File

@@ -1,7 +1,7 @@
public async Task MainAsync()
{
// client.Log ...
client.MessageReceived += MessageReceived;
_client.MessageReceived += MessageReceived;
// ...
}

@@ -11,4 +11,4 @@ private async Task MessageReceived(SocketMessage message)
{
await message.Channel.SendMessageAsync("Pong!");
}
}
}

Loading…
Cancel
Save