Added new getting started guide
Thanks @MinnDevelopment for his awesome work on the JDA guide that had no influence here at all.
This commit is contained in:
16
docs/guides/samples/intro/client.cs
Normal file
16
docs/guides/samples/intro/client.cs
Normal file
@@ -0,0 +1,16 @@
|
||||
// Program.cs
|
||||
using Discord.WebSocket;
|
||||
// ...
|
||||
public async Task MainAsync()
|
||||
{
|
||||
var client = new DiscordSocketClient();
|
||||
|
||||
client.Log += Log;
|
||||
|
||||
string token = "abcdefg..."; // Remember to keep this private!
|
||||
await client.LoginAsync(TokenType.Bot, token);
|
||||
await client.StartAsync();
|
||||
|
||||
// Block this task until the program is closed.
|
||||
await Task.Delay(-1);
|
||||
}
|
||||
Reference in New Issue
Block a user