docs: September 2019 Documentation Update (#1379)
* docs: adjust wording of ActivityType.Watching enum Adjusts the xmldoc summary wording of the ActivityType.Watching enum to fix a wording issue. * Add D.NET Logo to Open Graph meta tags * Update DescriptionGenerator ...And update color to suit the logo better * Disable smooth scrolling due to user complaints * Remove unnecessary spacing in sideaffix * Update footer version * Remove featherlight plugin As it is unnecessary and can break image tags * Adjust wordings regarding safe-handling of secrets * Fix formatting for first bot token sample * Add badges to homepage * Minor wording fixes on terminal * Update to higher quality PNG * Add Discord.Net.Example in sln for build validation * Clarify all instances of IAsnycEnumerable * Clarify overridden props in SocketNewsChannel * Add returns and params docs for SyncPermissionsAsync * Remove/fix invalid XMLdoc strings * Remove AppVeyor and add GitHub badge
This commit is contained in:
@@ -2,22 +2,22 @@ private DiscordSocketClient _client;
|
||||
|
||||
public async Task MainAsync()
|
||||
{
|
||||
_client = new DiscordSocketClient();
|
||||
_client = new DiscordSocketClient();
|
||||
|
||||
_client.Log += Log;
|
||||
|
||||
// You can assign your bot token to a string, and pass that in to connect.
|
||||
// This however is insecure, particularly if you plan to have your code hosted in a repository.
|
||||
_client.Log += Log;
|
||||
|
||||
// You can assign your bot token to a string, and pass that in to connect.
|
||||
// This is, however, insecure, particularly if you plan to have your code hosted in a public repository.
|
||||
var token = "token";
|
||||
|
||||
// Some alternative options would be to keep your token in an Environment Variable or a standalone file.
|
||||
|
||||
// Some alternative options would be to keep your token in an Environment Variable or a standalone file.
|
||||
// var token = Environment.GetEnvironmentVariable("NameOfYourEnvironmentVariable");
|
||||
// var token = File.ReadAllText("token.txt");
|
||||
// var token = JsonConvert.DeserializeObject<AConfigurationClass>(File.ReadAllText("config.json")).Token;
|
||||
|
||||
await _client.LoginAsync(TokenType.Bot, token);
|
||||
await _client.StartAsync();
|
||||
await _client.LoginAsync(TokenType.Bot, token);
|
||||
await _client.StartAsync();
|
||||
|
||||
// Block this task until the program is closed.
|
||||
await Task.Delay(-1);
|
||||
}
|
||||
// Block this task until the program is closed.
|
||||
await Task.Delay(-1);
|
||||
}
|
||||
Reference in New Issue
Block a user