![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Here is an example to use this package:
const TelegramBot = require("bot-tg");
const bot = new TelegramBot({
token: '<YOUR_BOT_TOKEN_HERE>',
commands: [{
id: 'hello',
description: 'click here!',
call: function(userId) {
this.sendMessage(userId, 'World!');
}
}]
});
To get any kind of information from user you should do like that:
const TelegramBot = require("bot-tg");
const bot = new TelegramBot({
token: '<YOUR_BOT_TOKEN_HERE>',
commands: [{
id: 'set',
description: 'set something',
title: 'Send me something:',
done: function(userId, result) {
this.sendMessage(userId, `Result is: ${result}`);
}
}]
});
To make a command hidden when calling the help (or start) command:
const TelegramBot = require("bot-tg");
const bot = new TelegramBot({
token: '<YOUR_BOT_TOKEN_HERE>',
commands: [{
id: 'set',
description: 'set something',
title: 'Send me something:',
done: function(userId, result) {
this.sendMessage(userId, `Result is: ${result}`);
}
}, {
id: 'action',
description: 'admin action',
call: function(userId) {
this.sendMessage(userId, 'Hello, admin!');
}
}]
});
To make some command hidden from list when calling the help (or start) command use hidden: true property:
const TelegramBot = require("bot-tg");
const bot = new TelegramBot({
token: '<YOUR_BOT_TOKEN_HERE>',
commands: [{
id: 'set',
description: 'set something',
title: 'Send me something:',
done: function(userId, result) {
this.sendMessage(userId, `Result is: ${result}`);
}
}, {
id: 'action',
description: 'admin action',
hidden: true,
call: function(userId) {
this.sendMessage(userId, 'Hello, admin!');
}
}]
});
To enable logging use:
const bot = new TelegramBot({
token: '<YOUR_BOT_TOKEN_HERE>',
logging: true
...
});
const TelegramBot = require("bot-tg");
const bot = new TelegramBot({
token: '<YOUR_BOT_TOKEN_HERE>',
commands: [{
id: 'set',
description: 'set something',
title: 'Send me something:',
done: function(userId, result) {
this.sendMessage(userId, `Result is: ${result}`);
}
}]
});
bot.on('message', update => {
console.log(update);
});
FAQs
A bot for Telegram Bot's API
We found that bot-tg demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.