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.7/main.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","const Discord = require('discord.js')\nconst client = new Discord.Client({\n\tintents: [Object.values(Discord.Intents.FLAGS).reduce((acc, p) => acc | p, 0)]\n})\nconst express = require('express');\nconst server = express();\n\nvar BotToken = \"undefined\"\nvar BotActivity = \"undefined\"\nvar BotActivityType = \"undefined\"\nvar Warn = \"undefined\"\nvar WordsList = [\"fuck\", \"shit\", \"bitch\", \"asshole\", \"motherfucker\"]\nvar Warntype = \"undefined\"\n// Now Using Normal Warn\n// var DMWarn = \"undefined\"\nvar UptimePort = 3000\n\nexports.wordblocker = function (input) {\n  BotToken = input.bot_token\n  console.log(`Token ${BotToken} Is Ready`)\n\t\n  \n  if(input.bot_activity_type == 'PLAYING') {\n    BotActivityType = input.bot_activity_type  \n} else if(input.bot_activity_type == 'LISTENING') {\n    BotActivityType = input.bot_activity_type\n} else if(input.bot_activity_type == 'STREAMING') {\n    BotActivityType = input.bot_activity_type\n} else if(input.bot_activity_type == 'WATCHING') {\n    BotActivityType = input.bot_activity_type\n} else if(input.bot_activity_type == 'undefined') {\n    throw new Error('Activity Type Undefined')\n} else {\n    throw new Error('Invalid Activity Type')\n}\n  BotActivity = input.bot_activity\n\t\n\n  WordsList = input.word_list\n  console.log('WordList Loaded Succesfully')\n\t\n\n  Warn = input.word_warn\n  Warntype = input.word_warn_type\n  console.log('Warn & WarnType Successfully Setted')\n\t\n\t\n  UptimePort = input.uptime_port\n  console.log(`Uptimer Port Setted To ${UptimePort}`)\n}\n\n// This Codes Below Been Disabled Now\n// exports.token = function (token) {\n//   BotToken = token\n//   console.log(`Token ${BotToken} Is Ready`)\n//}\n\n// exports.activity = function (activity, activitytype) {\n//        if(activitytype == 'PLAYING') {\n//     BotActivityType = activitytype  \n// } else if(activitytype == 'LISTENING') {\n//     BotActivityType = activitytype\n// } else if(activitytype == 'STREAMING') {\n//     BotActivityType = activitytype\n// } else if(activitytype == 'WATCHING') {\n//     BotActivityType = activitytype\n// } else if(activitytype == 'undefined') {\n//     throw new Error('Activity Type Undefined')\n// } else {\n//     throw new Error('Invalid Activity Type')\n// }\n//   BotActivity = activity\n// }\n\n// exports.words = function (words) {\n//   WordsList = words\n//   console.log('WordList Loaded Succesfully')\n// }\n\n// exports.warn = function (type, warn) {\n//     Warntype = type\n//     Warn = warn\n//     console.log('Warn & WarnType Successfully Setted')\n// }\n\n// exports.dmwarn = function (message) {\n//     DMWarn = message\n//     console.log(`DMWarn Message Successfully Setted`)\n// }\n// This Been Disabled Cuz Of The Easier Setup\n\nexports.start = function () {\n     if(BotToken == 'undefined') {\n       throw new Error('Bot Token Undefined')\n} else {\n\tclient.login(BotToken)\n  console.log(`Succesfully Logined To The Bot Token`)\n}\n\n    if(BotActivityType == 'undefined') {\n      throw new Error('Activity Type Undefined')\n} else {\n\tclient.on('ready', async () => {\n\t\tclient.user.setActivity(BotActivity, {type: `${BotActivityType}`})\n        console.log('Activity Status Successfully Loaded')\n\t\tconsole.log(`${client.user.tag} Now Ready`)\n\t})\n}\n\n\tclient.on('messageCreate', async (message) => {\nconst containsSmallWords =  WordsList.some(Smallword => message.content.toLowerCase().includes(Smallword))\nconst containsBigWords =  WordsList.some(Bigword => message.content.toUpperCase().includes(Bigword))\t\t\n\nif (Warntype == 1) {\n   if(containsSmallWords){ \n  message.channel.send(Warn)\n\tmessage.delete()\n\tconsole.log(`Successfully Warned ${message.author} And Deleted \"${message.content}\"`)\n   } else if (containsBigWords){ \n  message.channel.send(Warn)\n\tmessage.delete()\n\tconsole.log(`Successfully Warned ${message.author} And Deleted \"${message.content}\"`)\n   }\n} else if (Warntype == 2) {\n   if(containsSmallWords){ \n  message.reply(Warn)\n\tconsole.log(`Successfully Replied To ${message.author}, Word Used:\"${message.content}\"`)\n   } else if (containsBigWords){ \n  message.reply(Warn)\n  console.log(`Successfully Replied To ${message.author}, Word Used:\"${message.content}\"`)\n   }\n} else if (Warntype == 3) {\n   if(containsSmallWords){ \n\tmessage.delete()\n  console.log(`Successfully Deleted \"${message.content}\", Author:\"${message.author}\"`)\n   } else if (containsBigWords){ \n\tmessage.delete()\n  console.log(`Successfully Deleted \"${message.content}\", Author:\"${message.author}\"`)\n   }\n} else if (Warntype == 4) {\n   if(containsSmallWords){ \n\tmessage.author.send(Warn)\n  console.log(`Successfully DM To \"${message.author}\", Word:\"${message.content}\"`)\n   } else if (containsBigWords){\n  message.author.send(Warn)\nconsole.log(`Successfully DM To \"${message.author}\", Word:\"${message.content}\"`)\n   }\n} else if (Warntype == 5) {\n   if(containsSmallWords){ \n\tmessage.author.send(Warn)\n\tmessage.delete()\n  console.log(`Successfully DMed To \"${message.author}\", And Deleted Word:\"${message.content}\"`)\n   } else if (containsBigWords){\n  message.author.send(Warn)\n  message.delete()\n  console.log(`Successfully DMed To \"${message.author}\", And Deleted Word:\"${message.content}\"`)\n   }\n} else if (Warntype == 'undefined') {\n   throw new Error('WarnType Undefined')\n} else if (Warntype != 1) {\n   throw new Error('Invalid Warn Type')\n} else if (Warntype != 2) {\n   throw new Error('Invalid Warn Type')\n} else if (Warntype != 3) {\n   throw new Error('Invalid Warn Type')\n} else if (Warntype != 4) {\n   throw new Error('Invalid Warn Type')\n} else if (Warntype != 5) {\n   throw new Error('Invalid Warn Type')\n}\n\t})\n}\n\nexports.uptime = function () {\n    server.all('/', (req, res)=>{\n    res.send(`Uptimer Now Ready! Bot Username ${client.user.tag}`)\n})\n    server.listen(UptimePort, ()=>{console.log(`Uptime Server Now Ready. Listening To http://localhost:${UptimePort}`)});\n}"]}