Comments (3)
The empty string is false value so handlers.filter(({ config }) => config.message)
filtered out {message: ''}
. Use following code instead of
https://github.com/bukhalo/nestjs-telegraf/blob/cef3796f01c5086f6e8438876de5e828056c8056/lib/telegraf.service.ts#L99 may solve that:
private setupOnMessage(handlers: Handler[]): void {
const onMessageHandlers = handlers.filter(({ config }) => config.message !== undefined)
onMessageHandlers.forEach(handler => {
if (handler.config.message) {
this.bot.hears(handler.config.message, this.adoptHandle(handler))
} else {
this.bot.on('message', this.adoptHandle(handler);
}
});
}
from nestjs-telegraf.
@all-contributors please add @edgesite for code, bug
from nestjs-telegraf.
@bukhalo
I've put up a pull request to add @edgesite! 🎉
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 HOT 1
- 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.