Created
July 10, 2025 02:27
-
-
Save dipto-008/6680eb5491d7ed4d61ad3f95a5fbe802 to your computer and use it in GitHub Desktop.
Hey noob ๐๐
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const fs = require("fs-extra"); | |
const { utils } = global; | |
module.exports = { | |
config: { | |
name: "prefix", | |
version: "1.5", | |
author: " BaYjid", | |
countDown: 5, | |
role: 0, | |
description: "๐ ๏ธ ๐๐ก๐๐ง๐ ๐ ๐ญ๐ก๐ ๐๐จ๐ญ ๐ฉ๐ซ๐๐๐ข๐ฑ ๐ข๐ง ๐ฒ๐จ๐ฎ๐ซ ๐๐ก๐๐ญ ๐๐จ๐ฑ ๐จ๐ซ ๐ญ๐ก๐ ๐๐ง๐ญ๐ข๐ซ๐ ๐ฌ๐ฒ๐ฌ๐ญ๐๐ฆ (๐จ๐ง๐ฅ๐ฒ ๐๐จ๐ญ ๐๐๐ฆ๐ข๐ง)", | |
category: "โ๏ธ ๐๐จ๐ง๐๐ข๐ ๐ฎ๐ซ๐๐ญ๐ข๐จ๐ง", | |
guide: { | |
en: | |
"โโโโโโโโโโโโโโโโโโโ\n" | |
+ "๐ {pn} <new prefix>: ๐๐ก๐๐ง๐ ๐ ๐ญ๐ก๐ ๐ฉ๐ซ๐๐๐ข๐ฑ ๐ข๐ง ๐ฒ๐จ๐ฎ๐ซ ๐๐ก๐๐ญ ๐๐จ๐ฑ\n" | |
+ "โโโโโโโโโโโโโโโโโโโ\n" | |
+ "๐ ๐๐ฑ๐๐ฆ๐ฉ๐ฅ๐:\n" | |
+ "๐น {pn} #\n" | |
+ "โโโโโโโโโโโโโโโโโโโ\n" | |
+ "๐ {pn} <new prefix> -g: ๐๐ก๐๐ง๐ ๐ ๐ญ๐ก๐ ๐ฉ๐ซ๐๐๐ข๐ฑ ๐ข๐ง ๐ญ๐ก๐ ๐๐ง๐ญ๐ข๐ซ๐ ๐ฌ๐ฒ๐ฌ๐ญ๐๐ฆ (๐จ๐ง๐ฅ๐ฒ ๐๐จ๐ญ ๐๐๐ฆ๐ข๐ง)\n" | |
+ "โโโโโโโโโโโโโโโโโโโ\n" | |
+ "๐ ๐๐ฑ๐๐ฆ๐ฉ๐ฅ๐:\n" | |
+ "๐น {pn} # -g\n" | |
+ "โโโโโโโโโโโโโโโโโโโ\n" | |
+ "๐ ๏ธ {pn} reset: ๐๐๐ฌ๐๐ญ ๐ฒ๐จ๐ฎ๐ซ ๐๐ก๐๐ญ ๐๐จ๐ฑ ๐ฉ๐ซ๐๐๐ข๐ฑ ๐ญ๐จ ๐๐๐๐๐ฎ๐ฅ๐ญ\n" | |
+ "โโโโโโโโโโโโโโโโโโโ" | |
} | |
}, | |
langs: { | |
en: { | |
reset: | |
"โโโโโโโโโโโโโโโโโโโ\n" | |
+ "โ ๐๐จ๐ฎ๐ซ ๐ฉ๐ซ๐๐๐ข๐ฑ ๐ก๐๐ฌ ๐๐๐๐ง ๐ซ๐๐ฌ๐๐ญ ๐ญ๐จ ๐๐๐๐๐ฎ๐ฅ๐ญ: %1\n" | |
+ "โโโโโโโโโโโโโโโโโโโ", | |
onlyAdmin: | |
"โโโโโโโโโโโโโโโโโโโ\n" | |
+ "โ ๏ธ ๐๐ง๐ฅ๐ฒ ๐๐๐ฆ๐ข๐ง ๐๐๐ง ๐๐ก๐๐ง๐ ๐ ๐ญ๐ก๐ ๐ฌ๐ฒ๐ฌ๐ญ๐๐ฆ ๐ฉ๐ซ๐๐๐ข๐ฑ!\n" | |
+ "โโโโโโโโโโโโโโโโโโโ", | |
confirmGlobal: | |
"โโโโโโโโโโโโโโโโโโโ\n" | |
+ "๐ ๐๐ฅ๐๐๐ฌ๐ ๐ซ๐๐๐๐ญ ๐ญ๐จ ๐ญ๐ก๐ข๐ฌ ๐ฆ๐๐ฌ๐ฌ๐๐ ๐ ๐ญ๐จ ๐๐จ๐ง๐๐ข๐ซ๐ฆ ๐๐ก๐๐ง๐ ๐ข๐ง๐ ๐ญ๐ก๐ ๐ฌ๐ฒ๐ฌ๐ญ๐๐ฆ ๐ฉ๐ซ๐๐๐ข๐ฑ.\n" | |
+ "โโโโโโโโโโโโโโโโโโโ", | |
confirmThisThread: | |
"โโโโโโโโโโโโโโโโโโโ\n" | |
+ "๐ ๐๐ฅ๐๐๐ฌ๐ ๐ซ๐๐๐๐ญ ๐ญ๐จ ๐ญ๐ก๐ข๐ฌ ๐ฆ๐๐ฌ๐ฌ๐๐ ๐ ๐ญ๐จ ๐๐จ๐ง๐๐ข๐ซ๐ฆ ๐๐ก๐๐ง๐ ๐ข๐ง๐ ๐ญ๐ก๐ ๐ฉ๐ซ๐๐๐ข๐ฑ ๐ข๐ง ๐ฒ๐จ๐ฎ๐ซ ๐๐ก๐๐ญ ๐ ๐ซ๐จ๐ฎ๐ฉ.\n" | |
+ "โโโโโโโโโโโโโโโโโโโ", | |
successGlobal: | |
"โโโโโโโโโโโโโโโโโโโ\n" | |
+ "โ ๐๐ฒ๐ฌ๐ญ๐๐ฆ ๐ฉ๐ซ๐๐๐ข๐ฑ ๐ก๐๐ฌ ๐๐๐๐ง ๐๐ก๐๐ง๐ ๐๐ ๐ญ๐จ: %1\n" | |
+ "โโโโโโโโโโโโโโโโโโโ", | |
successThisThread: | |
"โโโโโโโโโโโโโโโโโโโ\n" | |
+ "โ ๐๐ก๐๐ญ ๐ ๐ซ๐จ๐ฎ๐ฉ ๐ฉ๐ซ๐๐๐ข๐ฑ ๐ก๐๐ฌ ๐๐๐๐ง ๐๐ก๐๐ง๐ ๐๐ ๐ญ๐จ: %1\n" | |
+ "โโโโโโโโโโโโโโโโโโโ", | |
myPrefix: | |
"โโโโโโโโโโโโโโโโโโโ\n" | |
+ "๐ฆ ๐๐๐๐๐ด๐ผ ๐ฟ๐๐ด๐ต๐ธ๐: %1\n" | |
+ "๐ฌ ๐๐พ๐๐ ๐ถ๐๐พ๐๐ฟ ๐ฟ๐๐ด๐ต๐ธ๐: %2\n" | |
+ "โฐ ๐๐ด๐๐ ๐ด๐ ๐๐ธ๐ผ๐ด: %3\n" | |
+ "โโโโโโโโโโโโโโโโโโโ\n" | |
} | |
}, | |
onStart: async function ({ message, role, args, commandName, event, threadsData, getLang }) { | |
if (!args[0]) return message.SyntaxError(); | |
if (args[0] === "reset") { | |
await threadsData.set(event.threadID, null, "data.prefix"); | |
return message.reply(getLang("reset", global.GoatBot.config.prefix)); | |
} | |
const newPrefix = args[0]; | |
const formSet = { | |
commandName, | |
author: event.senderID, | |
newPrefix, | |
setGlobal: args[1] === "-g" | |
}; | |
if (formSet.setGlobal && role < 2) { | |
return message.reply(getLang("onlyAdmin")); | |
} | |
const confirmMessage = formSet.setGlobal ? getLang("confirmGlobal") : getLang("confirmThisThread"); | |
return message.reply(confirmMessage, (err, info) => { | |
formSet.messageID = info.messageID; | |
global.GoatBot.onReaction.set(info.messageID, formSet); | |
}); | |
}, | |
onReaction: async function ({ message, threadsData, event, Reaction, getLang }) { | |
const { author, newPrefix, setGlobal } = Reaction; | |
if (event.userID !== author) return; | |
if (setGlobal) { | |
global.GoatBot.config.prefix = newPrefix; | |
fs.writeFileSync(global.client.dirConfig, JSON.stringify(global.GoatBot.config, null, 2)); | |
return message.reply(getLang("successGlobal", newPrefix)); | |
} | |
await threadsData.set(event.threadID, newPrefix, "data.prefix"); | |
return message.reply(getLang("successThisThread", newPrefix)); | |
}, | |
onChat: async function ({ event, message, getLang }) { | |
if (event.body && event.body.toLowerCase() === "prefix") { | |
const serverTime = new Date().toLocaleString("en-US", { timeZone: "Asia/Dhaka" }); | |
return message.reply(getLang("myPrefix", global.GoatBot.config.prefix, utils.getPrefix(event.threadID), serverTime)); | |
} | |
} | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment