From 8a6988f4a417320e0e1f4c2608fb42389484279c Mon Sep 17 00:00:00 2001 From: Still Hsu <341464@gmail.com> Date: Wed, 6 Feb 2019 01:56:25 +0800 Subject: [PATCH] Add additional notes for the Program class --- samples/02_commands_framework/Program.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/samples/02_commands_framework/Program.cs b/samples/02_commands_framework/Program.cs index 76c11f9f0..11f39860f 100644 --- a/samples/02_commands_framework/Program.cs +++ b/samples/02_commands_framework/Program.cs @@ -37,10 +37,12 @@ namespace _02_commands_framework client.Log += LogAsync; services.GetRequiredService().Log += LogAsync; - // Tokens should be considered secret data, and never hard-coded. + // Tokens should be considered secret data and never hard-coded. + // We can read from the environment variable to prevent such practices. await client.LoginAsync(TokenType.Bot, Environment.GetEnvironmentVariable("token")); await client.StartAsync(); + // Here we initialize the logic required to register our commands. await services.GetRequiredService().InitializeAsync(); await Task.Delay(-1);