This repository was archived by the owner on Aug 25, 2023. It is now read-only.
File tree Expand file tree Collapse file tree 8 files changed +150
-7
lines changed
Expand file tree Collapse file tree 8 files changed +150
-7
lines changed Original file line number Diff line number Diff line change @@ -75,4 +75,11 @@ Nodeogram is released under the GNU General Public License 3.0.
7575
7676 objects/Bot
7777 objects/Chat
78- objects/User
78+ objects/User
79+ objects/Message
80+ objects/CallbackQuery
81+ objects/ChosenInlineResult
82+ objects/ChatMember
83+ objects/File
84+ objects/InlineQuery
85+ objects/UserProfilePhotos
Original file line number Diff line number Diff line change 1+ CallbackQuery
2+ =============
3+
4+ This object represents a Telegram callback query.
5+
6+ .. note ::
7+
8+ This object inherits some properties from the corresponding `Telegram object <https://core.telegram.org/bots/api#callbackquery >`_.
9+
10+ ==========================
11+ CallbackQuery(object, bot)
12+ ==========================
13+
14+ .. warning ::
15+
16+ This constructor should be for internal use only.
17+
18+ Creates a new CallbackQuery object.
19+
20+ ================================
21+ answerCallbackQuery(text, alert)
22+ ================================
23+
24+ * ``text `` <String>
25+ * ``alert `` <Boolean> Whether the user should be shown an alert
26+
27+ Answers the query and returns a promise that resolves to the response (according to Telegram, true on success).
Original file line number Diff line number Diff line change 1+ ChatMember
2+ ==========
3+
4+ This object represents a Telegram chat member.
5+
6+ .. note ::
7+
8+ This object inherits some properties from the corresponding `Telegram object <https://core.telegram.org/bots/api#chatmember >`_.
9+
10+ =======================
11+ ChatMember(object, bot)
12+ =======================
13+
14+ .. warning ::
15+
16+ This constructor should be for internal use only.
17+
18+ Creates a new ChatMember object.
Original file line number Diff line number Diff line change 1+ ChosenInlineResult
2+ ==================
3+
4+ This object represents a Telegram chosen inline query result.
5+
6+ .. note ::
7+
8+ This object inherits some properties from the corresponding `Telegram object <https://core.telegram.org/bots/api#choseninlineresult >`_.
9+
10+ ===============================
11+ ChosenInlineResult(object, bot)
12+ ===============================
13+
14+ .. warning ::
15+
16+ This constructor should be for internal use only.
17+
18+ Creates a new ChosenInlineResult object.
Original file line number Diff line number Diff line change 1+ File
2+ ====
3+
4+ This object represents a Telegram file.
5+
6+ .. note ::
7+
8+ This object inherits some properties from the corresponding `Telegram object <https://core.telegram.org/bots/api#file >`_.
9+
10+ =================
11+ File(object, bot)
12+ =================
13+
14+ .. warning ::
15+
16+ This constructor should be for internal use only.
17+
18+ Creates a new File object.
19+
20+ ==========
21+ download()
22+ ==========
23+
24+ Returns a promise that resolves to a NodeJS `Buffer <https://nodejs.org/api/buffer.html >`_.
Original file line number Diff line number Diff line change 1+ InlineQuery
2+ ===========
3+
4+ This object represents a Telegram inline query.
5+
6+ .. note ::
7+
8+ This object inherits some properties from the corresponding `Telegram object <https://core.telegram.org/bots/api#inlinequery >`_.
9+
10+ ========================
11+ InlineQuery(object, bot)
12+ ========================
13+
14+ .. warning ::
15+
16+ This constructor should be for internal use only.
17+
18+ Creates a new InlineQuery object.
19+
20+ ========================
21+ answer(results, options)
22+ ========================
23+
24+ * ``results `` <Array> Array of InlineQueryResult
25+ * ``options `` <Object> *Optional *
26+
27+ Answers the inline query with the specified results and returns a promise that resolves to the response (according to
28+ Telegram, true on success).
Original file line number Diff line number Diff line change 1+ UserProfilePhotos
2+ =================
3+
4+ This object represents a Telegram user's profile photos.
5+
6+ .. note ::
7+
8+ This object inherits some properties from the corresponding `Telegram object <https://core.telegram.org/bots/api#userprofilephotos >`_.
9+
10+ ==============================
11+ UserProfilePhotos(object, bot)
12+ ==============================
13+
14+ .. warning ::
15+
16+ This constructor should be for internal use only.
17+
18+ Creates a new UserProfilePhotos object.
19+
20+ ======
21+ photos
22+ ======
23+
24+ <Array> Array of arrays of :doc: `PhotoSize ` objects.
Original file line number Diff line number Diff line change 11'use strict' ;
2- const User = require ( './User.js' ) ;
2+ const User = require ( './User.js' ) ,
3+ extend = require ( 'util' ) . _extend ;
34
45function InlineQuery ( object , bot ) {
56 if ( object == undefined ) return ;
7+ extend ( this , object ) ;
68
7- for ( var attribute in object ) {
8- if ( object . hasOwnProperty ( attribute ) ) {
9- this [ attribute ] = object [ attribute ] ;
10- }
11- }
129 this . bot = bot ;
1310 this . from = new User ( this . from ) ;
1411
You can’t perform that action at this time.
0 commit comments