2023-10-02 08:48:06 +00:00
|
|
|
// @ts-check
|
|
|
|
|
|
|
|
const config = require("./config")
|
2024-08-26 14:17:10 +00:00
|
|
|
const token = config.discordToken
|
|
|
|
const id = Buffer.from(token.split(".")[0], "base64").toString()
|
2023-10-02 08:48:06 +00:00
|
|
|
|
|
|
|
function addbot() {
|
|
|
|
return `Open this link to add the bot to a Discord server:\nhttps://discord.com/oauth2/authorize?client_id=${id}&scope=bot&permissions=1610883072 `
|
|
|
|
}
|
|
|
|
|
|
|
|
if (process.argv.find(a => a.endsWith("addbot") || a.endsWith("addbot.js"))) {
|
|
|
|
console.log(addbot())
|
|
|
|
}
|
|
|
|
|
2024-08-26 14:17:10 +00:00
|
|
|
module.exports.id = id
|
2023-10-02 08:48:06 +00:00
|
|
|
module.exports.addbot = addbot
|