Merge pull request #495 from Flamanis/dev
Conflicts: docs/guides/samples/logging.cs Update logging.cs
This commit is contained in:
@@ -3,13 +3,12 @@ using Discord.Rest;
|
|||||||
|
|
||||||
public class Program
|
public class Program
|
||||||
{
|
{
|
||||||
// Note: This is the REST client, it only supports REST calls.
|
private DiscordSocketClient _client;
|
||||||
private DiscordClient _client;
|
|
||||||
static void Main(string[] args) => new Program().Start().GetAwaiter().GetResult();
|
static void Main(string[] args) => new Program().Start().GetAwaiter().GetResult();
|
||||||
|
|
||||||
public async Task Start()
|
public async Task Start()
|
||||||
{
|
{
|
||||||
_client = new DiscordRestClient(new DiscordConfig() {
|
_client = new DiscordSocketClient(new DiscordSocketConfig() {
|
||||||
LogLevel = LogSeverity.Info
|
LogLevel = LogSeverity.Info
|
||||||
});
|
});
|
||||||
|
|
||||||
@@ -19,6 +18,9 @@ public class Program
|
|||||||
return Task.CompletedTask;
|
return Task.CompletedTask;
|
||||||
};
|
};
|
||||||
|
|
||||||
await _client.LoginAsync(TokenType.Bot, "bot token");
|
await _client.LoginAsync(TokenType.Bot, "bot token");
|
||||||
|
await _client.ConnectAsync();
|
||||||
|
|
||||||
|
await Task.Delay(-1);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user