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
This commit is contained in:
Alan Schapira
2017-10-04 01:09:06 +01:00
committed by Christopher F
parent 88c9964b54
commit d8c4b7537b

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!");
}
}
}