Added documentation and made this command only work in private.

This commit is contained in:
2025-09-29 01:00:13 -04:00
parent dd06eb3f7c
commit 07c7cec668

View File

@@ -4,19 +4,21 @@ import { logHandle } from "#root/bot/helpers/logging.js";
const composer = new Composer<Context>();
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 }