File size: 1,090 Bytes
2821330 |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
module.exports.config = {
name: "getlink",
version: "1.0.1",
hasPermssion: 0,
credits: "Mirai Team",
description: "Get the URL Download from Video, Audio is sent from the group",
usePrefix: false,
commandCategory: "Tool",
usages: "getLink",
cooldowns: 5,
};
module.exports.languages = {
"vi": {
"invaidFormat": "❌ Tin nhắn bạn phản hồi phải là một audio, video, ảnh nào đó"
},
"en": {
"invaidFormat": "❌ Your need reply a message have contain an audio, video or picture"
}
}
module.exports.run = async ({ api, event, getText }) => {
if (event.type !== "message_reply") return api.sendMessage(getText("invaidFormat"), event.threadID, event.messageID);
if (!event.messageReply.attachments || event.messageReply.attachments.length == 0) return api.sendMessage(getText("invaidFormat"), event.threadID, event.messageID);
if (event.messageReply.attachments.length > 1) return api.sendMessage(getText("invaidFormat"), event.threadID, event.messageID);
return api.sendMessage(event.messageReply.attachments[0].url, event.threadID, event.messageID);
} |