Browse Source

Fix missing method for Command Handler

pull/826/head
Hsu Still 8 years ago
parent
commit
0651925a69
1 changed files with 2 additions and 2 deletions
  1. +2
    -2
      docs/guides/commands/samples/command_handler.cs

+ 2
- 2
docs/guides/commands/samples/command_handler.cs View File

@@ -12,14 +12,14 @@ public class Program
private DiscordSocketClient _client;
private IServiceProvider _services;

static void Main(string[] args) => new Program().Start().GetAwaiter().GetResult();
private static void Main(string[] args) => new Program().StartAsync().GetAwaiter().GetResult();

public async Task StartAsync()
{
_client = new DiscordSocketClient();
_commands = new CommandService();

// Avoid hard coding your token. Use an external source instead in your code.
// Avoid hard coding your token. Use an external source instead in your code.
string token = "bot token here";

_services = new ServiceCollection()


Loading…
Cancel
Save