Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const prefix = "cu!";
- const premiumKey = "PREMIUMKEYCU69420"; // Replace with your actual premium key
- const apiKey = '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'; // Replace with your actual OpenAI API key
- const apiUrl = 'https://api.openai.com/v1/engines/davinci-codex/completions'; // Endpoint for ChatGPT API
- let isPremium = false;
- const botname = "CustomizeBOT (" + prefix + "help)";
- const version = "1.0 Release!"
- var help = "__CustomizeBOT Commands__\ncu!help, cu!say {TEXT}, cu!joke, cu!triggered, cu!fact, cu!botinfo, cu!roominfo, cu!image {IMAGE}, cu!video {VIDEO}, cu!color /COLOR/, cu!weather {LOCATION}, cu!name, cu!resetcolor, cu!resetname, cu!snake, cu!youtube {YOUTUBELINK}, cu!ship {USER1} and {USER2}, cu!help2";
- var help2 = "__CustomizeBOT Commands__\cu!roast {USER}, cu!linux, cu!incredibleroll, cu!google {SEARCH}, cu!hole {USER}, cu!tts, cu!paypremium (ONLY 10$ FOR KEY!)";
- var botinfo = "CustomizeBOT Version " + version + ". Find CustomizeBOT at: https://pastebin.com/SCkeZRw8";
- function sendMsg(msg) {
- setTimeout(() => {
- if (!isPremium) {
- const advertisement = getRandomAdvertisement();
- socket.emit("talk", { text: `${msg}\n${advertisement}` });
- } else {
- socket.emit("talk", { text: msg });
- }
- }, 1100);
- }
- const advertisements = [
- "Check out our sponsor's latest products at https://www.amazon.com!",
- "Looking for a great server host? Check Out InMotion Hosting!",
- "Need custom Discord bots? go to https://botghost.com/",
- "Looking for reliable hosting? Check out A2 Hosting for top-notch server solutions!",
- "Enhance your gaming experience with RTX's high-performance accessories. Visit https://www.nvidia.com/en-us/geforce/rtx/ now!",
- "Protect your online privacy with NordVPN! Get 70% off for a limited time. Visit nordvpn.com",
- "Check out nintendo's hit game named Mario Farty! At GameStop!",
- "Immerse yourself in the enchanting world of Touhou Project! Discover magical adventures and captivating characters. Download it now on steam!",
- "Are You Hungry? Go Eat At Mcdonald's! I'm Loving It! https://www.mcdonalds.com/us/en-us.html",
- "This is an advertisement for the greatest bonziworld server ever! It is https://nonogamer9world.noanladjal13.repl.co/ ! Join now!",
- "Are you tired Of Drinking the same beer? Don't worry! Introducing Suntory Beer, Where you can hangout with the coolest penguins in the world! Buy Now At https://www.suntory.com/business/beer/",
- "Call Empire To Fix Your Home Today! (800)-588-2300 Empire! Today! https://www.empiretoday.com/",
- "Grubhub, Download our app and enjoy dancing with our food!",
- "Tired with ads! well i don't care! buy our stuffs at https://www.ebay.com !",
- "Introducing, The Iphone 15 Pro Max. Apple",
- "Make sure to support seamus! at https://bonziworld.co!",
- "Play the new hit game named (Chicken Gun Rooster Rudy)! Download it here! https://chickens-gun.en.uptodown.com/android",
- "Test The Incredible Roll Command! With cu!incredibleroll, So You Can Experience Mr Incredible's uncanniests to the fullest!",
- "Are you tired of ADS? Well, Make Sure To Get CustomizeBOT Premium! Only 10$ For A Key!",
- ];
- const incrediblerollPics = [
- "https://media.discordapp.net/attachments/1107412342960033832/1114622683460685854/dfa4skp-4ef45bab-b574-4b4d-aac2-12cf5b53b6c6.png?width=634&height=630",
- "https://media.discordapp.net/attachments/1114637956079173722/1114638247361003541/mr-incredible-becoming-uncanny-phase-1.png?width=722&height=630",
- "https://media.discordapp.net/attachments/1114637956079173722/1114638247642026025/latest.png",
- "https://media.discordapp.net/attachments/1114637956079173722/1114638247973355570/latest.png",
- "https://media.discordapp.net/attachments/1114637956079173722/1114638248258584627/images.png",
- "https://media.discordapp.net/attachments/1114637956079173722/1114638248501858444/images.png",
- "https://media.discordapp.net/attachments/1114637956079173722/1114638248824799332/latest.png",
- "https://media.discordapp.net/attachments/1114637956079173722/1114638486935449782/latest.png",
- "https://media.discordapp.net/attachments/1114637956079173722/1114638487237443584/latest.png",
- "https://media.discordapp.net/attachments/1114637956079173722/1114638487526854737/latest.png",
- "https://media.discordapp.net/attachments/1114637956079173722/1114638487849807872/350.png",
- "https://i1.sndcdn.com/artworks-JeZQh6Hbil2Er51B-U9rx3A-t500x500.jpg",
- "https://i1.sndcdn.com/avatars-RNXmlKLL2AHsRPaz-8LVOoA-t500x500.jpg",
- "https://encrypted-tbn1.gstatic.com/images?q=tbn:ANd9GcR8FcyNrd8y5BmEwp9xYLRjvYxDlheS4DjwgmLZIEvBO2yHIvCv",
- "https://pbs.twimg.com/media/FTHtsuDVUAIjUnO.jpg",
- "https://i.ytimg.com/vi/Zne8JgObXBc/maxresdefault.jpg",
- "https://i.ytimg.com/vi/BFFIS5r7Aj0/maxresdefault.jpg?sqp=-oaymwEmCIAKENAF8quKqQMa8AEB-AH-CYAC0AWKAgwIABABGH8gFSgTMA8=&rs=AOn4CLB0OOFdzym2aFPtk2jqd4beTm8baA",
- "https://i.ytimg.com/vi/TNpQGA762UU/mqdefault.jpg",
- "https://media.discordapp.net/attachments/1114860678000431254/1114864540321062952/latest.png?width=635&height=630",
- "https://media.discordapp.net/attachments/1114860678000431254/1114864540614660166/latest.png?width=635&height=630",
- "https://media.discordapp.net/attachments/1114860678000431254/1114864540899881030/latest.png?width=635&height=630",
- "https://media.discordapp.net/attachments/1114860678000431254/1114864541155725382/latest.png?width=635&height=630",
- "https://media.discordapp.net/attachments/1114860678000431254/1114864541617106985/latest.png?width=635&height=630",
- "https://media.discordapp.net/attachments/1114860678000431254/1114864541961035866/latest.png?width=646&height=630",
- "https://media.discordapp.net/attachments/1114860678000431254/1114864542409822298/latest.png?width=759&height=630",
- "https://media.discordapp.net/attachments/1114860678000431254/1127302563356741765/1000.png?width=630&height=630",
- "https://media.discordapp.net/attachments/1114860678000431254/1127302563713269851/1000.png?width=630&height=630",
- "https://media.discordapp.net/attachments/1114860678000431254/1127302564011069530/latest.png?width=747&height=630",
- "https://media.discordapp.net/attachments/1114860678000431254/1127302564430487613/1000.png?width=630&height=630",
- "https://media.discordapp.net/attachments/1114860678000431254/1127302564896067635/1000.png",
- "https://media.discordapp.net/attachments/1114860678000431254/1127302565260959744/latest.png",
- "https://media.discordapp.net/attachments/1114860678000431254/1127302701642956860/latest.png",
- "https://media.discordapp.net/attachments/1114860678000431254/1127302701974294699/1000.png?width=630&height=630",
- "https://media.discordapp.net/attachments/1114860678000431254/1127302702569902180/latest.png?width=761&height=630",
- "https://media.discordapp.net/attachments/1114860678000431254/1127302702288879797/1000.png?width=630&height=630",
- ];
- function getRandomPic(picsArray) {
- const randomIndex = Math.floor(Math.random() * picsArray.length);
- return picsArray[randomIndex];
- }
- function getRandomAdvertisement() {
- return advertisements[Math.floor(Math.random() * advertisements.length)];
- }
- function sendMsg(msg) {
- const withAdvertisement = Math.random() < 0.2; // 20% chance of including an advertisement
- setTimeout(() => {
- const messageToSend = withAdvertisement ? `${msg}\n${getRandomAdvertisement()}` : msg;
- socket.emit("talk", { text: messageToSend });
- }, 1100);
- }
- setTimeout(() => {socket.emit("command",{list:["name",botname]})},1000);
- setTimeout(() => {socket.emit("command",{list:["name",botname]})},2100);
- setTimeout(() => {socket.emit("command",{list:["color","https://cdn.discordapp.com/attachments/731430123571642390/1209592776883314760/i-tools.png?ex=65f9f10f&is=65e77c0f&hm=0532f4036672e74f2a3e0191486194518bcd1fcc302e3f98af44d25089ee3397&"]})},3200);
- setTimeout(() => {
- sendMsg(`CustomizeBOT is online. Type ${prefix}help to see commands. AD:\n${getRandomAdvertisement()}`);
- setInterval(() => {
- sendMsg(`CustomizeBOT is online. Type ${prefix}help to see commands. AD:\n${getRandomAdvertisement()}`);
- }, 60000);
- }, 4300);
- // Clear the previous ad and replace it with a new ad
- function replaceAd() {
- clearInterval(adInterval);
- sendMsg(`CustomizeBOT is online. Type ${prefix}help to see commands.\n${getRandomAdvertisement()}`);
- adInterval = setInterval(() => {
- sendMsg(`CustomizeBOT is online. Type ${prefix}help to see commands.\n${getRandomAdvertisement()}`);
- }, 60000);
- }
- // Example: Replace ad after 5 seconds
- setTimeout(replaceAd, 5000);
- socket.on("talk", (message) => {
- if(message.text == prefix + "roominfo"){
- sendMsg("Amount of users in the room: " + window.usersAmt);
- }
- if(message.text == prefix + "help"){
- sendMsg(help);
- }
- if(message.text == prefix + "help2"){
- sendMsg(help2);
- }
- if(message.text == prefix + "botinfo"){
- sendMsg(botinfo);
- }
- if(message.text == prefix + "incredibleroll"){
- const randomPic = getRandomPic(incrediblerollPics);
- setTimeout(() => {socket.emit("command", { list: ["image", randomPic]});}, 1100);
- }
- if(message.text.startsWith(prefix + "say")){
- sendMsg(message.text.substring(prefix.length + 3));
- }
- if(message.text.startsWith(prefix + "image")){
- let imgUrl = message.text.substring(prefix.length + 6);
- setTimeout(() => {socket.emit("command",{list:["image",imgUrl]});},1100);
- }
- if(message.text.startsWith(prefix + "tts")){
- let tts = message.text.substring(prefix.length + 3);
- setTimeout(() => {audio = new Audio('https://tts.cyzon.us/tts?text=' + tts), audio.play()},5000);
- }
- if(message.text.startsWith(prefix + "video")){
- let imgUrl = message.text.substring(prefix.length + 6);
- setTimeout(() => {socket.emit("command",{list:["video",imgUrl]});},1100);
- }
- if(message.text.startsWith(prefix + "color")){
- let imgUrl = message.text.substring(prefix.length + 6);
- setTimeout(() => {socket.emit("command",{list:["color",imgUrl]});},1100);
- }
- if(message.text.startsWith(prefix + "youtube")){
- let imgUrl = message.text.substring(prefix.length + 8);
- setTimeout(() => {socket.emit("command",{list:["youtube",imgUrl]});},1100);
- }
- if(message.text == prefix + "joke"){
- setTimeout(() => {socket.emit("command",{list:["joke"]});},1100);
- }
- if(message.text == prefix + "triggered"){
- setTimeout(() => {socket.emit("command",{list:["triggered"]});},1100);
- }
- if (message.text.startsWith(prefix + "linux")) {
- setTimeout(() => { socket.emit("command", { list: ["linux"] }); }, 1100);
- }
- if(message.text.startsWith(prefix + "hole")){
- let imgUrl = message.text.substring(prefix.length + 5);
- setTimeout(() => {socket.emit("command",{list:["asshole",imgUrl]});},1100);
- }
- if(message.text.startsWith(prefix + "name")){
- let imgUrl = message.text.substring(prefix.length + 5);
- setTimeout(() => {socket.emit("command",{list:["name",imgUrl]});},1100);
- }
- if(message.text.startsWith(prefix + "resetname")){
- let imgUrl = message.text.substring(prefix.length + 6);
- setTimeout(() => {socket.emit("command",{list:["name","CustomizeBOT (" + prefix + "help)"]});},1100);
- }
- if(message.text == prefix + "fact"){
- setTimeout(() => {socket.emit("command",{list:["fact"]});},1100);
- }
- else if (message.text.startsWith(prefix + "weather")) {
- const location = message.text.substring(prefix.length + 8);
- getWeather(location);
- }
- else if (message.text.startsWith(prefix + "resetcolor")) {
- let imgUrl = message.text.substring(prefix.length + 6);
- setTimeout(() => {socket.emit("command",{list:["color","https://cdn.discordapp.com/attachments/731430123571642390/1209592776883314760/i-tools.png?ex=65f9f10f&is=65e77c0f&hm=0532f4036672e74f2a3e0191486194518bcd1fcc302e3f98af44d25089ee3397&"]});},1100);
- }
- else if (message.text.startsWith(prefix + "snake")) {
- const command = message.text.substring(prefix.length + 6).trim();
- handleSnakeCommand(command);
- }
- else if (message.text.startsWith(prefix + "ship")) {
- const users = message.text.substring(prefix.length + 5).split(" and ");
- if (users.length === 2) {
- const percentage = Math.floor(Math.random() * 101);
- sendMsg(`${users[0]} and ${users[1]} are ${percentage}% in love!`);
- } else {
- sendMsg("Invalid usage. Please provide two users separated by 'and'.");
- }
- }
- else if (message.text.startsWith(prefix + "google")) {
- const searchQuery = message.text.substring(prefix.length + 7);
- googleSearch(searchQuery);
- }
- else if (message.text.startsWith(prefix + "chatgpt")) {
- const question = message.text.substring(prefix.length + 7);
- chatGPTAnswer(question);
- }
- if (message.text.startsWith(prefix + "roast")) {
- const user = message.text.substring(prefix.length + 6);
- if (user) {
- const roasts = [
- `${user}, are you made of copper and tellurium? Because you're Cu-Te.`,
- `${user}, I'd agree with you but then we'd both be wrong.`,
- `${user}, if laughter is the best medicine, your face must be curing the world.`,
- `${user}, if you were a vegetable, you'd be a cute-cumber.`,
- `${user}, I'm not a photographer, but I can definitely picture you without any issues.`,
- `${user}, if laughter is contagious, you're about as infectious as it gets.`,
- `${user}, you're not dumb; you just have a unique way of looking at things.`,
- `${user}, you're so kind-hearted that you make Mr. Rogers look grumpy.`,
- `${user}, if beauty were time, you'd be an eternity.`,
- `${user}, I'm not saying you're slow, but you could probably outrun a sloth.`,
- `${user}, if you were a cat, you'd purr-fect.`,
- `${user}, you're so bright, the sun needs sunglasses when you smile.`,
- `${user}, if you were a cookie, you'd be a smartie.`,
- `${user}, you're not fat; you're just easier to see.`,
- `${user}, if you were any sweeter, you'd give sugar a run for its money.`,
- `${user}, you're like a human mood booster; everyone needs you around.`,
- `${user}, you're so good-looking that mirrors do a double-take.`,
- `${user}, I'm not a genie, but if I were, I'd grant you infinite wishes.`,
- `${user}, if laughter is the best medicine, consider yourself a cure-all.`,
- `${user}, you're so clever, you make Einstein look like a preschooler.`,
- `${user}, if you were a superhero, your power would be making people smile.`,
- `${user}, your charm level is off the charts; I hope you have a license for that.`,
- `${user}, if you were a star, you'd be the one everyone wishes upon.`,
- `${user}, you're not just a friend; you're a friendship upgrade.`,
- `${user}, if life were a game, you'd be the MVP.`,
- ];
- const randomRoast = roasts[Math.floor(Math.random() * roasts.length)];
- sendMsg(randomRoast);
- } else {
- sendMsg("Invalid usage. Please provide a user to roast.");
- }
- }
- if (message.text.startsWith(prefix + "paypremium")) {
- const userKey = message.text.substring(prefix.length + 11).trim();
- if (userKey === premiumKey) {
- isPremium = true;
- sendMsg("Congratulations! You've unlocked premium access. No more ads!");
- } else {
- sendMsg("Invalid premium key. Ads could not be removed.");
- }
- }
- });
- function getWeather(location) {
- const apiKey = "dcc6b2a3fa3d4fe58d9193316232905";
- const apiUrl = `https://api.weatherapi.com/v1/current.json?key=${apiKey}&q=${encodeURIComponent(location)}`;
- fetch(apiUrl)
- .then((response) => response.json())
- .then((data) => {
- if (data.error) {
- sendMsg("Unable to retrieve weather information. Please check the location.");
- } else {
- const weather = data.current;
- const weatherInfo = `Weather in ${data.location.name}, ${data.location.country}:\nCondition: ${weather.condition.text}\nTemperature: ${weather.temp_c}°C\nHumidity: ${weather.humidity}%\nWind Speed: ${weather.wind_kph} km/h\n`;
- sendMsg(weatherInfo);
- }
- })
- .catch((error) => {
- console.error("Error:", error);
- sendMsg("An error occurred while retrieving weather information.");
- });
- }
- function handleSnakeCommand(command) {
- if (command === "play") {
- startSnakeGame();
- } else if (command === "up" || command === "down" || command === "left" || command === "right") {
- updateSnakeDirection(command);
- moveSnake();
- if (checkCollision()) {
- sendMsg("Game Over. You collided with the wall or yourself!");
- return;
- }
- checkFoodEaten();
- sendMsg(renderSnakeGame());
- } else {
- sendMsg("Invalid command. Use `" + prefix + "snake play` to start the game and `" + prefix + "snake up/down/left/right` to control.");
- }
- }
- // New snake game functions...
- let snake = [{ x: 0, y: 0 }]; // Snake's initial position (assuming the top-left corner as [0, 0])
- let food = { x: 5, y: 5 }; // Food's initial position
- let direction = "right"; // Initial direction of the snake
- function startSnakeGame() {
- // Initialize the snake game state
- snake = [{ x: 0, y: 0 }];
- food = { x: 5, y: 5 };
- direction = "right";
- sendMsg(renderSnakeGame());
- }
- function updateSnakeDirection(command) {
- // Update the snake's direction based on the command received
- if (command === "up" && direction !== "down") {
- direction = "up";
- } else if (command === "down" && direction !== "up") {
- direction = "down";
- } else if (command === "left" && direction !== "right") {
- direction = "left";
- } else if (command === "right" && direction !== "left") {
- direction = "right";
- }
- }
- function moveSnake() {
- // Move the snake in the current direction
- const head = { ...snake[0] };
- if (direction === "up") {
- head.y--;
- } else if (direction === "down") {
- head.y++;
- } else if (direction === "left") {
- head.x--;
- } else if (direction === "right") {
- head.x++;
- }
- // Add the new head to the snake
- snake.unshift(head);
- }
- function checkCollision() {
- // Check if the snake collides with the game boundaries or itself
- const head = snake[0];
- if (head.x < 0 || head.x >= 14 || head.y < 0 || head.y >= 6) {
- return true; // Collision with the game boundaries
- }
- for (let i = 1; i < snake.length; i++) {
- if (snake[i].x === head.x && snake[i].y === head.y) {
- return true; // Collision with itself
- }
- }
- return false;
- }
- function checkFoodEaten() {
- // Check if the snake eats the food
- const head = snake[0];
- if (head.x === food.x && head.y === food.y) {
- // Generate new food at a random position
- food = {
- x: Math.floor(Math.random() * 14),
- y: Math.floor(Math.random() * 6)
- };
- // Do not remove the tail, so the snake grows
- } else {
- // Remove the tail to maintain the snake's length
- snake.pop();
- }
- }
- function renderSnakeGame() {
- // Render the game as numbers
- let gameBoard = [];
- for (let y = 0; y < 6; y++) {
- gameBoard.push([]);
- for (let x = 0; x < 14; x++) {
- gameBoard[y].push(0); // Initialize with 0 (empty space)
- }
- }
- // Set snake segments
- for (const segment of snake) {
- const { x, y } = segment;
- gameBoard[y][x] = 1;
- }
- // Set food position
- gameBoard[food.y][food.x] = 2;
- return gameBoard.map(row => row.join(" ")).join("\n");
- }
- function googleSearch(searchQuery) {
- // Replace 'YOUR_API_KEY' with your actual Google Search API key
- const apiKey = 'AIzaSyDQJ7SjasKcPq_bJhCyxuaoWiVydYTGDK0';
- const cx = 'c3619c6476b78442f'; // Replace with your custom search engine ID
- const apiUrl = `https://www.googleapis.com/customsearch/v1?q=${encodeURIComponent(searchQuery)}&key=${apiKey}&cx=${cx}`;
- const xhr = new XMLHttpRequest();
- xhr.open('GET', apiUrl, true);
- xhr.onload = function () {
- if (xhr.status >= 200 && xhr.status < 300) {
- const response = JSON.parse(xhr.responseText);
- if (response.items && response.items.length > 0) {
- // Limit the results to the first two items
- const limitedResults = response.items.slice(0, 2);
- const searchResultsText = limitedResults.map((item, index) => `${index + 1}. ${item.title}\n ${item.link}`).join("\n");
- sendMsg(`Google Search Results for '${searchQuery}':\n${searchResultsText}`);
- } else {
- sendMsg(`No results found for '${searchQuery}'.`);
- }
- } else {
- console.error("Error fetching Google Search API:", xhr.statusText);
- sendMsg("An error occurred while fetching Google Search results. That's Because There Is Too Many Request Or Others!");
- }
- };
- xhr.onerror = function () {
- console.error("Network error occurred while fetching Google Search API.");
- sendMsg("An error occurred while fetching Google Search results. That's Because It Is In Maintenance!");
- };
- xhr.send();
- }
- function chatGPTAnswer(question) {
- const prompt = `Answer the following question: ${question}`;
- const headers = {
- 'Content-Type': 'application/json',
- 'Authorization': `Bearer ${apiKey}`
- };
- const requestBody = {
- prompt,
- max_tokens: 150
- };
- fetch(apiUrl, {
- method: 'POST',
- headers,
- body: JSON.stringify(requestBody)
- })
- .then(response => response.json())
- .then(data => {
- const generatedAnswer = data.choices[0].text.trim();
- if (generatedAnswer) {
- sendMsg(`ChatGPT Answer for '${question}':\n${generatedAnswer}`);
- } else {
- sendMsg(`No answer generated for '${question}'.`);
- }
- })
- .catch(error => {
- console.error('Error fetching ChatGPT API:', error.message);
- sendMsg("An error occurred while fetching ChatGPT answer.");
- });
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement