diff --git a/src/bot/features/botInfoCommand.ts b/src/bot/features/botInfoCommand.ts index 28eeed6..2d465b9 100644 --- a/src/bot/features/botInfoCommand.ts +++ b/src/bot/features/botInfoCommand.ts @@ -4,19 +4,21 @@ import { logHandle } from "#root/bot/helpers/logging.js"; const composer = new Composer(); -const feature = composer.chatType(["group", "supergroup", "private"]); - -// const GROUP_IDS = process.env.GROUP_IDS -// ? process.env.GROUP_IDS.split(",") -// : undefined; +const feature = composer.chatType(["private"]); +/** + * What triggers this feature and adds to the log when it has been triggered. + * The trigger is the command "/botInfo" + */ feature.hears( "/botInfo", logHandle("bot-info-command"), async (ctx: Context) => { - if (ctx.chat && ctx.msg) { - await ctx.reply( - `I am a bot designed to delete any Twitter/X links and reformatting services within groups\\. I now check embedded links\\! By default I only work with whitelisted group IDs\\.\n\nYou can fork me from this link: https://github\\.com/lucid\\-creations\\-media/no\\-twitter\\-bot and deploy me for use in your own groups\\!`, + // Checks if the context includes a message property. + if (ctx.msg) { + // Replies to the message. + return await ctx.reply( + `I am a bot designed to delete any Twitter/X and Meta links along with corresponding reformatting services within whitelisted groups\\. I now check embedded links\\! By default I only work with whitelisted group IDs\\.\n\nYou can fork me from this link: https://github\\.com/lucid\\-creations\\-media/no\\-twitter\\-bot and deploy me for use in your own groups\\!`, { parse_mode: "MarkdownV2", reply_parameters: { message_id: ctx.msg.message_id }