Skip to content

Commit 9529fd6

Browse files
committed
Update docs for telegram
1 parent 714229a commit 9529fd6

1 file changed

Lines changed: 62 additions & 13 deletions

File tree

docs/telegram.md

Lines changed: 62 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,16 @@ Use this method to delete bot messages.
145145
| chatId | `number/string` | Chat id |
146146
| messageId | `string` | Message id |
147147

148+
## deleteMyCommands
149+
150+
Use this method to delete the list of the bot's commands for the given scope and user language.
151+
152+
`telegram.deleteMyCommands([extra]) => Promise`
153+
154+
| Param | Type | Description |
155+
| --- | --- | --- |
156+
| [extra] | `object` | [Extra parameters](https://core.telegram.org/bots/api#deletemycommands) |
157+
148158
## setStickerSetThumb
149159

150160
Use this method to set the thumbnail of a sticker set.
@@ -352,12 +362,12 @@ Use this method to get information about a member of a chat.
352362
| chatId | `number/string` | Chat id |
353363
| userId | `number` | User identifier |
354364

355-
## getChatMembersCount
365+
## getChatMemberCount
356366

357367
Use this method to get the number of members in a chat.
358368

359-
`telegram.getChatMembersCount(chatId) => Promise`
360-
[Official documentation](https://core.telegram.org/bots/api#getchatmemberscount)
369+
`telegram.getChatMemberCount(chatId) => Promise`
370+
[Official documentation](https://core.telegram.org/bots/api#getchatmembercount)
361371

362372
| Param | Type | Description |
363373
| --- | --- | --- |
@@ -393,10 +403,13 @@ Returns basic information about the bot.
393403

394404
## getMyCommands
395405

396-
Use this method to get the current list of the bot's commands. Requires no parameters. Returns Array of BotCommand on success.
406+
Use this method to get the current list of the bot's commands for the given scope and user language.
397407

398-
`telegram.getMyCommands() => Promise`
399-
[Official documentation](https://core.telegram.org/bots/api#getmycommands)
408+
`telegram.getMyCommands([extra]) => Promise`
409+
410+
| Param | Type | Description |
411+
| --- | --- | --- |
412+
| [extra] | `object` | [Extra parameters](https://core.telegram.org/bots/api#getmycommands) |
400413

401414
## getStickerSet
402415

@@ -433,17 +446,17 @@ Use this method to set default chat permissions for all members.
433446
| chatId | `number/string` | Chat id |
434447
| permissions | `object` | [New default chat permissions](https://core.telegram.org/bots/api#chatpermissions)|
435448

436-
## kickChatMember
449+
## banChatMember
437450

438-
Use this method to kick a user from a group or a supergroup.
451+
Use this method to ban a user in a group, a supergroup or a channel.
439452

440-
`telegram.kickChatMember(chatId, userId, [extra]) => Promise`
453+
`telegram.banChatMember(chatId, userId, [extra]) => Promise`
441454

442455
| Param | Type | Description |
443456
| --- | --- | --- |
444457
| chatId | `number/string` | Chat id |
445458
| userId | `number` | User id |
446-
| [extra] | `object` | [Extra parameters](https://core.telegram.org/bots/api#kickchatmember)|
459+
| [extra] | `object` | [Extra parameters](https://core.telegram.org/bots/api#banchatmember)|
447460

448461
## restrictChatMember
449462

@@ -492,6 +505,41 @@ Use this method to export an invite link to a supergroup or a channel.
492505
| --- | --- | --- |
493506
| chatId | `number/string` | Chat id |
494507

508+
## createChatInviteLink
509+
510+
Use this method to create an additional invite link for a chat.
511+
512+
`telegram.createChatInviteLink(chatId, [extra]) => Promise`
513+
514+
| Param | Type | Description |
515+
| --- | --- | --- |
516+
| chatId | `number/string` | Chat id |
517+
| [extra] | `object` | [Extra parameters](https://core.telegram.org/bots/api#createchatinvitelink) |
518+
519+
## editChatInviteLink
520+
521+
Use this method to edit a non-primary invite link created by the bot.
522+
523+
`telegram.editChatInviteLink(chatId, inviteLink, [extra]) => Promise`
524+
525+
| Param | Type | Description |
526+
| --- | --- | --- |
527+
| chatId | `number/string` | Chat id |
528+
| inviteLink | `string` | The invite link to edit |
529+
| [extra] | `object` | [Extra parameters](https://core.telegram.org/bots/api#editchatinvitelink) |
530+
531+
## revokeChatInviteLink
532+
533+
Use this method to revoke an invite link created by the bot.
534+
535+
`telegram.revokeChatInviteLink(chatId, inviteLink) => Promise`
536+
[Official documentation](https://core.telegram.org/bots/api#revokechatinvitelink)
537+
538+
| Param | Type | Description |
539+
| --- | --- | --- |
540+
| chatId | `number/string` | Chat id |
541+
| inviteLink | `string` | The invite link to revoke |
542+
495543
## setChatPhoto
496544

497545
Use this method to set a new profile photo for the chat.
@@ -842,11 +890,12 @@ Sends a poll.
842890

843891
Use this method to change the list of the bot's commands
844892

845-
`telegram.setMyCommands(commands) => Promise`
893+
`telegram.setMyCommands(commands, [extra]) => Promise`
846894

847895
| Param | Type | Description |
848896
| --- | --- | --- |
849-
| commands | `object[]` | [List of bot commands](https://core.telegram.org/bots/api#setmycommands) |
897+
| commands | `object[]` | [List of bot commands](https://core.telegram.org/bots/api#botcommand) |
898+
| [extra] | `object` | [Extra parameters](https://core.telegram.org/bots/api#setmycommands) |
850899

851900
## sendQuiz
852901

@@ -914,7 +963,7 @@ Specifies an url to receive incoming updates via an outgoing webhook.
914963

915964
## unbanChatMember
916965

917-
Use this method to unban a previously kicked user in a supergroup.
966+
Use this method to unban a previously banned user in a supergroup or channel.
918967

919968
`telegram.unbanChatMember(chatId, userId) => Promise`
920969
[Official documentation](https://core.telegram.org/bots/api#unbanchatmember)

0 commit comments

Comments
 (0)