typescript-telegram-bot-api
Advanced tools
Comparing version 0.3.3 to 0.3.4
@@ -1,2 +0,2 @@ | ||
import { CallbackGame, WebAppData, LoginUrl, SwitchInlineQueryChosenChat } from './'; | ||
import { CallbackGame, WebAppInfo, LoginUrl, SwitchInlineQueryChosenChat } from './'; | ||
/** | ||
@@ -27,3 +27,3 @@ * ## InlineKeyboardButton | ||
*/ | ||
web_app?: WebAppData; | ||
web_app?: WebAppInfo; | ||
/** | ||
@@ -30,0 +30,0 @@ * Optional. An HTTPS URL used to automatically authorize the user. Can be used as a replacement for the Telegram |
@@ -0,1 +1,2 @@ | ||
import { Attachment } from './index'; | ||
/** | ||
@@ -17,3 +18,3 @@ * InputPaidMediaPhoto | ||
*/ | ||
media: string; | ||
media: string | Attachment; | ||
}; |
import { InputFile } from './InputFile'; | ||
import { Attachment } from './index'; | ||
/** | ||
@@ -18,3 +19,3 @@ * InputPaidMediaVideo | ||
*/ | ||
media: string; | ||
media: string | Attachment; | ||
/** | ||
@@ -21,0 +22,0 @@ * Optional. Thumbnail of the file sent; can be ignored if thumbnail generation for the file is supported server-side. |
@@ -1,2 +0,2 @@ | ||
import { ParseMode } from './'; | ||
import { MessageEntity, ParseMode } from './'; | ||
/** | ||
@@ -21,3 +21,3 @@ * ## InputPollOption | ||
*/ | ||
text_entities?: 'string'; | ||
text_entities?: MessageEntity[]; | ||
}; |
@@ -9,3 +9,3 @@ import { WebAppInfo, KeyboardButtonRequestChat, KeyboardButtonPollType, KeyboardButtonRequestUsers } from './'; | ||
*/ | ||
export type KeyboardButton = { | ||
export type KeyboardButton = string | ({ | ||
/** | ||
@@ -16,11 +16,11 @@ * Text of the button. If none of the optional fields are used, it will be sent as a message when the button is | ||
text: string; | ||
} & AtMostOne<{ | ||
} & Partial<AtMostOne<{ | ||
/** | ||
* Optional. If specified, pressing the button will open a list of suitable users. Identifiers of selected users will | ||
* be sent to the bot in a “users_shared” service message. Available in private chats only. | ||
* Optional. If specified, pressing the button will open a list of suitable users. Identifiers of selected users | ||
* will be sent to the bot in a “users_shared” service message. Available in private chats only. | ||
*/ | ||
request_users?: KeyboardButtonRequestUsers; | ||
/** | ||
* Optional. If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send its | ||
* identifier to the bot in a “chat_shared” service message. Available in private chats only. | ||
* Optional. If specified, pressing the button will open a list of suitable chats. Tapping on a chat will send | ||
* its identifier to the bot in a “chat_shared” service message. Available in private chats only. | ||
*/ | ||
@@ -34,16 +34,16 @@ request_chat?: KeyboardButtonRequestChat; | ||
/** | ||
* Optional. If True, the user's current location will be sent when the button is pressed. Available in private chats | ||
* only. | ||
* Optional. If True, the user's current location will be sent when the button is pressed. Available in private | ||
* chats only. | ||
*/ | ||
request_location?: boolean; | ||
/** | ||
* Optional. If specified, the user will be asked to create a poll and send it to the bot when the button is pressed. | ||
* Available in private chats only. | ||
* Optional. If specified, the user will be asked to create a poll and send it to the bot when the button is | ||
* pressed. Available in private chats only. | ||
*/ | ||
request_poll?: KeyboardButtonPollType; | ||
/** | ||
* Optional. If specified, the described Web App will be launched when the button is pressed. The Web App will be able | ||
* to send a “web_app_data” service message. Available in private chats only. | ||
* Optional. If specified, the described Web App will be launched when the button is pressed. The Web App will | ||
* be able to send a “web_app_data” service message. Available in private chats only. | ||
*/ | ||
web_app?: WebAppInfo; | ||
}>; | ||
}>>); |
@@ -12,3 +12,3 @@ /** | ||
*/ | ||
type: 'quiz' | 'regular'; | ||
type?: 'quiz' | 'regular'; | ||
}; |
@@ -0,1 +1,2 @@ | ||
import { ChatAdministratorRights } from './ChatAdministratorRights'; | ||
/** | ||
@@ -36,3 +37,3 @@ * ## KeyboardButtonRequestChat | ||
*/ | ||
user_administrator_rights?: string; | ||
user_administrator_rights?: Partial<ChatAdministratorRights>; | ||
/** | ||
@@ -42,3 +43,3 @@ * Optional. A JSON-serialized object listing the required administrator rights of the bot in the chat. The rights | ||
*/ | ||
bot_administrator_rights?: string; | ||
bot_administrator_rights?: Partial<ChatAdministratorRights>; | ||
/** | ||
@@ -51,11 +52,11 @@ * Optional. Pass True to request a chat with the bot as a member. Otherwise, no additional restrictions are applied. | ||
*/ | ||
request_title?: string; | ||
request_title?: boolean; | ||
/** | ||
* Optional. Pass True to request the chat's username | ||
*/ | ||
request_username?: string; | ||
request_username?: boolean; | ||
/** | ||
* Optional. Pass True to request the chat's photo | ||
*/ | ||
request_photo?: string; | ||
request_photo?: boolean; | ||
}; |
@@ -30,11 +30,11 @@ /** | ||
*/ | ||
request_name?: string; | ||
request_name?: boolean; | ||
/** | ||
* Optional. Pass True to request the users' usernames | ||
*/ | ||
request_username?: string; | ||
request_username?: boolean; | ||
/** | ||
* Optional. Pass True to request the users' photos | ||
*/ | ||
request_photo?: string; | ||
request_photo?: boolean; | ||
}; |
@@ -18,3 +18,3 @@ import { PhotoSize } from './PhotoSize'; | ||
*/ | ||
first_name: string; | ||
first_name?: string; | ||
/** | ||
@@ -21,0 +21,0 @@ * Optional. Last name of the user, if the name was requested by the bot |
{ | ||
"type": "commonjs", | ||
"name": "typescript-telegram-bot-api", | ||
"version": "0.3.3", | ||
"version": "0.3.4", | ||
"description": "Telegram Bot API wrapper for Node.js written in TypeScript", | ||
@@ -6,0 +6,0 @@ "repository": "github:Borodin/typescript-telegram-bot-api", |
Sorry, the diff of this file is too big to display
448666
11810