You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Use this method to get the number of members in a chat
106
+
* Legasy, see getChatMemberCount
107
107
* @returns Number on success
108
108
*/
109
109
getChatMembersCount(): Promise<number>
110
110
111
+
/**
112
+
* Use this method to get the number of members in a chat
113
+
* @returns Number on success
114
+
*/
115
+
getChatMemberCount(): Promise<number>
116
+
111
117
/**
112
118
* Use this method to restrict a user in a supergroup. The bot must be an administrator in the supergroup for this to work and must have the appropriate admin rights. Pass True for all boolean parameters to lift restrictions from a user. Returns True on success.
113
119
* @param userId Unique identifier of the target user
@@ -571,7 +577,18 @@ export declare class TelegrafContext {
571
577
): Promise<tt.MessageLocation|boolean>
572
578
573
579
/**
574
-
* Use this method to kick a user from a group, a supergroup or a channel. In the case of supergroups and channels, the user will not be able to return to the group on their own using invite links, etc., unless unbanned first. The bot must be an administrator in the chat for this to work and must have the appropriate admin rights
580
+
* Use this method to ban a user in a group, a supergroup or a channel.
581
+
* @param userId Unique identifier of the target user
582
+
* @param extra Extra params
583
+
* @returns True on success
584
+
*/
585
+
banChatMember(
586
+
userId: number,
587
+
extra?: tt.ExtraBan
588
+
): Promise<boolean>
589
+
590
+
/**
591
+
* Legacy, see banChatMember
575
592
* @param userId Unique identifier of the target user
576
593
* @param untilDate Date when the user will be unbanned, unix time. If user is banned for more than 366 days or less than 30 seconds from the current time they are considered to be banned forever
577
594
* @returns True on success
@@ -706,17 +723,34 @@ export declare class TelegrafContext {
706
723
): Promise<boolean>
707
724
708
725
/**
709
-
* Use this method to get the current list of the bot's commands. Requires no parameters.
726
+
* Use this method to get the current list of the bot's commands for the given scope and user language.
727
+
* @param extra Extra parameters for getMyCommands
710
728
* @returns Array of BotCommand on success.
711
729
*/
712
-
getMyCommands(): Promise<tt.BotCommand[]>
730
+
getMyCommands(
731
+
extra?: tt.ExtraGetMyCommands
732
+
): Promise<tt.BotCommand[]>
713
733
714
734
/**
715
735
* Use this method to change the list of the bot's commands.
716
736
* @param commands A list of bot commands to be set as the list of the bot's commands. At most 100 commands can be specified.
737
+
* @param extra Extra parameters for setMyCommands
738
+
* @returns True on success
739
+
*/
740
+
setMyCommands(
741
+
commands: tt.BotCommand[],
742
+
extra?: tt.ExtraSetMyCommands
743
+
): Promise<boolean>
744
+
745
+
/**
746
+
* Use this method to delete the list of the bot's commands for the given scope and user language.
747
+
* After deletion, higher level commands will be shown to affected users.
748
+
* @param extra Extra parameters for deleteMyCommands
0 commit comments