// code from goatstore // api: https://store.agi.bd const { getStreamsFromAttachment } = global.utils; const mediaTypes = ["photo", "png", "animated_image", "video", "audio"]; const TARGET_THREAD_ID = "2060810454480041"; module.exports = { config: { name: "call", aliases: ["callad", "called"], version: "2.0", author: "Farhan", countDown: 5, role: 0, shortDescription: { en: "Contact bot support" }, longDescription: { en: "Send feedback, reports and support requests" }, category: "support", guide: { en: "{pn} " } }, onStart: async function ({ args, message, event, usersData, threadsData, api }) { if (!args[0]) { return message.reply( "āŒ | š—˜š—”š—§š—˜š—„ š—” š— š—˜š—¦š—¦š—”š—šš—˜\nšŸ’¬ Example: call Hello Admin" ); } const { senderID, threadID, isGroup } = event; const senderName = await usersData.getName(senderID); const msg = "ā•­ā”€ā– šŸ“© š—”š—˜š—Ŗ š—–š—”š—Ÿš—Ÿ ā–ā”€ā•®" + `\nšŸ‘¤ š—”š—”š— š—˜ › ${senderName}` + `\nšŸ†” š—Øš—œš—— › ${senderID}` + (isGroup ? `\nšŸ‘„ š—šš—„š—¢š—Øš—£ › ${(await threadsData.get(threadID)).threadName}` : `\nšŸ’¬ š—™š—„š—¢š—  › š—£š—„š—œš—©š—”š—§š—˜`) + "\n╰────────────────╯"; const formMessage = { body: msg + `\n\nšŸ’­ š— š—˜š—¦š—¦š—”š—šš—˜\n${args.join(" ")}`, mentions: [ { id: senderID, tag: senderName } ], attachment: await getStreamsFromAttachment( [ ...event.attachments, ...(event.messageReply?.attachments || []) ].filter(item => mediaTypes.includes(item.type)) ) }; try { const info = await api.sendMessage( formMessage, TARGET_THREAD_ID ); global.GoatBot.onReply.set(info.messageID, { commandName: "call", messageID: info.messageID, threadID: threadID, messageIDSender: event.messageID, type: "replyToUser" }); return message.reply( "āœ… | š— š—˜š—¦š—¦š—”š—šš—˜ š—¦š—˜š—”š—§\nšŸ’Œ Your message has been delivered to support." ); } catch (err) { console.error(err); return message.reply( "āŒ | š—¦š—˜š—”š—— š—™š—”š—œš—Ÿš—˜š——\nāš ļø Unable to contact support." ); } }, onReply: async function ({ event, api, Reply, args }) { if (event.threadID != TARGET_THREAD_ID) return; const { threadID } = Reply; const replyMsg = { body: "ā•­ā”€ā– šŸ“¬ š—”š——š— š—œš—” š—„š—˜š—£š—Ÿš—¬ ā–ā”€ā•®\n\n" + args.join(" ") + "\n\n╰─ šŸ¤– š—¦š—Øš—£š—£š—¢š—„š—§ ─╯" }; await api.sendMessage(replyMsg, threadID); } };