← back to browse
goat command

all

Tag all members

0
views
0
likes
0
installs
raw source
module.exports = {
 config: {
 name: "all",
 version: "2.2.0",
 author: "๐Œ๐š๐‘๐ฎ๐…",
 countDown: 5,
 role: 0,
 shortDescription: "Tag all members",
 longDescription: "Group er shobai ke ekshathe tag kore",
 category: "group",
 guide: { en: "{pn} [message]" }
 },

 onStart: async function ({ api, event, args, message }) {
 const { participantIDs } = event;
 const mentions = [];
 let body = args.join(" ") || "All";

 let i = 0;
 for (const uid of participantIDs) {
 const name = body[i] || " ";
 mentions.push({ tag: name, id: uid });
 i++;
 if(i >= body.length) i = 0;
 }

 api.setMessageReaction("๐Ÿ“ข", event.messageID, () => {}, true);
 return message.reply({ body, mentions });
 }
};

View raw file