Added documentation and made this command only work in private.
This commit is contained in:
@@ -4,19 +4,21 @@ import { logHandle } from "#root/bot/helpers/logging.js";
|
|||||||
|
|
||||||
const composer = new Composer<Context>();
|
const composer = new Composer<Context>();
|
||||||
|
|
||||||
const feature = composer.chatType(["group", "supergroup", "private"]);
|
const feature = composer.chatType(["private"]);
|
||||||
|
|
||||||
// const GROUP_IDS = process.env.GROUP_IDS
|
|
||||||
// ? process.env.GROUP_IDS.split(",")
|
|
||||||
// : undefined;
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* What triggers this feature and adds to the log when it has been triggered.
|
||||||
|
* The trigger is the command "/botInfo"
|
||||||
|
*/
|
||||||
feature.hears(
|
feature.hears(
|
||||||
"/botInfo",
|
"/botInfo",
|
||||||
logHandle("bot-info-command"),
|
logHandle("bot-info-command"),
|
||||||
async (ctx: Context) => {
|
async (ctx: Context) => {
|
||||||
if (ctx.chat && ctx.msg) {
|
// Checks if the context includes a message property.
|
||||||
await ctx.reply(
|
if (ctx.msg) {
|
||||||
`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\\!`,
|
// 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",
|
parse_mode: "MarkdownV2",
|
||||||
reply_parameters: { message_id: ctx.msg.message_id }
|
reply_parameters: { message_id: ctx.msg.message_id }
|
||||||
|
|||||||
Reference in New Issue
Block a user