-
Notifications
You must be signed in to change notification settings - Fork 43
Expand file tree
/
Copy pathconsole.js
More file actions
1 lines (1 loc) · 1.37 KB
/
Copy pathconsole.js
File metadata and controls
1 lines (1 loc) · 1.37 KB
1
module.exports.config={name:"console",version:"1.0.0",hasPermssion:1,credits:"ManhG",description:"Bật tắt console ở nhóm hiện tại",commandCategory:"admin",depndencies:{},usages:"",cooldowns:2},module.exports.handleEvent=async({event:e,api:o,Users:a,Threads:t})=>{const n=global.data.threadData.get(e.threadID)||{};if((void 0===n.console||1!=n.console)&&e.senderID!=global.data.botID){var s=global.data.threadInfo.get(e.threadID).threadName||"Tên không tồn tại",m=await a.getNameUser(e.senderID),d=e.body||"Ảnh, video hoặc ký tự đặc biệt",l=["[33m","[34m","[35m","[36m","[31m","[1m"],c=(Math.floor(Math.random()*l.length),["[33m","[34m","[35m","[36m","[31m","[1m"][Math.floor(Math.random()*l.length)]),r=["[34m","[33m","[31m","[1m","[34m","[36m"][Math.floor(Math.random()*l.length)];console.log("[32mBox:[37m ["+c+s+"[37m -> [0m[37m ["+r+m+"[37m -> [0m"+d)}},module.exports.languages={vi:{on:"Bật",off:"Tắt",successText:"console thành công"},en:{on:"on",off:"off",successText:"console success!"}},module.exports.run=async function({api:e,event:o,Threads:a,getText:t}){const{threadID:n,messageID:s}=o;let m=(await a.getData(n)).data;return void 0===m.console||1==m.console?m.console=!1:m.console=!0,await a.setData(n,{data:m}),global.data.threadData.set(n,m),e.sendMessage(`${0==m.console?t("on"):t("off")} ${t("successText")}`,n,s)};