mirror of
https://github.com/abocn/TelegramBot.git
synced 2025-03-10 04:39:57 +00:00
Fixed replaces on setbotname and setbotdesc
This commit is contained in:
parent
aa79bf3ceb
commit
ac11b53619
@ -63,7 +63,7 @@ module.exports = (bot) => {
|
||||
const userId = ctx.from.id || Strings.unKnown;
|
||||
if (Config.admins.includes(userId)) {
|
||||
const botName = ctx.message.text.split(' ').slice(1).join(' ');
|
||||
const botNameReport = Strings.botNameChanged.replace({botName}, botName);
|
||||
const botNameReport = Strings.botNameChanged.replace('{botName}', botName);
|
||||
ctx.telegram.setMyName(botName).catch(error => ctx.reply(
|
||||
"Error when changing bot name:\n" + error, {
|
||||
reply_to_message_id: ctx.message.message_id
|
||||
@ -87,7 +87,7 @@ module.exports = (bot) => {
|
||||
const userId = ctx.from.id || Strings.unKnown;
|
||||
if (Config.admins.includes(userId)) {
|
||||
const botDesc = ctx.message.text.split(' ').slice(1).join(' ');
|
||||
const botDescReport = Strings.botDescChanged.replace({botDesc}, botDesc);
|
||||
const botDescReport = Strings.botDescChanged.replace('{botDesc}', botDesc);
|
||||
ctx.telegram.setMyDescription(botDesc).catch(error => ctx.reply(
|
||||
"Error when changing bot description:\n" + error, {
|
||||
reply_to_message_id: ctx.message.message_id
|
||||
|
Loading…
x
Reference in New Issue
Block a user