From c61cc3bfaae53116127d2c8d1d1a6e800fef3a6b Mon Sep 17 00:00:00 2001 From: MasedMSD <68379695+MasedMSD@users.noreply.github.com> Date: Wed, 6 Nov 2024 15:35:23 +0500 Subject: [PATCH] added check on ping --- src/structures/client.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/structures/client.ts b/src/structures/client.ts index 569745a..011f16a 100644 --- a/src/structures/client.ts +++ b/src/structures/client.ts @@ -67,6 +67,10 @@ export class Client { this.bot.command("exec", execCommand); this.bot.command("start", startCommand); + this.bot.on("::mention", ctx => { + if (ctx.message?.text == `@${this.bot.botInfo.username}`) return ctx.reply("Я тут!"); + }); + this.bot.catch(console.error); await this.bot.init(); await this.bot.start({ drop_pending_updates: true, onStart });