Comments (8)
@Sedjj Okay, now I get it. I'll release the update in a little while.
from nestjs-telegraf.
Thank you, this will really save me from a problem that I’ve been tormenting for a long time.
It's done. Update the package to v0.7.0 and close the issue if everything works properly. I also updated the repository with an example. https://github.com/bukhalo/nestjs-telegraf-sample/commit/300c268fa33cbb1aabd0be0436161e22dfc2e703
from nestjs-telegraf.
Yes, it worked! Thanks for the quick decision. I really like your lib and will continue to use it.
from nestjs-telegraf.
@Sedjj I tried your code and it's working as expected.
I made an example for you of using a module with your code in a separate repository. Your code can be found in bot.service.ts the file.
from nestjs-telegraf.
Thank you for the quick answer to my question, but unfortunately I did not convey the right thought.
If you replace the contents of bot.service.ts
import {Injectable} from '@nestjs/common';
import {TelegrafTelegramService, TelegramActionHandler,} from 'nestjs-telegraf';
import {ContextMessageUpdate} from 'telegraf';
@Injectable()
export class BotService {
constructor(
private readonly telegrafTelegramService: TelegrafTelegramService,
) {
}
@TelegramActionHandler({onStart: true})
async start(ctx: ContextMessageUpdate) {
const me = await this.telegrafTelegramService.getMe();
console.log(me);
await ctx.replyWithMarkdown('test', {
reply_markup: {
inline_keyboard: [
[
{
text: 'test',
callback_data: 'test_callback',
},
],
]
},
parse_mode: 'Markdown',
});
}
@TelegramActionHandler({message: 'test_callback'})
protected async debugLogs(ctx: ContextMessageUpdate) {
console.log('1');
}
}
Then the debugLogs
function will not be called on the test_callback
response.
I'm interested in the ability to build logic for the answer with inline_keyboard
.
from nestjs-telegraf.
Thank you, this will really save me from a problem that I’ve been tormenting for a long time.
from nestjs-telegraf.
@all-contributors please add @Sedjj for bug, ideas
from nestjs-telegraf.
I've put up a pull request to add @Sedjj! 🎉
from nestjs-telegraf.
Related Issues (20)
- Not able to handle requests in parallel HOT 1
- Text listeners don`t work in Scene
- Cannot go backwards in wizard
- Incorrect bot shutdown
- Error on lazy TelegrafModule import
- Cannot install on Nest v10 HOT 4
- connect to the same bot from another app HOT 1
- Doesn't work middleware function (blocked other middlewares HOT 1
- How to get callback_data from context
- Handle callback_query HOT 2
- Issue with middlewares HOT 1
- Not working properly in Nestjs 10.0.0 version HOT 5
- Multiple Dynamic Bot HOT 1
- pre_checkout_query & successful_payment doesn't work HOT 1
- Bot Error Handling in NestJS Application
- NestJS guard crashing server when canActivate is false HOT 3
- changing bot token while application is running
- scene is undefined in middleware
- How to use wizard with composer? HOT 1
- Webhook(s) for multiple telegram bots HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from nestjs-telegraf.