evilsprut / nestjs-telegram Goto Github PK
View Code? Open in Web Editor NEWš¤ A NestJS Telegram module for using the Telegram Bot API
License: MIT License
š¤ A NestJS Telegram module for using the Telegram Bot API
License: MIT License
Dependabot was set up to create pull requests against the branch dependabot
, but couldn't find it.
If the branch has been permanently deleted you can update Dependabot's target branch from your dashboard.
Option disable_web_preview should be disable_web_page_preview, as written in documentation https://core.telegram.org/bots/api
Does not work:
this.telegramService.sendDocument({
chat_id: 100500,
document: fs.createReadStream('error.txt') // <--- need to have Buffer here, tried a lot of ways to make it
}).subscribe()
Telegram API answers with code 400 without explanation.
Works:
import * as FormData from 'form-data';
...
const form = new FormData();
form.append('chat_id', chat_id);
form.append('document', Buffer.alloc(text.length, text), {filename: 'error.txt'});
form.submit(`https://api.telegram.org/bot${settings.telegramBot.key}/sendDocument`, function(err, response) {
console.log(err, response);
});
Hi, when I follow steps from the readme I got following error:
ERROR [ExceptionHandler] Nest can't resolve dependencies of the TELEGRAM_MODULE_OPTIONS (?).
Please make sure that the argument ConfigService at index [0] is available in the TelegramModule context.
Please publish the latest release for the master branch
Now, when i import some type, code for it looks like import { TelegramUser } from 'nestjs-telegram/dist/interfaces/telegramTypes.interface';
, seems direct link to dist folder is not correct approach.
May be should change it to something like import { TelegramUser } from 'nestjs-telegram'
?
Can't understand what happened.
[Error: ENOENT: no such file or directory, chmod 'node_modules/nestjs-telegram/node_modules/rxjs/migrations/update-6_0_0/.index.js 3.map.icloud'] {
errno: -2,
code: 'ENOENT',
syscall: 'chmod',
path: 'node_modules/nestjs-telegram/node_modules/rxjs/migrations/update-6_0_0/.index.js 3.map.icloud'
}
Node v15.4.0
Latest NestJS
Mac OS
Hello, i can't find getUpdates
method? Do you forget add it or you have some reasons to not implement it. Seems it is very common and helpful method.
Hey!
Didn't see any documentation about web-hook options in order to get client messages and integrate them with the server.
Any chance it is possible with this repo?
Dependabot was set up to create pull requests against the branch dev
, but couldn't find it.
If the branch has been permanently deleted you can update Dependabot's target branch from your dashboard.
You can mention @dependabot in the comments below to contact the Dependabot team.
When I try to make a request axios dosen't get the first part of url from:
this.url = https://api.telegram.org/bot${this.options.botKey}/
;
when I move that line to constructor from on moduleInit it works fine.
there is a problem in sending messages, if you use sendMessaage for once, it work ok and fine but if you try that for second time in the same response such as:
.. SOMEāCALCULATIONS...
await this.telegram.sendMessage({
chat_id: message.chat.id,
text: 'MESSAGE',
parse_mode: 'markdown',
});
.. SOMEOTHERāCALCULATIONS...
await this.telegram.sendMessage({ <-- this call will be ignored!
chat_id: message.chat.id,
text: 'ANOTHER_MESSAGE',
parse_mode: 'markdown',
});
also if you could handle long messages to split them and send them in order would be nice.
thanks.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
š Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ššš
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ā¤ļø Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.