An unofficial telegram bot for yesno.wtf.
Try it out: @yesno_wtf_bot
You can interact with the bot in two ways: direct messaging or inline mode. (Get detailed usage instructions by sending /help
to the bot.)
Use the bot to get a GIF from yesno.wtf directly. You can get a random one or specify the type of the GIF (yes / no / maybe).
Some times two options are not enough, so you can also use the bot to roll a number within a range. The default range is [1, 6], but you can also specify it.
To set up the bot, you need to talk to BotFather first:
- Use
/newbot
to create a new bot and obtain your bot token. - Use
/setinline
to enable inline mode for your bot. - Optional: Set up bot's command list, description, about text and avatar.
- Make sure you have Node.js installed on your system.
- Set your bot token as a secret:
npx wrangler seccret put TG_BOT_TOKEN
- Deploy to Cloudflare Workers:
npx wrangler deploy
Example:
curl -v "https://api.telegram.org/bot{YOUR_TG_BOT_TOKEN}/setWebhook?url=https://yesnowtfbot.{YOUR_CF_USERNAME}.workers.dev"
Remember to replace {YOUR_TG_BOT_TOKEN}
and {YOUR_CF_USERNAME}
with your values. You can also change the subdomain yesnowtfbot
by editing wrangler.toml
.