Skip to content

Commit 7c8f915

Browse files
committed
- fix misjudgment of conditions
(cause "/tips#xxx" not work) - remove some comment
1 parent bb6f9ab commit 7c8f915

File tree

1 file changed

+3
-26
lines changed

1 file changed

+3
-26
lines changed

class/GeneratorBot.js

Lines changed: 3 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -94,18 +94,6 @@ class GeneratorBot{
9494
This bot will collect your "username" and your "commands" for statistics and analysis.
9595
`;
9696

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-
10997
this.bot.sendMessage(user_chat_id, start_msg, this.menu_keyboard);
11098
}
11199
// help, show command list
@@ -134,9 +122,9 @@ class GeneratorBot{
134122
if(this.user_map.has(username)){
135123
const queue = this.user_map.get(username);
136124
let problem = "";
137-
125+
138126
// not specify "message_id"
139-
if(user_cmd === "/tips")
127+
if(!user_cmd.includes("_"))
140128
problem = queue[queue.length - 1]['text'];
141129
// can expected specify "message_id"
142130
else{
@@ -244,18 +232,7 @@ class GeneratorBot{
244232
const options = this.configMenuKeyboard({
245233
keyboard: [['/tips', '/solution']]
246234
});
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+
259236
this.bot.sendMessage(user_chat_id, `You can click below command for tips or solution:
260237
"/tips_${message_id}", "/solution_${message_id}"
261238
`, options);

0 commit comments

Comments
 (0)