From 68766d5a6d1b4a993073dece7b8336f9b1686669 Mon Sep 17 00:00:00 2001 From: GiovaniFZ Date: Sun, 6 Apr 2025 12:30:51 -0300 Subject: [PATCH] fix: fix for username with html tags --- src/commands/gsmarena.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/commands/gsmarena.js b/src/commands/gsmarena.js index f6fce9c..db9ce08 100644 --- a/src/commands/gsmarena.js +++ b/src/commands/gsmarena.js @@ -196,7 +196,11 @@ function extractMetaData(meta, key) { module.exports = (bot) => { bot.command(['d', 'device'], spamwatchMiddleware, async (ctx) => { const userId = ctx.from.id; - const userName = ctx.from.first_name; + let userName = String(ctx.from.first_name); + + if(userName.includes("<") && userName.includes(">")) { + userName = userName.replace("<", "").replace(">", ""); + } const phone = ctx.message.text.split(" ").slice(1).join(" "); if (!phone) {