Built using Telegraf and hosted on Netlify.
Set BOT_TOKEN
and BOT_URL
secrets. BOT_URL
being the netlify live url.
Set BOT_TOKEN
, MONGODB_USERNAME
and MONGODB_PASSWORD
.
yarn install
yarn watch
yarn dev
This starts a public live session of Netlify Dev.
https://api.telegram.org/bot{your-bot-api-token}/setWebhook?url={netlify-dev-url}/bot
Go to above url in your browser and replace the token and the url. This tells the bot to call your dev instance instead of the live one.
src/modules/example.ts
import { TelegrafContext } from "telegraf/typings/context";
export default async(ctx: TelegrafContext) => {
await ctx.replyWithMarkdown(`Example reply from bot.`);
}
src/bot.ts
import exampleModule from './modules/example';
bot.command('example', (ctx) => exampleModule(ctx))
git push
to this repo starts the build process on Netlify and the GitHub action takes care of setting the bot's webhook url
pukkiparty - send sticker from Pukkipack
tilaafp - subscribe for daily fingerpori
perufptilaus - unsubscribe from daily fingerpori
help - ask for help
lozzi - use optional [h, yh]
maija - use optional [h, yh]
ylisto - use optional [h, yh]
belvedere - use optional [h, yh]
syke - use optional [h, yh]
piato - use optional [h, yh]
novelli - use optional [h, yh]
tilia - use optional [h,yh]
uno - use optional [h, yh]
rentukka - use optional [h, yh]
siltavouti - use optional [h, yh]
aimo - use optional [h, yh]
fiilu - use optional [h, yh]
ilokivi - use optional [h, yh]