Skip to content
This repository was archived by the owner on Aug 25, 2023. It is now read-only.

Commit 81ca2cc

Browse files
committed
Updated package description
1 parent c1f9bdc commit 81ca2cc

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

lib/Bot.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,7 @@ function Bot(token) {
176176

177177
this.forwardMessage = (chat_id, from_chat_id, message_id, options) => {
178178
if (chat_id instanceof Chat) chat_id = chat_id.id;
179+
if (chat_id instanceof User) chat_id = chat_id.id;
179180
options = options || {};
180181
options.chat_id = chat_id;
181182
options.from_chat_id = from_chat_id;
@@ -206,6 +207,7 @@ function Bot(token) {
206207

207208
this.sendFile = (chat_id, type, path, options) => {
208209
if (chat_id instanceof Chat) chat_id = chat_id.id;
210+
if (chat_id instanceof User) chat_id = chat_id.id;
209211
options = options || {};
210212
options.chat_id = chat_id;
211213
var method;
@@ -321,6 +323,7 @@ function Bot(token) {
321323

322324
this.getChatAdministrators = (chat_id) => {
323325
if (chat_id instanceof Chat) chat_id = chat_id.id;
326+
if (chat_id instanceof User) chat_id = chat_id.id;
324327
return this.call('getChatAdministrators', {chat_id: chat_id}).then((res) => {
325328
var administrators = res.body.result;
326329
var processed = [];
@@ -356,13 +359,15 @@ function Bot(token) {
356359

357360
this.getChatMembersCount = (chat_id) => {
358361
if (chat_id instanceof Chat) chat_id = chat_id.id;
362+
if (chat_id instanceof User) chat_id = chat_id.id;
359363
return this.call('getChatMembersCount', {chat_id: chat_id}).then((res) => {
360364
return res.body.result;
361365
})
362366
};
363367

364368
this.sendChatAction = (chat_id, action) => {
365369
if (chat_id instanceof Chat) chat_id = chat_id.id;
370+
if (chat_id instanceof User) chat_id = chat_id.id;
366371
return this.call('sendChatAction', {chat_id: chat_id, action: action}).then((res) => {
367372
return res.body.result;
368373
})

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "nodeogram",
33
"version": "0.0.1",
4-
"description": "NodeJS framework for Telegram bots",
4+
"description": "A simple yet complete Node.JS module for Telegram bots",
55
"main": "index.js",
66
"scripts": {
77
"test": "echo \"Error: no test specified\" && exit 1"

0 commit comments

Comments
 (0)