Skip to content

Commit 828ce2e

Browse files
committed
update token
1 parent d4f1c7b commit 828ce2e

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
import TelegramBot, { TelegramExecutionContext } from '@codebam/cf-workers-telegram-bot';
22

33
interface Environment {
4-
TOKEN: string;
4+
SECRET_TELEGRAM_API_TOKEN: string;
55
}
66

77
export default {
88
async fetch(request: Request, env: Environment, ctx: ExecutionContext): Promise<Response> {
9-
const bot = new TelegramBot(env.TOKEN);
9+
const bot = new TelegramBot(env.SECRET_TELEGRAM_API_TOKEN);
1010
await bot
11-
.on('start', async function (context: TelegramExecutionContext) {
11+
.on('start', async function(context: TelegramExecutionContext) {
1212
switch (context.update_type) {
1313
case 'message':
14-
await context.reply('Hello World');
14+
await context.reply('Hello World 2');
1515
break;
1616

1717
default:

0 commit comments

Comments
 (0)