Skip to content

Commit

Permalink
telegram-plugin: fix missing env
Browse files Browse the repository at this point in the history
  • Loading branch information
pmioduszewski committed Jun 20, 2023
1 parent 2e10bc2 commit 360aba8
Show file tree
Hide file tree
Showing 3 changed files with 62 additions and 4 deletions.
7 changes: 4 additions & 3 deletions packages/telegram-plugin/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,9 @@ import { Bot } from "@arb-protocol/core";
import { Bot as T } from "grammy";

const MARKER_CHAR = "▌";
const TELEGRAM_BOT_TOKEN = "GET THIS FROM ENV";
// TODO: get this from env
const TELEGRAM_BOT_TOKEN = "6041735757:AAEyxGeCag5dzqQGYEwrQgrUeH9f5ANJWQM";
const CHAT_ID = 12345;

const eventTitle = (title: string) => {
return title.padEnd(26, " ");
};
Expand Down Expand Up @@ -66,7 +67,7 @@ export const TelegramPlugin = <T extends Bot>(bot: T) => ({
}

output &&
t.api.sendMessage(1234567890, output).catch((err) => {
t.api.sendMessage(CHAT_ID, output).catch((err) => {
console.error("TelegramPlugin: error sending message: ", err);
});
}
Expand Down
57 changes: 57 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion turbo.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,5 +18,5 @@
"cache": false
}
},
"globalEnv": ["NODE_ENV", "TUI_INITIAL_SCREEN", "TUI_FPS"]
"globalEnv": ["NODE_ENV", "TUI_INITIAL_SCREEN", "TUI_FPS", "TELEGRAM_BOT_TOKEN"]
}

0 comments on commit 360aba8

Please sign in to comment.