Giter Site home page Giter Site logo

telegraf-docs's Issues

?

Vedi titolo

Keyboard not changes after code modification

Hi there!

I took the keyboard example from the example in this repository.

bot.command("custom", async ctx => {
	return await ctx.reply(
		"Custom buttons keyboard",
		Markup.keyboard([
			["๐Ÿ” Search", "๐Ÿ˜Ž Popular"], // Row1 with 2 buttons
			["โ˜ธ Setting", "๐Ÿ“ž Feedback"], // Row2 with 2 buttons
			["๐Ÿ“ข Ads", "โญ๏ธ Rate us", "๐Ÿ‘ฅ Share"], // Row3 with 3 buttons
		])
			.oneTime()
			.resize(),
	);
});

image

And I got the expected result, but then I changed this code, but the bot did not react in any way. Restarting the bot didn't help either.
My own variant:

bot.command("custom", async ctx => {
	return await ctx.reply(
		"Custom buttons keyboard",
		Markup.keyboard([
			["๐Ÿ” ะกั‚ะฐั‚ัƒั API ะฒะฐะปัŽั‚", "๐Ÿ˜Ž ะขะตะบัƒั‰ะธะน ะบัƒั€ั"], // Row1 with 2 buttons
		])
			.oneTime()
			.resize(),
	);
});

What's my mistake?

Is express example working?

I am trying to make my first bot on base express framework. Example from here https://github.com/feathers-studio/telegraf-docs/blob/master/examples/webhook/express.ts not works. I am testing webhooks with ngrok, when I am making URI for webhook with express on my own I am getting calls from telegram and everything is OK.
But I am unable to make bot work on commands, I suppose this line simply not works:
app.use(await bot.createWebhook({ domain: webhookDomain, path: URI }));

So I am unable to make my bot react on webhooks call from telegram

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.