Module

x/grammy/mod.ts>Bot#isRunning

The Telegram Bot Framework.
Very Popular
Latest
method Bot.prototype.isRunning
import { Bot } from "https://dotland.deno.dev/x/grammy@v1.31.0/mod.ts";

Returns true if the bot is currently running via built-in long polling, and false otherwise.

If this method returns true, it means that bot.start() has been called, and that the bot has neither crashed nor was it stopped via a call to bot.stop(). This also means that you cannot use this method to check if a webhook server is running, or if grammY runner was started.

Note that this method will already begin to return true even before the call to bot.start() has completed its initialization phase (and hence before bot.isInited() returns true). By extension, this method returns true before onStart callback of bot.start() is invoked.