Editing the response message to the user
IN80 opened this issue · 0 comments
IN80 commented
Hello.
In the file /src/users.ts
I found the function autoReply
/** Ticket auto reply for common questions
* @param {context} ctx Bot context.
* @param {bot} bot Bot object.
* @param {chat} chat Bot chat.
* @return {boolean}
*/
function autoReply(ctx: Context) {
const strings = cache.config.autoreply;
for (const i in strings) {
if (ctx.message.text.toString().indexOf(strings[i]['question']) > -1) {
// Define message
const msg =
`${cache.config.language.dear} ` +
`${ctx.message.from.first_name},\n\n` +
`${strings[i]['answer']}\n\n` +
`${cache.config.language.regards}\n` +
`${cache.config.language.automatedReplyAuthor}\n\n` +
`_${cache.config.language.automatedReply}_`;
// Send message with keyboard
middleware.reply(ctx, msg, {parse_mode: cache.config.parse_mode});
return true;
}
}
return false;
}
She replies to any message from the user, right?
I edit it, but nothing changes.
I want to change the signature. Make sure that the answer is not from a person, but from a group.