Wastu
Wastu
WWindmill
Created by Wastu on 1/24/2024 in #help
Is it possible to change workspace name?
Is it possible? Since I don't find the option anywhere.
15 replies
WWindmill
Created by Wastu on 1/20/2024 in #help
Long Running Scripts
Hello, I want to create a telegram bot using grammy.dev as framework. But the script is ended even though I'm using bot.start();. Is there any way to make the script run longer? Here is my code:
import { Bot } from "https://deno.land/x/grammy@v1.20.3/mod.ts";
import * as wmill from "https://deno.land/x/windmill@v1.248.0/mod.ts";

export async function main(debug: boolean) {
const token = debug
? (await wmill.getVariable("u/x/telegram_bot_token_dev"))!
: (await wmill.getVariable("u/x/telegram_bot_token"))!;

const bot = new Bot(token);

bot.on("message", (ctx) => ctx.reply("Got another message!"));

bot.start();
}
import { Bot } from "https://deno.land/x/grammy@v1.20.3/mod.ts";
import * as wmill from "https://deno.land/x/windmill@v1.248.0/mod.ts";

export async function main(debug: boolean) {
const token = debug
? (await wmill.getVariable("u/x/telegram_bot_token_dev"))!
: (await wmill.getVariable("u/x/telegram_bot_token"))!;

const bot = new Bot(token);

bot.on("message", (ctx) => ctx.reply("Got another message!"));

bot.start();
}
3 replies