Replace fix "token" string with environment variable
This commit is contained in:
parent
76512f1af4
commit
9b3e3de55d
@ -23,7 +23,7 @@ public class Program
|
|||||||
{
|
{
|
||||||
var bot = BotBaseBuilder
|
var bot = BotBaseBuilder
|
||||||
.Create()
|
.Create()
|
||||||
.WithAPIKey("token")
|
.WithAPIKey(Environment.GetEnvironmentVariable("API_KEY") ?? throw new Exception("API_KEY is not set"))
|
||||||
.MiddlewareMessageLoop(
|
.MiddlewareMessageLoop(
|
||||||
messageLoop =>
|
messageLoop =>
|
||||||
messageLoop
|
messageLoop
|
||||||
@ -68,7 +68,7 @@ public class Program
|
|||||||
{
|
{
|
||||||
var bot = BotBaseBuilder
|
var bot = BotBaseBuilder
|
||||||
.Create()
|
.Create()
|
||||||
.WithAPIKey("token")
|
.WithAPIKey(Environment.GetEnvironmentVariable("API_KEY") ?? throw new Exception("API_KEY is not set"))
|
||||||
.MiddlewareMessageLoop(
|
.MiddlewareMessageLoop(
|
||||||
messageLoop =>
|
messageLoop =>
|
||||||
messageLoop
|
messageLoop
|
||||||
@ -103,7 +103,7 @@ public class Program
|
|||||||
{
|
{
|
||||||
var bot = BotBaseBuilder
|
var bot = BotBaseBuilder
|
||||||
.Create()
|
.Create()
|
||||||
.WithAPIKey("token")
|
.WithAPIKey(Environment.GetEnvironmentVariable("API_KEY") ?? throw new Exception("API_KEY is not set"))
|
||||||
.MiddlewareMessageLoop(
|
.MiddlewareMessageLoop(
|
||||||
messageLoop =>
|
messageLoop =>
|
||||||
messageLoop
|
messageLoop
|
||||||
@ -136,7 +136,7 @@ public class Program
|
|||||||
{
|
{
|
||||||
var bot = BotBaseBuilder
|
var bot = BotBaseBuilder
|
||||||
.Create()
|
.Create()
|
||||||
.WithAPIKey("token")
|
.WithAPIKey(Environment.GetEnvironmentVariable("API_KEY") ?? throw new Exception("API_KEY is not set"))
|
||||||
.MiddlewareMessageLoop(
|
.MiddlewareMessageLoop(
|
||||||
messageLoop =>
|
messageLoop =>
|
||||||
messageLoop
|
messageLoop
|
||||||
@ -159,7 +159,7 @@ public class Program
|
|||||||
{
|
{
|
||||||
var bot = BotBaseBuilder
|
var bot = BotBaseBuilder
|
||||||
.Create()
|
.Create()
|
||||||
.WithAPIKey("token")
|
.WithAPIKey(Environment.GetEnvironmentVariable("API_KEY") ?? throw new Exception("API_KEY is not set"))
|
||||||
.MiddlewareMessageLoop(
|
.MiddlewareMessageLoop(
|
||||||
messageLoop =>
|
messageLoop =>
|
||||||
messageLoop
|
messageLoop
|
||||||
@ -178,7 +178,7 @@ public class Program
|
|||||||
{
|
{
|
||||||
var bot = BotBaseBuilder
|
var bot = BotBaseBuilder
|
||||||
.Create()
|
.Create()
|
||||||
.WithAPIKey("token")
|
.WithAPIKey(Environment.GetEnvironmentVariable("API_KEY") ?? throw new Exception("API_KEY is not set"))
|
||||||
.MiddlewareMessageLoop(
|
.MiddlewareMessageLoop(
|
||||||
messageLoop =>
|
messageLoop =>
|
||||||
messageLoop
|
messageLoop
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user