Skip to content

Commit 8cd346f

Browse files
author
AffanTheBest
committed
Convert name to monospace
1 parent 461236e commit 8cd346f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

bot.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ bot.command('broadcast', async ctx => {
8787
msg = msg.replace('inline_keyboard:', '').replace(inline_keyboard, '');
8888
const users = await manageUsers({}, 'read');
8989
await Promise.all(users.result.map(async user => {
90-
ctx.api.sendMessage(user.id, msg.replace(/{name}/gi, user.name).replace(/{id}/gi, user.id),
90+
ctx.api.sendMessage(user.id, msg.replace(/{name}/gi, '`' + user.name + '`').replace(/{id}/gi, user.id),
9191
{parse_mode: "Markdown", disable_web_page_preview: true, reply_markup: {inline_keyboard: inline_keyboard ? JSON.parse(inline_keyboard) : null}});
9292
}));
9393
}

0 commit comments

Comments
 (0)