import { TelegramBot, UpdateType } from "https://deno.land/x/telegram_chatbot/mod.ts"; <--- ISSUE
import "https://deno.land/x/<a href="/cdn-cgi/l/email-protection" class="__cf_email__" data-cfemail="c6a2a9b299a3a8b086f6e8f4e8f6">[email protected]</a>/load.ts"
const TOKEN = ("MYTOKENID");
if (!TOKEN) throw new Error("Bot token is not provided");
const bot = new TelegramBot(TOKEN);
bot.on(UpdateType.Message, async (message: any) => {
const text = message.message.text || "I can't hear you";
await bot.sendMessage({ chat_id: message.message.chat.id, text: `echo ${text}` })
});
bot.run({
polling: true,
});
[{ "resource": "/Users/bgrnaymane/Documents/GitHub/crypto_price_api/telegrambot.ts", "owner": "typescript", "code": "2691", "severity": 8, "message": "An import path should not end with an extension ".ts". Consider importing from "https://deno.land/x/telegram_chatbot/mod" instead.", "source": "ts", "startLineNumber": 2, "startColumn": 41, "endLineNumber": 2, "endColumn": 86 }]
An import path should not end with an extension ".ts". Consider importing from "https://deno.land/x/telegram_chatbot/mod" instead.