Skip to content

Instantly share code, notes, and snippets.

@mask-sir
Created February 3, 2022 11:32
Show Gist options
  • Save mask-sir/03a597c81d4436e7781b4e0e5a3c3c9a to your computer and use it in GitHub Desktop.
Save mask-sir/03a597c81d4436e7781b4e0e5a3c3c9a to your computer and use it in GitHub Desktop.
const Asena = require("../Utilis/events")
const Language = require("../language")
const {
enableMention,
} = require("../Utilis/Misc")
const { MessageType } = require("@adiwajshing/baileys")
const { getMessage, deleteMessage } = require("../Utilis/warn")
const Lang = Language.getString("greetings")
const Lang1 = Language.getString("admin")
Mask.addCommand(
{
pattern: "mention ?(.*)",
fromMe: true,
desc: Lang.MENTION_DESC,
},
async (message, match) => {
if (match == "")
return await message.sendMessage(
genButtons(["ON", "OFF", "GET"], Lang.M_ENABLE, "Choose"),
{},
MessageType.buttonsMessage
)
if (match == "get") {
let msg = await mentionMessage()
if (!msg)
return await message.sendMessage(Lang.NOT_ENABLED.format("Mention"))
return await message.sendMessage(msg)
} else if (match == "on" || match == "off") {
await enableMention(match)
return await message.sendMessage(
Lang.A_ENABLED.format(
"Reply to Mention",
`${match == "on" ? Lang.ENABLE : Lang.DISABLE}`
)
)
}
await enableMention(match)
clearFiles()
return await message.sendMessage(Lang.A_UPDATED.format("Mention"))
}
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment