@xtsea/tgcore-ts 0.1.10 → 0.1.11
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +31 -0
- package/dist/index.d.cts +11 -0
- package/dist/index.d.ts +11 -0
- package/dist/index.js +31 -0
- package/package.json +1 -1
package/dist/index.cjs
CHANGED
|
@@ -121,6 +121,31 @@ var SendMessageBuilder = class extends BaseCallBuilder {
|
|
|
121
121
|
}
|
|
122
122
|
};
|
|
123
123
|
|
|
124
|
+
// src/calls/sendPhoto.ts
|
|
125
|
+
var SendPhotoBuilder = class extends BaseCallBuilder {
|
|
126
|
+
chatId(id) {
|
|
127
|
+
return this.set("chat_id", id);
|
|
128
|
+
}
|
|
129
|
+
photo(url) {
|
|
130
|
+
return this.set("photo", url);
|
|
131
|
+
}
|
|
132
|
+
caption(caption) {
|
|
133
|
+
return this.set("caption", caption);
|
|
134
|
+
}
|
|
135
|
+
parseMode(mode) {
|
|
136
|
+
return this.set("parse_mode", mode);
|
|
137
|
+
}
|
|
138
|
+
disableNotification(value) {
|
|
139
|
+
return this.set("disable_notification", value);
|
|
140
|
+
}
|
|
141
|
+
protectContent(value) {
|
|
142
|
+
return this.set("protect_content", value);
|
|
143
|
+
}
|
|
144
|
+
replyMarkup(markup) {
|
|
145
|
+
return this.set("reply_markup", markup);
|
|
146
|
+
}
|
|
147
|
+
};
|
|
148
|
+
|
|
124
149
|
// src/calls/index.ts
|
|
125
150
|
var CallMethods = class {
|
|
126
151
|
constructor(http) {
|
|
@@ -132,6 +157,12 @@ var CallMethods = class {
|
|
|
132
157
|
"/api/v2/sendMessage"
|
|
133
158
|
);
|
|
134
159
|
}
|
|
160
|
+
sendPhoto() {
|
|
161
|
+
return new SendPhotoBuilder(
|
|
162
|
+
this.http,
|
|
163
|
+
"/api/v2/sendPhoto"
|
|
164
|
+
);
|
|
165
|
+
}
|
|
135
166
|
};
|
|
136
167
|
|
|
137
168
|
// src/client.ts
|
package/dist/index.d.cts
CHANGED
|
@@ -42,10 +42,21 @@ declare class SendMessageBuilder extends BaseCallBuilder {
|
|
|
42
42
|
linkPreviewOptions(options: any): this;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
declare class SendPhotoBuilder extends BaseCallBuilder {
|
|
46
|
+
chatId(id: string | number): this;
|
|
47
|
+
photo(url: string): this;
|
|
48
|
+
caption(caption: string): this;
|
|
49
|
+
parseMode(mode: "HTML" | "Markdown" | "MarkdownV2"): this;
|
|
50
|
+
disableNotification(value: boolean): this;
|
|
51
|
+
protectContent(value: boolean): this;
|
|
52
|
+
replyMarkup(markup: any): this;
|
|
53
|
+
}
|
|
54
|
+
|
|
45
55
|
declare class CallMethods {
|
|
46
56
|
private http;
|
|
47
57
|
constructor(http: any);
|
|
48
58
|
sendMessage(): SendMessageBuilder;
|
|
59
|
+
sendPhoto(): SendPhotoBuilder;
|
|
49
60
|
}
|
|
50
61
|
|
|
51
62
|
type ClientOptions = {
|
package/dist/index.d.ts
CHANGED
|
@@ -42,10 +42,21 @@ declare class SendMessageBuilder extends BaseCallBuilder {
|
|
|
42
42
|
linkPreviewOptions(options: any): this;
|
|
43
43
|
}
|
|
44
44
|
|
|
45
|
+
declare class SendPhotoBuilder extends BaseCallBuilder {
|
|
46
|
+
chatId(id: string | number): this;
|
|
47
|
+
photo(url: string): this;
|
|
48
|
+
caption(caption: string): this;
|
|
49
|
+
parseMode(mode: "HTML" | "Markdown" | "MarkdownV2"): this;
|
|
50
|
+
disableNotification(value: boolean): this;
|
|
51
|
+
protectContent(value: boolean): this;
|
|
52
|
+
replyMarkup(markup: any): this;
|
|
53
|
+
}
|
|
54
|
+
|
|
45
55
|
declare class CallMethods {
|
|
46
56
|
private http;
|
|
47
57
|
constructor(http: any);
|
|
48
58
|
sendMessage(): SendMessageBuilder;
|
|
59
|
+
sendPhoto(): SendPhotoBuilder;
|
|
49
60
|
}
|
|
50
61
|
|
|
51
62
|
type ClientOptions = {
|
package/dist/index.js
CHANGED
|
@@ -93,6 +93,31 @@ var SendMessageBuilder = class extends BaseCallBuilder {
|
|
|
93
93
|
}
|
|
94
94
|
};
|
|
95
95
|
|
|
96
|
+
// src/calls/sendPhoto.ts
|
|
97
|
+
var SendPhotoBuilder = class extends BaseCallBuilder {
|
|
98
|
+
chatId(id) {
|
|
99
|
+
return this.set("chat_id", id);
|
|
100
|
+
}
|
|
101
|
+
photo(url) {
|
|
102
|
+
return this.set("photo", url);
|
|
103
|
+
}
|
|
104
|
+
caption(caption) {
|
|
105
|
+
return this.set("caption", caption);
|
|
106
|
+
}
|
|
107
|
+
parseMode(mode) {
|
|
108
|
+
return this.set("parse_mode", mode);
|
|
109
|
+
}
|
|
110
|
+
disableNotification(value) {
|
|
111
|
+
return this.set("disable_notification", value);
|
|
112
|
+
}
|
|
113
|
+
protectContent(value) {
|
|
114
|
+
return this.set("protect_content", value);
|
|
115
|
+
}
|
|
116
|
+
replyMarkup(markup) {
|
|
117
|
+
return this.set("reply_markup", markup);
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
|
|
96
121
|
// src/calls/index.ts
|
|
97
122
|
var CallMethods = class {
|
|
98
123
|
constructor(http) {
|
|
@@ -104,6 +129,12 @@ var CallMethods = class {
|
|
|
104
129
|
"/api/v2/sendMessage"
|
|
105
130
|
);
|
|
106
131
|
}
|
|
132
|
+
sendPhoto() {
|
|
133
|
+
return new SendPhotoBuilder(
|
|
134
|
+
this.http,
|
|
135
|
+
"/api/v2/sendPhoto"
|
|
136
|
+
);
|
|
137
|
+
}
|
|
107
138
|
};
|
|
108
139
|
|
|
109
140
|
// src/client.ts
|