@@ -94,18 +94,6 @@ class GeneratorBot{
94
94
This bot will collect your "username" and your "commands" for statistics and analysis.
95
95
` ;
96
96
97
- /*
98
- const options = {
99
- reply_markup: {
100
- keyboard: this.keyboard,
101
- resize_keyboard: true,
102
- one_time_keyboard: true,
103
- },
104
- };
105
-
106
- this.bot.sendMessage(user_chat_id, start_msg, options);
107
- */
108
-
109
97
this . bot . sendMessage ( user_chat_id , start_msg , this . menu_keyboard ) ;
110
98
}
111
99
// help, show command list
@@ -134,9 +122,9 @@ class GeneratorBot{
134
122
if ( this . user_map . has ( username ) ) {
135
123
const queue = this . user_map . get ( username ) ;
136
124
let problem = "" ;
137
-
125
+
138
126
// not specify "message_id"
139
- if ( user_cmd === "/tips" )
127
+ if ( ! user_cmd . includes ( "_" ) )
140
128
problem = queue [ queue . length - 1 ] [ 'text' ] ;
141
129
// can expected specify "message_id"
142
130
else {
@@ -244,18 +232,7 @@ class GeneratorBot{
244
232
const options = this . configMenuKeyboard ( {
245
233
keyboard : [ [ '/tips' , '/solution' ] ]
246
234
} ) ;
247
- /*
248
- const options = {
249
- reply_markup: {
250
- keyboard: [
251
- [`/tips`, `/solution`],
252
- ],
253
- resize_keyboard: true,
254
- one_time_keyboard: true,
255
- },
256
- }
257
- */
258
-
235
+
259
236
this . bot . sendMessage ( user_chat_id , `You can click below command for tips or solution:
260
237
"/tips_${ message_id } ", "/solution_${ message_id } "
261
238
` , options ) ;
0 commit comments