-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
108 additions
and
38 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,14 @@ | ||
// npm i cross-fetch dotenv | ||
import "cross-fetch/polyfill"; | ||
import { resolve } from "path"; | ||
import { config } from "dotenv"; | ||
import { resolve } from "path"; | ||
config({ path: resolve(__dirname, "..", ".env") }); | ||
import { websocketLauncher } from "../util"; | ||
|
||
// Assert these are available on process.env yadda-yadda, otherwise would have to `process.env.BOT_TOKEN as string` | ||
declare global { | ||
namespace NodeJS { | ||
interface ProcessEnv { | ||
BOT_TOKEN: string; | ||
VOICEFLOW_API_KEY: string; | ||
} | ||
} | ||
} | ||
import { announceExit, websocketLauncher } from "../util"; | ||
process.on("exit", announceExit); | ||
|
||
import Bot from "./bot"; | ||
|
||
Bot.setToken(process.env.BOT_TOKEN); | ||
Bot.addSecret("VOICEFLOW_API_KEY", process.env.VOICEFLOW_API_KEY); | ||
Bot.setToken(process.env.BOT_TOKEN as string); | ||
|
||
// Pass in your SpeedyBot | ||
websocketLauncher(Bot).catch((e) => console.log("##", e)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,14 @@ | ||
// npm i cross-fetch dotenv | ||
import "cross-fetch/polyfill"; | ||
import { resolve } from "path"; | ||
import { config } from "dotenv"; | ||
import { resolve } from "path"; | ||
config({ path: resolve(__dirname, "..", ".env") }); | ||
import { websocketLauncher } from "../util"; | ||
|
||
// Assert these are available on process.env yadda-yadda, otherwise would have to `process.env.BOT_TOKEN as string` | ||
declare global { | ||
namespace NodeJS { | ||
interface ProcessEnv { | ||
BOT_TOKEN: string; | ||
VOICEFLOW_API_KEY: string; | ||
} | ||
} | ||
} | ||
import { announceExit, websocketLauncher } from "../util"; | ||
process.on("exit", announceExit); | ||
|
||
import Bot from "./bot"; | ||
|
||
Bot.setToken(process.env.BOT_TOKEN); | ||
Bot.addSecret("VOICEFLOW_API_KEY", process.env.VOICEFLOW_API_KEY); | ||
Bot.setToken(process.env.BOT_TOKEN as string); | ||
|
||
// Pass in your SpeedyBot | ||
websocketLauncher(Bot).catch((e) => console.log("##", e)); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters