diff --git a/Commands/AFK.js b/Commands/AFK.js deleted file mode 100644 index f0d1d25..0000000 --- a/Commands/AFK.js +++ /dev/null @@ -1,53 +0,0 @@ -const fs = require('fs'); -const path = require('path'); -const { WebhookClient } = require('discord.js-selfbot-v13'); - -const Config = require("../Config/Config.json"); -const Settings = require("../Config/Settings.json"); - -module.exports = { - name: 'afk', - description: 'Toggle AFK mode', - execute(message, args, client) { - const configPath = path.join(__dirname, '..', 'Config', 'Config.json'); - - // Toggle AFK status - Config.Commands.AFK.afk = !Config.Commands.AFK.afk; - - // Save updated config - fs.writeFileSync(configPath, JSON.stringify(Config, null, 2)); - message.reply(`AFK mode has been ${Config.Commands.AFK.afk ? 'enabled' : 'disabled'}.`); - }, - init(client) { - client.on('messageCreate', handle); - } -}; - -async function handle(message) { - // Reload config on each message to get latest settings - const Config = JSON.parse(fs.readFileSync(path.join(__dirname, '..', 'Config', 'Config.json'))); - - if (!Config.Commands.AFK.afk) return; - - // Check if mention or DM - if (message.channel.type === 'DM' || message.mentions.users.has(message.client.user.id)) { - if (message.author.id === message.client.user.id) return; // Don't reply to self - if (message.content.includes('@everyone') || message.content.includes('@here')) return; // Exclude everyone and here - - // Get random AFK message from config - const randomKeyword = Config.Commands.AFK.afkKeywords[ - Math.floor(Math.random() * Config.Commands.AFK.afkKeywords.length) - ]; - - await message.reply(`${randomKeyword}`); - - try { - const webhookClient = new WebhookClient({ url: Settings.webhook }); - await webhookClient.send({ - content: `@everyone AFK Logs (Type: ${message.channel.type === 'DM' ? 'DM' : message.channel.name})\n\`\`\`\nUser: ${message.author.tag}\nMessage: ${message.content}\nResponse: ${randomKeyword}\`\`\`` - }); - } catch (error) { - //Logger.expection('Failed to send webhook:', error); - } - } -} \ No newline at end of file diff --git a/Commands/Auth.js b/Commands/Auth.js deleted file mode 100644 index 694ec18..0000000 --- a/Commands/Auth.js +++ /dev/null @@ -1,29 +0,0 @@ -const fs = require('fs'); -const path = require('path'); - -const configPath = path.join(__dirname, '../Config/Config.json'); -let config = require(configPath); - -module.exports = { - name: 'auth', - description: 'Add a user to BotAdmins', - execute(message, args) { - if (message.author.id !== config.GeneralSettings.OwnerID) { - return message.reply('You do not have permission to use this command.'); - } - - const userId = args[0]?.replace(/[<@!>]/g, ''); - if (!userId) return message.reply('Please specify a valid user ID or mention.'); - - if (config.BotSettings.BotAdmins.includes(userId)) { - return message.reply('This user is already in BotAdmins.'); - } - - config.BotSettings.BotAdmins.push(userId); - - // Save the updated config to file - fs.writeFileSync(configPath, JSON.stringify(config, null, 4)); - - return message.reply(`Successfully added <@${userId}> to BotAdmins.`); - }, -}; diff --git a/Commands/Avatar.js b/Commands/Avatar.js deleted file mode 100644 index 16e6d71..0000000 --- a/Commands/Avatar.js +++ /dev/null @@ -1,8 +0,0 @@ -module.exports = { - name: 'avatar', - description: 'Get user\'s avatar', - execute(message, args, client) { - const user = message.mentions.users.first() || message.author; - message.reply(user.displayAvatarURL({ dynamic: true, size: 4096 })); - }, -}; \ No newline at end of file diff --git a/Commands/Ban.js b/Commands/Ban.js deleted file mode 100644 index d7f3d42..0000000 --- a/Commands/Ban.js +++ /dev/null @@ -1,59 +0,0 @@ -const { WebEmbed } = require('discord.js-selfbot-v13'); -const Logger = require('../Module/Logger'); - -module.exports = { - name: 'ban', - description: 'Ban a user from the server', - async execute(message, args, client) { - try { - if (!message.guild) { - return message.reply('This command can only be used in a server'); - } - - const member = message.guild.members.cache.get(client.user.id); - if (!member.permissions.has('BAN_MEMBERS')) { - return message.reply('Bot does not have permission to ban members'); - } - - let targetUser; - if (message.mentions.members.first()) { - targetUser = message.mentions.members.first(); - } else if (args[0]) { - try { - targetUser = await message.guild.members.fetch(args[0]); - } catch { - await message.guild.members.ban(args[0]); - const successEmbed = new WebEmbed() - .setColor('GREEN') - .setTitle('✅ User Banned') - .setDescription(`Successfully banned user with ID: ${args[0]}`); - - return message.channel.send({ content: `${WebEmbed.hiddenEmbed}${successEmbed}` }); - } - } - - if (!targetUser && !args[0]) { - return message.reply('Please mention a user or provide a user ID to ban\nExample: .ban @user or .ban [userID]'); - } - - if (targetUser && !targetUser.bannable) { - return message.reply('Unable to ban this user. They may have higher permissions'); - } - - if (targetUser) { - await targetUser.ban(); - const successEmbed = new WebEmbed() - .setColor('GREEN') - .setTitle('✅ User Banned') - .setDescription(`Successfully banned ${targetUser.user.username}`); - - message.channel.send({ content: `${WebEmbed.hiddenEmbed}${successEmbed}` }); - } - - } catch (error) { - Logger.expection(`Error executing ban command: ${error.message}`); - Logger.expection(`Full error details: ${error.stack}`); - message.reply('An error occurred while trying to ban the user'); - } - } -}; \ No newline at end of file diff --git a/Commands/Blowjob.js b/Commands/Blowjob.js deleted file mode 100644 index c9b948b..0000000 --- a/Commands/Blowjob.js +++ /dev/null @@ -1,34 +0,0 @@ -const axios = require('axios'); -const { MessageAttachment } = require('discord.js-selfbot-v13'); -const Config = require('../Config/Config.json'); - -module.exports = { - name: 'blowjob', - description: 'Send a blowjob NSFW image', - async execute(message, args, client) { - try { - if (!message.channel.nsfw && Config.GeneralSettings.EnableNSFW == false) { - return message.reply('This command can only be used in NSFW channels!'); - } - message.delete(); - - const response = await axios.get('https://api.waifu.pics/nsfw/blowjob'); - const imageUrl = response.data.url; - - const imageResponse = await axios.get(imageUrl, { responseType: 'arraybuffer' }); - const buffer = Buffer.from(imageResponse.data); - - const attachment = new MessageAttachment(buffer, 'image.gif'); - await message.channel.send({ files: [attachment] }); - - const user = message.mentions.users.first(); - if (user) { - await message.channel.send(`${user} It might be you who is getting the blowjob...`); - } - - } catch (error) { - console.error('Error sending image:', error); - await message.channel.send('Could not send image...'); - } - }, -}; diff --git a/Commands/Booting.js b/Commands/Booting.js deleted file mode 100644 index 09d4436..0000000 --- a/Commands/Booting.js +++ /dev/null @@ -1,53 +0,0 @@ -const { WebEmbed } = require('discord.js-selfbot-v13'); -const fs = require('fs'); -const path = require('path'); -const Logger = require('../Module/Logger'); -const Config = require('../Config/Config.json'); - -module.exports = { - name: 'boot', - description: 'Set boot message channel and toggle boot status', - async execute(message, args, client) { - try { - if (!args.length) { - return message.reply('Usage: .boot on [channelId] or .boot off'); - } - - const configPath = path.join(__dirname, '..', 'Config', 'Config.json'); - const option = args[0].toLowerCase(); - - if (option !== 'on' && option !== 'off') { - return message.reply('Please specify either "on" or "off"'); - } - - if (option === 'on') { - const channelId = args[1] || Config.Commands.Booting.ChannelID; - - if (!channelId) { - return message.reply('Please provide a channel ID: .boot on [channelId]'); - } - - const channel = await client.channels.fetch(channelId).catch(() => null); - if (!channel) { - return message.reply('Invalid channel ID. Please try again.'); - } - - // Update Config object - Config.Commands.Booting.ChannelID = channelId; - Config.Commands.Booting.Enabled = true; - message.reply(`Boot message enabled in channel: ${channel.name}`); - } else { - // Update Config object - Config.Commands.Booting.Enabled = false; - message.reply('Boot message disabled!'); - } - - // Save updated config - fs.writeFileSync(configPath, JSON.stringify(Config, null, 2)); - - } catch (error) { - Logger.expection(`Error in boot command: ${error.message}`); - message.reply('An error occurred while setting up boot message.'); - } - }, -}; \ No newline at end of file diff --git a/Commands/Calculate.js b/Commands/Calculate.js deleted file mode 100644 index dd37227..0000000 --- a/Commands/Calculate.js +++ /dev/null @@ -1,53 +0,0 @@ -const { WebEmbed } = require('discord.js-selfbot-v13'); - -module.exports = { - name: 'cal', - description: 'Perform basic mathematical calculations', - execute(message, args, client) { - if (args.length < 3) { - return message.reply('Usage: .cal [number] [operator] [number]'); - } - - const num1 = Number(args[0]); - const operator = args[1]; - const num2 = Number(args[2]); - - if (isNaN(num1) || isNaN(num2)) { - return message.reply('Please provide valid numbers'); - } - - let result; - let operation; - - switch (operator) { - case '+': - result = num1 + num2; - operation = 'Addition'; - break; - case '-': - result = num1 - num2; - operation = 'Subtraction'; - break; - case '*': - result = num1 * num2; - operation = 'Multiplication'; - break; - case '/': - if (num2 === 0) { - return message.reply('Cannot divide by zero!'); - } - result = num1 / num2; - operation = 'Division'; - break; - default: - return message.reply('Please use these operators: +, -, *, /'); - } - - const embed = new WebEmbed() - .setColor('#0099ff') - .setTitle('Calculation Result') - .setDescription(`Operation: ${operation}\nExpression: ${num1} ${operator} ${num2}\nResult: ${result}`); - - message.channel.send({ content: `${WebEmbed.hiddenEmbed}${embed}` }); - }, -}; \ No newline at end of file diff --git a/Commands/Clean.js b/Commands/Clean.js deleted file mode 100644 index 99bc4ce..0000000 --- a/Commands/Clean.js +++ /dev/null @@ -1,72 +0,0 @@ -const { WebEmbed } = require('discord.js-selfbot-v13'); -const notifier = require('node-notifier'); -const Logger = require('../Module/Logger'); - -module.exports = { - name: 'clean', - description: 'Clean a specified number of messages', - async execute(message, args, client) { - if (!message.guild) { - return message.reply('This command can only be used in a server.'); - } - - if (args.length !== 1 || isNaN(args[0])) { - return message.reply('Please provide a valid number of messages to delete. Example: .clean 10'); - } - - const amount = parseInt(args[0]); - if (amount <= 0 || amount > 101) { - return message.reply('Please provide a number between 1 and 100.'); - } - - const confirmEmbed = new WebEmbed() - .setColor('#FF0000') - .setTitle('Confirm Message Deletion') - .setDescription(`Are you sure you want to delete ${amount} messages?\nThis action cannot be undone.\nReply with "yes" to confirm or "no" to cancel.`); - - await message.channel.send({ content: `${WebEmbed.hiddenEmbed}${confirmEmbed}` }); - - try { - const collected = await message.channel.awaitMessages({ - filter: m => m.author.id === message.author.id, - max: 1, - time: 30000, - errors: ['time'] - }); - - if (collected.first().content.toLowerCase() === 'yes') { - message.channel.send(`Deleting ${amount} messages...`); - - let deletedCount = 0; - const messages = await message.channel.messages.fetch({ limit: amount + 1 }); - - for (const msg of messages.values()) { - if (msg.deletable) { - await msg.delete(); - deletedCount++; - await new Promise(resolve => setTimeout(resolve, 1000)); - } - } - - const resultEmbed = new WebEmbed() - .setColor('#00FF00') - .setTitle('Deletion Complete') - .setDescription(`Successfully deleted ${deletedCount} messages.\nSome messages may not have been deleted due to permissions or age restrictions.`); - - notifier.notify({ - title: 'Kukuri Client', - message: `Successfully deleted ${deletedCount} messages.`, - sound: true, - wait: false - }); - - await message.channel.send({ content: `${WebEmbed.hiddenEmbed}${resultEmbed}` }); - } else { - message.channel.send('Operation cancelled.'); - } - } catch (error) { - Logger.expection('Error in delete command:', error); - message.channel.send('An error occurred while trying to delete messages.'); - } - }, -}; \ No newline at end of file diff --git a/Commands/DelAuth.js b/Commands/DelAuth.js deleted file mode 100644 index ff5283d..0000000 --- a/Commands/DelAuth.js +++ /dev/null @@ -1,30 +0,0 @@ -const fs = require('fs'); -const path = require('path'); - -const configPath = path.join(__dirname, '../Config/Config.json'); -let config = require(configPath); - -module.exports = { - name: 'delauth', - description: 'Remove a user from BotAdmins', - execute(message, args) { - if (message.author.id !== config.GeneralSettings.OwnerID) { - return message.reply('You do not have permission to use this command.'); - } - - const userId = args[0]?.replace(/[<@!>]/g, ''); - if (!userId) return message.reply('Please specify a valid user ID or mention.'); - - const index = config.BotSettings.BotAdmins.indexOf(userId); - if (index === -1) { - return message.reply('This user is not in BotAdmins.'); - } - - config.BotSettings.BotAdmins.splice(index, 1); - - // Save the updated config to file - fs.writeFileSync(configPath, JSON.stringify(config, null, 4)); - - return message.reply(`Successfully removed <@${userId}> from BotAdmins.`); - }, -}; diff --git a/Commands/FakeYoutube.js b/Commands/FakeYoutube.js deleted file mode 100644 index 71f7304..0000000 --- a/Commands/FakeYoutube.js +++ /dev/null @@ -1,21 +0,0 @@ -const { WebEmbed } = require('discord.js-selfbot-v13'); - -module.exports = { - name: 'fakeyt', - description: 'Faking the video', - execute(message, args, client) { - message.delete(); - const embed = new WebEmbed() - .setAuthor({ name: 'simpleduldde1723', url: 'https://github.com/Mikasuru/KukuriClient' }) - .setColor('ea3323') - .setProvider({ name: 'YouTube', url: 'https://github.com/Mikasuru/KukuriClient' }) - .setTitle('WATCH BEFORE DELETE') - .setURL('https://github.com/Mikasuru/KukuriClient') - .setImage('https://files.yande.re/sample/47deaeeac0800ee808b2b760aba30973/yande.re%201200651%20sample%20cameltoe%20detexted%20dress_shirt%20leone_%28kamina0205%29%20no_bra%20open_shirt%20pantsu%20thong.jpg') - .setRedirect('https://www.youtube.com/watch?v=iBP8HambzpY') - .setVideo('http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4'); - message.channel.send({ - content: `AYO WATCH THIS LOL ${WebEmbed.hiddenEmbed}${embed}`, - }); - }, -}; \ No newline at end of file diff --git a/Commands/Help.js b/Commands/Help.js deleted file mode 100644 index 9a0cc46..0000000 --- a/Commands/Help.js +++ /dev/null @@ -1,19 +0,0 @@ -const Settings = require("../Config/Settings.json"); -const Config = require("../Config/Config.json"); - -module.exports = { - name: 'help', - description: 'Show this help message', - async execute(message, args, client) { - const prefix = Config.BotSettings.Prefix; - const commandList = []; - message.delete() - // Collect commands - client.commands.forEach((command) => { - commandList.push(`${prefix}${command.name} - ${command.description}`); - }); - // Send Text if no permission to attach files - const textResponse = `Kukuri Client Commands:\n\`\`\`\n${commandList.join('\n')}\n\`\`\`\nUse the commands wisely!`; - message.channel.send(textResponse); - }, -}; diff --git a/Commands/Infomation.js b/Commands/Infomation.js deleted file mode 100644 index 17aea8d..0000000 --- a/Commands/Infomation.js +++ /dev/null @@ -1,72 +0,0 @@ -const process = require('process'); -const { version } = require('../package.json'); -const si = require('systeminformation'); -const Utils = require('../Module/Utils') - -// Cache system information -let systemInfoCache = null; -let lastCacheTime = 0; -const cacheDuration = 5000; // Cache for 5 seconds - -module.exports = { - name: 'info', - description: 'Display system and bot information', - async execute(message, args, client) { - - const currentTime = Date.now(); - - if (systemInfoCache && currentTime - lastCacheTime < cacheDuration) { - await message.reply(formatInfoText(systemInfoCache, client)); - return; - } - - const [cpu, mem, graphics, cpuUsage] = await Promise.all([ - si.cpu(), - si.mem(), - si.graphics(), - si.currentLoad() - ]); - - const gpuInfo = graphics.controllers.map(gpu => ({ - model: gpu.model || 'N/A', - usage: gpu.memoryUsed ? Math.round((gpu.memoryUsed / gpu.memoryTotal) * 100) : 'N/A' - })); - - systemInfoCache = { - systemInfo: { - cpu: `${cpu.manufacturer} ${cpu.brand}`, - ram: `${Math.round(mem.total / (1024 * 1024 * 1024))}GB`, - gpus: gpuInfo, - cpuUsage: `${Math.round(cpuUsage.currentLoad)}%`, - ramUsage: `${Math.round((mem.used / mem.total) * 100)}%`, - }, - nodeVersion: process.version, - bunVersion: process.isBun ? Bun.version : 'Not using Bun', - clientVersion: version - }; - - lastCacheTime = currentTime; - await message.reply(formatInfoText(systemInfoCache, client)); - }, -}; - -function formatInfoText(info, client) { - const gpuText = info.systemInfo.gpus.map((gpu, index) => - `GPU ${index + 1}: ${gpu.model}\nGPU ${index + 1} Usage: ${gpu.usage}%` - ).join('\n'); - - return [ - '```ml', - `Username: ${client.user.username}`, - `CPU: ${info.systemInfo.cpu}`, - `RAM: ${info.systemInfo.ram}`, - `CPU Usage: ${info.systemInfo.cpuUsage}`, - `RAM Usage: ${info.systemInfo.ramUsage}`, - gpuText, - `NodeJS Version: ${info.nodeVersion}`, - `Bun Version: ${info.bunVersion}`, - `Uptime: ${Utils.formatTime(client.uptime)}`, - `Client Version: ${info.clientVersion}`, - '```' - ].join('\n'); -} \ No newline at end of file diff --git a/Commands/Kick.js b/Commands/Kick.js deleted file mode 100644 index a1604bf..0000000 --- a/Commands/Kick.js +++ /dev/null @@ -1,48 +0,0 @@ -const { WebEmbed } = require('discord.js-selfbot-v13'); -const Logger = require('../Module/Logger'); - -module.exports = { - name: 'kick', - description: 'Kick a user from the server', - async execute(message, args, client) { - try { - if (!message.guild) { - return message.reply('This command can only be used in a server'); - } - - const member = message.guild.members.cache.get(client.user.id); - if (!member.permissions.has('KICK_MEMBERS')) { - return message.reply('Bot does not have permission to kick members'); - } - - let targetUser; - if (message.mentions.members.first()) { - targetUser = message.mentions.members.first(); - } else if (args[0]) { - targetUser = await message.guild.members.fetch(args[0]).catch(() => null); - } - - if (!targetUser) { - return message.reply('Please mention a user or provide a user ID to kick\nExample: .kick @user or .kick [userID]'); - } - - if (!targetUser.kickable) { - return message.reply('Unable to kick this user. They may have higher permissions'); - } - - await targetUser.kick(); - - const successEmbed = new WebEmbed() - .setColor('GREEN') - .setTitle('✅ User Kicked') - .setDescription(`Successfully kicked ${targetUser.user.username}`); - - message.channel.send({ content: `${WebEmbed.hiddenEmbed}${successEmbed}` }); - - } catch (error) { - Logger.expection(`Error executing kick command: ${error.message}`); - Logger.expection(`Full error details: ${error.stack}`); - message.reply('An error occurred while trying to kick the user'); - } - } -}; \ No newline at end of file diff --git a/Commands/MassReact.js b/Commands/MassReact.js deleted file mode 100644 index fb2391b..0000000 --- a/Commands/MassReact.js +++ /dev/null @@ -1,32 +0,0 @@ -module.exports = { - name: 'massreact', - description: 'Add reactions to multiple messages', - async execute(message, args, client) { - if (!args[0]) return message.reply('Please provide an emoji'); - - try { - const filter = m => m.content.toLowerCase() === 'stopreact'; - const collector = message.channel.createMessageCollector({ filter }); - let shouldStop = false; - - collector.on('collect', () => { - shouldStop = true; - collector.stop(); - message.channel.send('Stopped mass react.'); - }); - - await message.delete(); - const messages = await message.channel.messages.fetch({ limit: 20 }); - - for (const msg of messages.values()) { - if (shouldStop) break; - await msg.react(args[0]); - await new Promise(r => setTimeout(r, 500)); - } - - collector.stop(); - } catch (error) { - console.error(error); - } - } -}; \ No newline at end of file diff --git a/Commands/Message.js b/Commands/Message.js deleted file mode 100644 index 2ad69e5..0000000 --- a/Commands/Message.js +++ /dev/null @@ -1,25 +0,0 @@ -const fs = require('fs'); - -module.exports = { - name: 'message', - description: 'Sending a normal message.', - async execute(message, args, client) { - if (!args[0]) { - message.delete(); - const reply = await message.channel.send('Plesae provide a number.\n1: Surveillance Message\n2: Child abuse\n3: Illegal investigation`'); - setTimeout(() => reply.delete(), 5000); - return; - } else if (!args[1]) { - message.delete(); - const reply = await message.channel.send('Please provide a message.'); - setTimeout(() => reply.delete(), 2000); - return; - } - message.delete(); - const content = args.slice(1).join(' '); - if (args[0] === '1') return await message.channel.send(`${content}\n-# This user is under surveillance by the US FBI • [Learn More]()\n-# Do not contact this user, they are the subject of a criminal case under 18 U.S.C § 2332b effective April 24, 2024 • [Learn More]()`); - if (args[0] === '2') return await message.channel.send(`${content}\n-# This user is under investigation by law enforcement authorities for violations related to child exploitation and abuse • [Learn More]()\n-# The user is the subject of an ongoing criminal case under 18 U.S.C § 2251A, concerning the exploitation of minors, effective April 24, 2024 • [Learn More]()`); - if (args[0] === '3') return await message.channel.send(`${content}\n-# This user is under investigation for involvement in the illegal distribution and trafficking of child exploitation materials • [Learn More]()\n-# The user is the subject of a criminal investigation under 18 U.S.C § 2252A, regarding the trafficking of child pornography, effective April 24, 2024 • [Learn More]()`); - - }, -}; \ No newline at end of file diff --git a/Commands/Mute.js b/Commands/Mute.js deleted file mode 100644 index c52b327..0000000 --- a/Commands/Mute.js +++ /dev/null @@ -1,71 +0,0 @@ -const { WebEmbed } = require('discord.js-selfbot-v13'); -const fs = require('fs'); -const path = require('path'); -const Logger = require('../Module/Logger'); - -module.exports = { - name: 'mute', - description: 'Mute a user with specified role', - async execute(message, args, client) { - try { - if (!message.guild) { - return message.reply('This command can only be used in a server'); - } - - const member = message.guild.members.cache.get(client.user.id); - if (!member.permissions.has('MANAGE_ROLES')) { - return message.reply('Bot does not have permission to manage roles'); - } - - if (!message.mentions.members.first()) { - return message.reply('Please mention a user to mute\nExample: .mute @user'); - } - - // Load config - const configPath = path.join(__dirname, '..', 'Config', 'Roles.json'); - let config = {}; - - if (fs.existsSync(configPath)) { - config = JSON.parse(fs.readFileSync(configPath, 'utf-8')); - } else { - config = { muteRoleId: '' }; - fs.writeFileSync(configPath, JSON.stringify(config, null, 2)); - } - - if (!config.muteRoleId) { - const embed = new WebEmbed() - .setColor('RED') - .setTitle('⚠️ Mute Role Required') - .setDescription('Please set up the mute role first\nUse command: .mutesetup [Role ID]'); - - return message.channel.send({ content: `${WebEmbed.hiddenEmbed}${embed}` }); - } - - const targetMember = message.mentions.members.first(); - const muteRole = await message.guild.roles.fetch(config.muteRoleId); - - if (!muteRole) { - return message.reply('Mute role not found. Please check the role ID'); - } - - if (targetMember.roles.cache.has(muteRole.id)) { - return message.reply('This user is already muted'); - } - - // Apply mute - await targetMember.roles.add(muteRole); - - const successEmbed = new WebEmbed() - .setColor('GREEN') - .setTitle('✅ Successfully Muted') - .setDescription(`${targetMember.user.username} has been muted`); - - message.channel.send({ content: `${WebEmbed.hiddenEmbed}${successEmbed}` }); - - } catch (error) { - Logger.expection(`Error executing command mute: ${error.message}`); - Logger.expection(`Command error full details: ${error.stack}`); - message.reply('An error occurred while trying to mute. Please try again'); - } - } -}; \ No newline at end of file diff --git a/Commands/MuteSetup.js b/Commands/MuteSetup.js deleted file mode 100644 index 025b7b3..0000000 --- a/Commands/MuteSetup.js +++ /dev/null @@ -1,53 +0,0 @@ -const { WebEmbed } = require('discord.js-selfbot-v13'); -const fs = require('fs'); -const path = require('path'); -const Logger = require('../Module/Logger'); - -module.exports = { - name: 'mutesetup', - description: 'Setup mute role ID', - async execute(message, args, client) { - try { - if (!message.guild) { - return message.reply('This command can only be used in a server'); - } - - const member = message.guild.members.cache.get(client.user.id); - if (!member.permissions.has('MANAGE_ROLES')) { - return message.reply('Bot does not have permission to manage roles'); - } - - if (!args[0]) { - return message.reply('Please provide a Role ID\nExample: .mutesetup [Role ID]'); - } - - const roleId = args[0]; - const configPath = path.join(__dirname, '..', 'Config', 'Roles.json'); - - const role = await message.guild.roles.fetch(roleId).catch(() => null); - if (!role) { - return message.reply('Invalid Role ID. Please check and try again'); - } - - let config = {}; - if (fs.existsSync(configPath)) { - config = JSON.parse(fs.readFileSync(configPath, 'utf-8')); - } - - config.muteRoleId = roleId; - fs.writeFileSync(configPath, JSON.stringify(config, null, 2)); - - const embed = new WebEmbed() - .setColor('GREEN') - .setTitle('✅ Setup Complete') - .setDescription(`Mute role has been set to ${role.name} (${role.id})`); - - message.channel.send({ content: `${WebEmbed.hiddenEmbed}${embed}` }); - - } catch (error) { - Logger.expection(`Error: ${error.message}`); - Logger.expection(`Full error details: ${error.stack}`); - message.reply('An error occurred during setup. Please try again'); - } - } -}; \ No newline at end of file diff --git a/Commands/Neko.js b/Commands/Neko.js deleted file mode 100644 index bf5dce0..0000000 --- a/Commands/Neko.js +++ /dev/null @@ -1,34 +0,0 @@ -const axios = require('axios'); -const { MessageAttachment } = require('discord.js-selfbot-v13'); -const Config = require('../Config/Config.json'); - -module.exports = { - name: 'neko', - description: 'Send a neko NSFW image', - async execute(message, args, client) { - try { - if (!message.channel.nsfw && Config.GeneralSettings.EnableNSFW == false) { - return message.reply('This command can only be used in NSFW channels!'); - } - message.delete(); - - const response = await axios.get('https://api.waifu.pics/nsfw/neko'); - const imageUrl = response.data.url; - - const imageResponse = await axios.get(imageUrl, { responseType: 'arraybuffer' }); - const buffer = Buffer.from(imageResponse.data); - - const attachment = new MessageAttachment(buffer, 'image.gif'); - await message.channel.send({ files: [attachment] }); - - const user = message.mentions.users.first(); - if (user) { - await message.channel.send(`${user} It might be you`); - } - - } catch (error) { - console.error('Error sending image:', error); - await message.channel.send('Could not send image...'); - } - }, -}; diff --git a/Commands/Ping.js b/Commands/Ping.js deleted file mode 100644 index 2279ecc..0000000 --- a/Commands/Ping.js +++ /dev/null @@ -1,23 +0,0 @@ -const { WebEmbed } = require('discord.js-selfbot-v13'); - -module.exports = { - name: 'ping', - description: 'Check bot\'s performance metrics', - async execute(message, args, client) { - const sent = await message.channel.send('Pinging...'); - const latency = sent.createdTimestamp - message.createdTimestamp; - - const embed = new WebEmbed() - .setTitle('🏓 Ping Statistics') - .setURL('https://github.com/Mikasuru/KukuriClient') - .setDescription(`📡 Latency: ${latency}ms\n🤖 API Latency: ${Math.round(client.ws.ping)}ms`) - .setColor('#00ff00') - .setProvider({ name: '🟢 Bot Status: Online', url: 'https://github.com/Mikasuru/KukuriClient' }) - .setAuthor({ name: 'Kukuri Client', url: 'https://github.com/Mikasuru/KukuriClient' }); - - sent.delete(); - message.channel.send({ - content: `Pong! ${WebEmbed.hiddenEmbed}${embed}`, - }); - }, -}; \ No newline at end of file diff --git a/Commands/PlayMusic.js b/Commands/PlayMusic.js deleted file mode 100644 index 51621b5..0000000 --- a/Commands/PlayMusic.js +++ /dev/null @@ -1,62 +0,0 @@ -const ytdl = require('@distube/ytdl-core'); - -module.exports = { - name: 'play', - description: 'Play music in a voice channel', - async execute(message, args, client) { - // Check for url - const url = args[0]; - if (!url || !ytdl.validateURL(url)) { - return message.reply('Please provide a valid YouTube URL.'); - } - - const vcID = args[1]; - if (!vcID) { - return message.reply('Please provide a valid voice channel ID.'); - } - - try { - - const channel = client.channels.cache.get(vcID); - const connection = await client.voice.joinChannel(channel, { - selfMute: true, - selfDeaf: false, - selfVideo: false, - }); - - const dispatcher = connection.playAudio( - ytdl(args[0], { - quality: 'highestaudio', - }), - ); - dispatcher.on('start', () => { - message.reply(`Now playing: ${url}`); - // pause - /*console.log('paused'); - dispatcher.pause(); - // resume - setTimeout(() => { - console.log('resumed'); - dispatcher.resume(); - }, 5_000);*/ - - // Set volume - dispatcher.setVolume(1.0); - message.reply('Volume set to 100%'); - }); - - dispatcher.on('finish', () => { - message.reply('Playback finished.'); - }); - dispatcher.on('error', console.error); - // Leave voice - setTimeout(() => { - message.reply('Leaving the voice channel.'); - connection.disconnect(); - }, 30_000); - } catch (error) { - console.error('Error joining voice channel or playing audio:', error); - message.reply('An error occurred while trying to play the audio.'); - } - }, -}; diff --git a/Commands/Poll.js b/Commands/Poll.js deleted file mode 100644 index e8af0e3..0000000 --- a/Commands/Poll.js +++ /dev/null @@ -1,90 +0,0 @@ -const { MessageEmbed } = require('discord.js-selfbot-v13'); -const Logger = require('../Module/Logger'); - -module.exports = { - name: 'poll', - description: 'Create a poll with multiple options', - async execute(message, args, client) { - try { - if (!args.length) { - return message.reply('Please provide a question and options.\nUsage: .poll "Question" "Option1" "Option2" ["Option3" ...]'); - } - - const fullCommand = args.join(' '); - const matches = fullCommand.match(/"[^"]+"/g); - - if (!matches || matches.length < 3) { - return message.reply('Please provide a question and at least two options in quotes.\nUsage: .poll "Question" "Option1" "Option2" ["Option3" ...]'); - } - - const question = matches[0].replace(/^"|"$/g, ''); - const options = matches.slice(1).map(opt => opt.replace(/^"|"$/g, '')); - - if (options.length > 10) { - return message.reply('You can only have up to 10 options in a poll.'); - } - - const emojis = ['1️⃣', '2️⃣', '3️⃣', '4️⃣', '5️⃣', '6️⃣', '7️⃣', '8️⃣', '9️⃣', '🔟']; - - // สร้าง embed - const pollEmbed = new MessageEmbed() - .setColor('#3498db') - .setAuthor({ name: message.author.tag, iconURL: message.author.displayAvatarURL() }) - .setTitle('📊 ' + question) - .setDescription( - options.map((option, index) => - `${emojis[index]} ${option}` - ).join('\n\n') - ) - .setFooter({ text: 'Poll active for 24 hours • React to vote!' }) - .setTimestamp(); - - const pollMessage = await message.channel.send({ - content: '**New Poll Started!**', - embeds: [pollEmbed] - }); - - for (const emoji of emojis.slice(0, options.length)) { - try { - await pollMessage.react(emoji); - } catch (err) { - Logger.expection(`Failed to add reaction ${emoji}: ${err.message}`); - } - } - - setTimeout(async () => { - try { - const fetchedMsg = await message.channel.messages.fetch(pollMessage.id); - - const results = options.map((option, index) => { - const reaction = fetchedMsg.reactions.cache.get(emojis[index]); - const count = reaction ? reaction.count - 1 : 0; - return `${emojis[index]} ${option}: **${count}** votes`; - }).join('\n\n'); - - const resultEmbed = new MessageEmbed() - .setColor('#2ecc71') - .setAuthor({ name: message.author.tag, iconURL: message.author.displayAvatarURL() }) - .setTitle('📊 Poll Results: ' + question) - .setDescription(results) - .setFooter({ text: 'Poll has ended' }) - .setTimestamp(); - - await message.channel.send({ - content: '**Poll Results:**', - embeds: [resultEmbed] - }); - - } catch (err) { - Logger.expection(`Failed to end poll: ${err.message}`); - message.channel.send('An error occurred while ending the poll.'); - } - }, 24 * 60 * 60 * 1000); - - } catch (error) { - Logger.expection(`Error in poll command: ${error.message}`); - console.error('Full error:', error); - return message.reply('An error occurred while creating the poll. Please try again later.'); - } - }, -}; \ No newline at end of file diff --git a/Commands/Purge.js b/Commands/Purge.js deleted file mode 100644 index 58ca186..0000000 --- a/Commands/Purge.js +++ /dev/null @@ -1,30 +0,0 @@ -const { WebEmbed } = require('discord.js-selfbot-v13'); -const notifier = require('node-notifier'); - -module.exports = { - name: 'purge', - description: 'Purge a specific number of messages', - async execute(message, args, client) { - if (!args[0] || isNaN(args[0])) { - return message.channel.send('Please provide a valid number of messages to purge.'); - } - - const messageCount = parseInt(args[0], 10); - - if (messageCount < 1 || messageCount > 100) { - return message.channel.send('Please provide a number between 1 and 100.'); - } - - for (let i = 0; i < messageCount; i++) { - await message.channel.send("** **"); - } - - notifier.notify({ - title: 'Kukuri Client', - message: `Purge completed. Sent ${messageCount} messages.`, - sound: true, - wait: false - }); - - }, -}; diff --git a/Commands/RPC.js b/Commands/RPC.js deleted file mode 100644 index c8f514d..0000000 --- a/Commands/RPC.js +++ /dev/null @@ -1,118 +0,0 @@ -const { Client, RichPresence, CustomStatus, SpotifyRPC } = require('discord.js-selfbot-v13'); - -module.exports = { - name: 'rpc', - description: 'Set up Rich Presence interactively', - async execute(message, args, client) { - const filter = m => m.author.id === message.author.id; - const collect = async (prompt) => { - await message.channel.send(prompt); - const collected = await message.channel.awaitMessages({ filter, max: 1, time: 30000 }); - const content = collected.first()?.content; - return content === 'None' || content === '-' ? null : content; - }; - - const rpcType = await collect('Choose RPC Type:\n1️⃣: Rich Presence\n2️⃣: Custom Status\n3️⃣: Spotify RPC\n(If you want to skip, type "None" or "-")'); - - switch (rpcType) { - case '1': - case '1️⃣': - await setRichPresence(message, collect, client); - break; - case '2': - case '2️⃣': - await setCustomStatus(message, collect, client); - break; - case '3': - case '3️⃣': - await setSpotifyRPC(message, collect, client); - break; - default: - message.reply('❌ Incorrect RPC type selected.'); - } - }, -}; - -async function setRichPresence(message, collect, client) { - try { - const applicationId = await collect('📝 Application ID:'); - if (!applicationId) { - return message.reply('❌ Please provide Application ID'); - } - - const name = await collect('📝 RPC Title:') || 'Kukuri Client'; - const details = await collect('📝 Infomation:'); - const state = await collect('📝 State:'); - const largeImageUrl = await collect('📝 Large image URL:'); - const smallImageId = await collect('📝 Small image ID:'); - - const rpc = new RichPresence(client) - .setApplicationId(applicationId) - .setName(name); - - if (details) rpc.setDetails(details); - if (state) rpc.setState(state); - - if (largeImageUrl) { - try { - const getExtendURL = await RichPresence.getExternal(client, applicationId, largeImageUrl); - rpc.setAssetsLargeImage(getExtendURL[0].external_asset_path); - } catch (error) { - message.channel.send('⚠️ Cannot get external URL for large image.'); - } - } - - if (smallImageId) rpc.setAssetsSmallImage(smallImageId); - - client.user.setPresence({ activities: [rpc] }); - message.reply('✅ Set Rich Presence Successfully!'); - } catch (error) { - message.reply(`❌ Error: ${error.message}`); - } -} - -async function setCustomStatus(message, collect, client) { - try { - const emoji = await collect('📝 Emoji:'); - const state = await collect('📝 State:'); - - if (!state && !emoji) { - return message.reply('❌ Provide at least one of the following: emoji, state'); - } - - const custom = new CustomStatus(client); - if (emoji) custom.setEmoji(emoji); - if (state) custom.setState(state); - - client.user.setPresence({ activities: [custom] }); - message.reply('✅ Set Custom Status Successfully!'); - } catch (error) { - message.reply(`❌ Error: ${error.message}`); - } -} - -async function setSpotifyRPC(message, collect, client) { - try { - const songName = await collect('📝 Song name:'); - if (!songName) { - return message.reply('❌ Required song name'); - } - - const artists = await collect('📝 Artist name:') || 'Kukuri and the Harmonic Odyssey'; - const albumName = await collect('📝 Album name:') || songName; - const duration = parseInt(await collect('📝 Song duration (in second):') || '240'); - - const spotify = new SpotifyRPC(client) - .setAssetsLargeImage('spotify:ab67616d00001e02768629f8bc5b39b68797d1bb') - .setState(artists) - .setDetails(songName) - .setAssetsLargeText(albumName) - .setStartTimestamp(Date.now()) - .setEndTimestamp(Date.now() + duration * 1000); - - client.user.setPresence({ activities: [spotify] }); - message.reply('✅ Set Spotify RPC Successfully!'); - } catch (error) { - message.reply(`❌ Error: ${error.message}`); - } -} \ No newline at end of file diff --git a/Commands/Reminder.js b/Commands/Reminder.js deleted file mode 100644 index 4d8bb74..0000000 --- a/Commands/Reminder.js +++ /dev/null @@ -1,191 +0,0 @@ -const { WebhookClient } = require('discord.js-selfbot-v13'); -const config = require('../Config/Config.json'); -const fs = require('fs').promises; -const path = require('path'); -const notifier = require('node-notifier'); - -const ReminderPath = path.join(__dirname, '../data/reminders.json'); - -async function checkData() { - const dirPath = path.join(__dirname, '../data'); - try { - await fs.access(dirPath); - } catch { - await fs.mkdir(dirPath, { recursive: true }); - } -} - -// Load saved reminders -async function loadReminders() { - try { - await checkData(); - const data = await fs.readFile(ReminderPath, 'utf8'); - return JSON.parse(data); - } catch (error) { - if (error.code === 'ENOENT') { - return []; - } - console.error('Error loading reminders:', error); - return []; - } -} - -async function saveReminders(reminders) { - try { - await checkData(); - await fs.writeFile(ReminderPath, JSON.stringify(reminders, null, 2)); - } catch (error) { - console.error('Error saving reminders:', error); - } -} - -async function setReminder(reminder, client) { - const delay = reminder.timestamp - Date.now(); - - if (delay <= 0) { - // Remove expired reminder - const reminders = await loadReminders(); - const updatedReminders = reminders.filter(r => r.id !== reminder.id); - await saveReminders(updatedReminders); - return; - } - - setTimeout(async () => { - try { - const webhook = new WebhookClient({ url: config.NotificationSettings.Webhook }); - - // Send reminder through webhook - await webhook.send({ - content: `**Reminder** for <@${reminder.userId}>: ${reminder.message}`, - allowedMentions: { - users: [reminder.userId] - } - }); - - // Keep spamming notification - notifier.notify({ - title: 'Kukuri Client | Reminder', - message: `Reminder: ${reminder.message}`, - sound: true, - wait: true - }, - function (err, response) { - notifier.notify({ - title: 'Kukuri Client | Reminder', - message: `Reminder: ${reminder.message}`, - sound: true, - wait: true - }); - } - ); - notifier.on('timeout', function (notifierObject, options) { - notifier.notify({ - title: 'Kukuri Client | Reminder', - message: `Reminder: ${reminder.message}`, - sound: true - }); - }); - - // Remove completed reminder from storage - const reminders = await loadReminders(); - const updatedReminders = reminders.filter(r => r.id !== reminder.id); - await saveReminders(updatedReminders); - - } catch (error) { - console.error('Error sending reminder webhook:', error); - const channel = await client.channels.fetch(reminder.channelId); - if (channel) { - channel.send(`Failed to send reminder notification to <@${reminder.userId}>`); - } - } - }, delay); -} - -// Initialize all saved reminders -async function initializeReminders(client) { - const reminders = await loadReminders(); - for (const reminder of reminders) { - await setReminder(reminder, client); - } -} - -module.exports = { - name: 'reminder', - description: 'Set a reminder with date, time and message', - usage: '
', - - // Initialize reminders - async onReady(client) { - await initializeReminders(client); - }, - - async execute(message, args, client) { - if (!config.NotificationSettings || !config.NotificationSettings.Enabled || !config.NotificationSettings.Webhook) { - return message.reply('Reminder notifications are not configured. Please enable webhooks in config.'); - } - - // Check correct number of arguments - if (args.length < 3) { - return message.reply('Usage: reminder
\nExample: reminder 01/01/22 12:00 Hey, remember to do something'); - } - - const dateStr = args[0].trim(); - const timeStr = args[1]; - const reminderMsg = args.slice(2).join(' '); - - // Validate date format - if (!/^\d{2}\/\d{2}\/\d{2}$/.test(dateStr)) { - console.log(`Received dateStr: ${dateStr}`); // Debug - return message.reply('Invalid date format. Please use dd/mm/yy\nExample: reminder 01/01/22 12:00 Coding tonight'); - } - - // Validate time format - if (!/^\d{2}:\d{2}$/.test(timeStr)) { - console.log(`Received dateStr: ${dateStr}`); // Debug - return message.reply('Invalid time format. Please use HH:MM (24-hour format)\nExample: reminder 01/01/22 12:00 Playing game tonight'); - } - - try { - const [day, month, year] = dateStr.split('/'); - const [hours, minutes] = timeStr.split(':'); - - const reminderDate = new Date( - 2000 + parseInt(year), - parseInt(month) - 1, - parseInt(day), - parseInt(hours), - parseInt(minutes) - ); - - if (isNaN(reminderDate.getTime())) { - return message.reply('Invalid date/time provided.'); - } - - if (reminderDate <= new Date()) { - return message.reply('Reminder time must be in the future.'); - } - - const reminder = { - id: Date.now().toString(), - userId: message.author.id, - channelId: message.channel.id, - message: reminderMsg, - timestamp: reminderDate.getTime() - }; - - // Load existing reminders - const reminders = await loadReminders(); - - reminders.push(reminder); - await saveReminders(reminders); - await setReminder(reminder, client); - - // Confirm reminder setup - await message.reply(`Reminder set for ${dateStr} ${timeStr}: "${reminderMsg}"`); - - } catch (error) { - console.error('Error setting reminder:', error); - message.reply('An error occurred while setting the reminder.'); - } - }, -}; \ No newline at end of file diff --git a/Commands/SampleEmbed.js b/Commands/SampleEmbed.js deleted file mode 100644 index 356f3b2..0000000 --- a/Commands/SampleEmbed.js +++ /dev/null @@ -1,21 +0,0 @@ -const { WebEmbed } = require('discord.js-selfbot-v13'); - -module.exports = { - name: 'webembed', - description: 'Send a sample WebEmbed', - execute(message, args, client) { - const embed = new WebEmbed() - .setAuthor({ name: 'Kukuri Client', url: 'https://github.com/Mikasuru/KukuriClient' }) - .setColor('RED') - .setDescription('This is a sample WebEmbed created by Kukuri Client') - .setProvider({ name: 'Sample Provider', url: 'https://example.com' }) - .setTitle('Sample WebEmbed') - .setURL('https://github.com/Mikasuru/KukuriClient') - .setImage('https://files.yande.re/sample/47deaeeac0800ee808b2b760aba30973/yande.re%201200651%20sample%20cameltoe%20detexted%20dress_shirt%20leone_%28kamina0205%29%20no_bra%20open_shirt%20pantsu%20thong.jpg') - .setRedirect('https://www.youtube.com/watch?v=iBP8HambzpY') - .setVideo('http://commondatastorage.googleapis.com/gtv-videos-bucket/sample/BigBuckBunny.mp4'); - message.channel.send({ - content: `Sample WebEmbed ${WebEmbed.hiddenEmbed}${embed}`, - }); - }, -}; \ No newline at end of file diff --git a/Commands/SamsungRPC.js b/Commands/SamsungRPC.js deleted file mode 100644 index 1354757..0000000 --- a/Commands/SamsungRPC.js +++ /dev/null @@ -1,25 +0,0 @@ -module.exports = { - name: 'srpc', - description: 'Samsung RPC Generator', - execute(message, args, client) { - let type = args[0]; - let appID = args[1]; - if (!appID) { - return message.reply('Please provide an appID'); - //appID = 'com.YostarJP.BlueArchive'; // I love Blue Archive - } - if (type === 'stop') { - message.reply(`Stopping \`${appID}\` RPC`); - client.user.setSamsungActivity(appID, 'STOP'); - } else if (type === 'start') { - message.reply(`Starting \`${appID}\` RPC`); - client.user.setSamsungActivity(appID, 'START'); - } else if (type === "update") { - message.reply(`Updating \`${appID}\` RPC`); - client.user.setSamsungActivity(appID, 'UPDATE'); - } else { - return message.reply('Please provide a valid type (start, stop, update)'); - } - - }, -}; \ No newline at end of file diff --git a/Commands/Schedule.js b/Commands/Schedule.js deleted file mode 100644 index 505e070..0000000 --- a/Commands/Schedule.js +++ /dev/null @@ -1,127 +0,0 @@ -const fs = require('fs').promises; -const path = require('path'); - -module.exports = { - name: 'schedule', - description: 'Schedule a direct message (DM) to be sent at a specific date and time', - - initialize(client) { - setInterval(() => this.checkSchedules(client), 10000); - }, - - async checkSchedules(client) { - const dataDir = path.join(__dirname, '..', 'data'); - const schedulePath = path.join(dataDir, 'schedules.json'); - - try { - const data = await fs.readFile(schedulePath, 'utf8'); - let schedules = JSON.parse(data); - const now = new Date(); - - now.setSeconds(0, 0); - const nowTime = now.getTime(); - - const toSend = schedules.filter(s => { - const scheduleDate = new Date(s.scheduledTime); - scheduleDate.setSeconds(0, 0); - const scheduleTime = scheduleDate.getTime(); - - return Math.abs(scheduleTime - nowTime) <= 10000; - }); - schedules = schedules.filter(s => s.scheduledTime > now); - - for (const schedule of toSend) { - try { - const user = await client.users.fetch(schedule.userId); - await user.send(schedule.messageContent); - } catch (err) { - console.error('Error sending scheduled DM:', err); - } - } - - if (toSend.length > 0) { - await fs.writeFile(schedulePath, JSON.stringify(schedules, null, 2)); - } - } catch (err) { - if (err.code !== 'ENOENT') { - console.error('Error checking schedules:', err); - } - } - }, - - async execute(message, args, client) { - const dataDir = path.join(__dirname, '..', 'data'); - const schedulePath = path.join(dataDir, 'schedules.json'); - - // Ensure data directory exists - await fs.mkdir(dataDir, { recursive: true }).catch(err => { - console.error('Error creating data directory:', err); - return message.reply('Error setting up scheduling system.'); - }); - - const fullText = args.join(' '); - const idMatch = fullText.match(/(\d+)\s+"([^"]+)"\s+"([^"]+)"\s+"([^"]*)"/) || - fullText.match(/<@!?(\d+)>\s+"([^"]+)"\s+"([^"]+)"\s+"([^"]*)"/); - - if (!idMatch) { - return message.reply('Invalid format!\nUse: `schedule "Message" "dd/mm/yy" "HH:MM"`\nExample: `.schedule 123456789 "Hello" "31/12/24" "15:58"`'); - } - - const [, userId, scheduledMessage, dateStr, timeStr] = idMatch; - - const dateParts = dateStr.split('/'); - if (dateParts.length !== 3) { - return message.reply('Invalid date format! Use dd/mm/yy'); - } - - let [day, month, year] = dateParts; - year = year.length === 2 ? '20' + year : year; - - let scheduleDate = new Date(year, month - 1, day); - - if (timeStr.trim()) { - const timeParts = timeStr.trim().split(':'); - if (timeParts.length !== 2) { - return message.reply('Invalid time format! Use HH:MM (24-hour format)'); - } - scheduleDate.setHours(parseInt(timeParts[0]), parseInt(timeParts[1])); - } else { - scheduleDate.setHours(0, 0, 0); - } - - if (scheduleDate <= new Date()) { - return message.reply('Schedule date must be in the future!'); - } - - let schedules = []; - try { - const data = await fs.readFile(schedulePath, 'utf8'); - schedules = JSON.parse(data); - } catch (err) { - if (err.code !== 'ENOENT') { - console.error('Error reading schedules:', err); - return message.reply('Error reading schedules.'); - } - } - - const schedule = { - userId, - messageContent: scheduledMessage, - scheduledTime: scheduleDate.getTime(), - }; - - schedules.push(schedule); - - try { - await fs.writeFile(schedulePath, JSON.stringify(schedules, null, 2)); - } catch (err) { - console.error('Error saving schedule:', err); - return message.reply('Error saving schedule.'); - } - - const timeString = timeStr.trim() - ? `on ${dateStr} at ${timeStr}` - : `on ${dateStr}`; - return message.reply(`✅ Message scheduled to be sent to <@${userId}> ${timeString}`); - }, -}; \ No newline at end of file diff --git a/Commands/ServerInfo.js b/Commands/ServerInfo.js deleted file mode 100644 index e30486e..0000000 --- a/Commands/ServerInfo.js +++ /dev/null @@ -1,48 +0,0 @@ -const { WebEmbed } = require('discord.js-selfbot-v13'); - -module.exports = { - name: 'serverinfo', - description: 'Get information about the current server', - async execute(message, args, client) { - if (!message.guild) return message.reply('❌ This command can only be used in a server.'); - try { - // Collect server information - const guild = message.guild; - const owner = await guild.members.fetch(guild.ownerId).catch(() => null); - const channels = guild.channels.cache; - const roles = guild.roles.cache; - const emojis = guild.emojis.cache; - const boosts = guild.premiumSubscriptionCount; - const verificationLevel = { - 0: "None", - 1: "Low", - 2: "Medium", - 3: "High", - 4: "Very High" - }[guild.verificationLevel]; - - const serverEmbed = new WebEmbed() - .setColor('#5865F2') - .setTitle(`📊 Server Information for ${guild.name}`) - .setThumbnail(guild.iconURL({ dynamic: true })) - .setDescription([ - `Server ID: ${guild.id}`, - `Owner: ${owner ? `${owner.user.tag} (<@${owner.id}>)` : 'Not found'}`, - `Members: ${guild.memberCount}`, - `Created: ${guild.createdAt.toLocaleDateString('en-US')}`, - `Channels: ${channels.size}`, - `Roles: ${roles.size}`, - `Emojis: ${emojis.size}`, - `Boosts: ${boosts || 0}`, - `Verification Level: ${verificationLevel}`, - ].join('\n')); - - await message.channel.send({ - content: `${WebEmbed.hiddenEmbed}${serverEmbed}` - }); - } catch (error) { - console.error(error); - message.reply('❌ An error occurred while fetching server information.'); - } - }, -}; \ No newline at end of file diff --git a/Commands/Spam.js b/Commands/Spam.js deleted file mode 100644 index 9a1dbb9..0000000 --- a/Commands/Spam.js +++ /dev/null @@ -1,57 +0,0 @@ -module.exports = { - name: 'spam', - description: 'Send messages repeatedly', - async execute(message, args, client) { - if (args.length < 3) return message.reply('Example: spam "Text" [interval in seconds] [number of times]'); - - let spamMessage = ''; - let remainingArgs = []; - - if (!args[0].startsWith('"')) return message.reply('Please enclose the message in quotes (").'); - - let msgParts = []; - let foundEndQuote = false; - - for (let i = 0; i < args.length; i++) { - msgParts.push(args[i]); - if (args[i].endsWith('"')) { - remainingArgs = args.slice(i + 1); - foundEndQuote = true; - break; - } - } - - if (!foundEndQuote) return message.reply('Please ensure the message is properly enclosed in quotes (").'); - spamMessage = msgParts.join(' ').slice(1, -1); - - if (remainingArgs.length !== 2) return message.reply('Please specify the interval and number of times.'); - - const interval = parseFloat(remainingArgs[0]); - const count = parseInt(remainingArgs[1]); - - if (isNaN(interval) || interval <= -1) return message.reply('Invalid interval.'); - if (isNaN(count) || count <= -1 || count > 100) return message.reply('Count must be between 0-100.'); - - let sent = 0; - let shouldStop = false; - - message.reply(`Starting spam: "${spamMessage}" ${count} times, every ${interval} seconds.`); - - const filter = m => m.content.toLowerCase() === 'stopspam'; - const collector = message.channel.createMessageCollector({ filter }); - - collector.on('collect', () => { - shouldStop = true; - collector.stop(); - message.channel.send('✅ Stopped spam messages.'); - }); - - while (sent < count && !shouldStop) { - await message.channel.send(spamMessage); - sent++; - await new Promise(resolve => setTimeout(resolve, interval * 1000)); - } - - collector.stop(); - } -}; \ No newline at end of file diff --git a/Commands/Speedtest.js b/Commands/Speedtest.js deleted file mode 100644 index 0c0d2ee..0000000 --- a/Commands/Speedtest.js +++ /dev/null @@ -1,31 +0,0 @@ -const { UniversalSpeedTest } = require('universal-speedtest'); - -module.exports = { - name: 'speedtest', - description: 'Test network speed', - async execute(message, args, client) { - try { - const statusMsg = await message.reply('Testing network speed...\n-# It might sending slowly, please wait...'); - const universalSpeedTest = new UniversalSpeedTest(); - const testResult = await universalSpeedTest.performOoklaTest(); - - const textResult = ` - \`\`\` -🔍 Connection Details -• ISP: ${testResult.client?.isp || 'N/A'} -• Location: ${testResult.client?.country || 'N/A'} -• Server: ${testResult.bestServer?.sponsor || 'N/A'} (${testResult.bestServer?.name || 'N/A'}) -📊 Speed Test Results -• Download: ${testResult.downloadResult?.speed || 'N/A'} Mbps -• Upload: ${testResult.uploadResult?.speed || 'N/A'} Mbps -• Ping: ${testResult.pingResult?.latency || 'N/A'} ms -• Jitter: ${testResult.pingResult?.jitter || 'N/A'} ms - \`\`\` - `; - await statusMsg.edit(textResult); - } catch (error) { - console.error('Error:', error); - await message.reply('An error occurred during speed test. Please try again later.'); - } - } -}; \ No newline at end of file diff --git a/Commands/StopRPC.js b/Commands/StopRPC.js deleted file mode 100644 index 59cbea9..0000000 --- a/Commands/StopRPC.js +++ /dev/null @@ -1,12 +0,0 @@ -module.exports = { - name: 'stoprpc', - description: 'Stop all RPC activities', - async execute(message, args, client) { - try { - await client.user.setPresence({ activities: [] }); - message.reply('✅ Cleared all RPC activities successfully!'); - } catch (error) { - message.reply(`❌ Error: ${error.message}`); - } - } -}; \ No newline at end of file diff --git a/Commands/Unban.js b/Commands/Unban.js deleted file mode 100644 index bc3e7b7..0000000 --- a/Commands/Unban.js +++ /dev/null @@ -1,43 +0,0 @@ -const { WebEmbed } = require('discord.js-selfbot-v13'); -const Logger = require('../Module/Logger'); - -module.exports = { - name: 'unban', - description: 'Unban a user from the server', - async execute(message, args, client) { - try { - if (!message.guild) { - return message.reply('This command can only be used in a server'); - } - - const member = message.guild.members.cache.get(client.user.id); - if (!member.permissions.has('BAN_MEMBERS')) { - return message.reply('Bot does not have permission to unban members'); - } - - if (!args[0]) { - return message.reply('Please provide a user ID to unban\nExample: .unban [userID]'); - } - - try { - await message.guild.bans.fetch(args[0]); - } catch { - return message.reply('This user is not banned or the ID is invalid'); - } - - await message.guild.members.unban(args[0]); - - const successEmbed = new WebEmbed() - .setColor('GREEN') - .setTitle('✅ User Unbanned') - .setDescription(`Successfully unbanned user with ID: ${args[0]}`); - - message.channel.send({ content: `${WebEmbed.hiddenEmbed}${successEmbed}` }); - - } catch (error) { - Logger.expection(`Error executing unban command: ${error.message}`); - Logger.expection(`Full error details: ${error.stack}`); - message.reply('An error occurred while trying to unban the user'); - } - } -}; \ No newline at end of file diff --git a/Commands/Unmute.js b/Commands/Unmute.js deleted file mode 100644 index 54750c9..0000000 --- a/Commands/Unmute.js +++ /dev/null @@ -1,70 +0,0 @@ -const { WebEmbed } = require('discord.js-selfbot-v13'); -const fs = require('fs'); -const path = require('path'); -const Logger = require('../Module/Logger'); - -module.exports = { - name: 'unmute', - description: 'Unmute a user by removing mute role', - async execute(message, args, client) { - try { - if (!message.guild) { - return message.reply('This command can only be used in a server'); - } - - const member = message.guild.members.cache.get(client.user.id); - if (!member.permissions.has('MANAGE_ROLES')) { - return message.reply('Bot does not have permission to manage roles'); - } - - if (!message.mentions.members.first()) { - return message.reply('Please mention a user to unmute\nExample: .unmute @user'); - } - - // Load config - const configPath = path.join(__dirname, '..', 'Config', 'Roles.json'); - let config = {}; - - if (fs.existsSync(configPath)) { - config = JSON.parse(fs.readFileSync(configPath, 'utf-8')); - } else { - return message.reply('Mute role not configured. Please use .mutesetup [Role ID] first'); - } - - // Check if role ID is set - if (!config.muteRoleId) { - const embed = new WebEmbed() - .setColor('RED') - .setTitle('⚠️ Mute Role Required') - .setDescription('Please set up the mute role first\nUse command: .mutesetup [Role ID]'); - - return message.channel.send({ content: `${WebEmbed.hiddenEmbed}${embed}` }); - } - - const targetMember = message.mentions.members.first(); - const muteRole = await message.guild.roles.fetch(config.muteRoleId); - - if (!muteRole) { - return message.reply('Mute role not found. Please check the role ID'); - } - - if (!targetMember.roles.cache.has(muteRole.id)) { - return message.reply('This user is not muted'); - } - - await targetMember.roles.remove(muteRole); - - const successEmbed = new WebEmbed() - .setColor('GREEN') - .setTitle('✅ Successfully Unmuted') - .setDescription(`${targetMember.user.username} has been unmuted`); - - message.channel.send({ content: `${WebEmbed.hiddenEmbed}${successEmbed}` }); - - } catch (error) { - Logger.expection(`Error executing command unmute: ${error.message}`); - Logger.expection(`Command error full details: ${error.stack}`); - message.reply('An error occurred while trying to unmute. Please try again'); - } - } -}; \ No newline at end of file diff --git a/Commands/UserInfo.js b/Commands/UserInfo.js deleted file mode 100644 index daacfaf..0000000 --- a/Commands/UserInfo.js +++ /dev/null @@ -1,53 +0,0 @@ -const { WebEmbed } = require('discord.js-selfbot-v13'); - -module.exports = { - name: 'userinfo', - description: 'Get information about a user', - async execute(message, args, client) { - try { - const mentionedUser = message.mentions.users.first() || message.author; - const member = message.guild ? message.guild.members.cache.get(mentionedUser.id) : null; - - if (mentionedUser) { - let userInfo = [ - `🆔 **User ID:** ${mentionedUser.id}`, - `📅 **Created:** ${new Date(mentionedUser.createdTimestamp).toLocaleDateString('en-US', { - year: 'numeric', - month: 'long', - day: 'numeric' - })}` - ]; - - if (member) { - userInfo.push( - `📥 **Joined Server:** ${new Date(member.joinedTimestamp).toLocaleDateString('en-US', { - year: 'numeric', - month: 'long', - day: 'numeric' - })}`, - `👑 **Highest Role:** ${member.roles.highest.name}`, - `🎭 **Roles [${member.roles.cache.size}]:** ${member.roles.cache - .filter(role => role.name !== '@everyone') - .sort((a, b) => b.position - a.position) - .map(role => role.name) - .slice(0, 10) - .join(', ')}${member.roles.cache.size > 10 ? '...' : ''}` - ); - } - - const userEmbed = new WebEmbed() - .setColor('#5865F2') - .setTitle(`User Information - ${mentionedUser.tag}`) - .setThumbnail(mentionedUser.displayAvatarURL({ dynamic: true })) - .setDescription(userInfo.join('\n')); - - await message.channel.send({ - content: `${WebEmbed.hiddenEmbed}${userEmbed}` - }); - } - } catch (error) { - console.error('UserInfo command error:', error); - message.reply('❌ An error occurred while fetching user information.'); - } - }, -}; \ No newline at end of file diff --git a/Commands/VoiceMessage.js b/Commands/VoiceMessage.js deleted file mode 100644 index 7e44069..0000000 --- a/Commands/VoiceMessage.js +++ /dev/null @@ -1,45 +0,0 @@ -const { MessageAttachment } = require('discord.js-selfbot-v13'); -const fs = require('fs'); -const path = require('path'); -const Logger = require('../Module/Logger'); - -module.exports = { - name: 'voicemsg', // example: .voicemsg C:\Users\\Downloads\.mp3 - description: 'Send a voice message using an audio file', - async execute(message, args, client) { - if (args.length < 1) { - return message.reply('Please provide the path to the audio file. Usage: .voicemsg '); - } - - const filePath = args[0]; - if (!fs.existsSync(filePath)) { - return message.reply('The specified file does not exist.'); - } - - const fileExtension = path.extname(filePath).toLowerCase(); - if (!['.mp3', '.ogg', '.wav'].includes(fileExtension)) { - return message.reply('Unsupported file format. Please use .mp3, .ogg, or .wav files.'); - } - - try { - const attachment = new MessageAttachment( - filePath, - 'voice_message.ogg', // Discord requires .ogg for voice messages - { - waveform: 'AAAAAAAAAAAA', // You can customize this - duration_secs: 10, // You can adjust this or calculate it from the file - } - ); - - await message.channel.send({ - files: [attachment], - flags: 'IS_VOICE_MESSAGE', - }); - - message.reply('Voice message sent successfully!'); - } catch (error) { - Logger.expection('Error sending voice message:', error); - message.reply('An error occurred while sending the voice message. Please try again.'); - } - }, -}; \ No newline at end of file diff --git a/Commands/Waifu.js b/Commands/Waifu.js deleted file mode 100644 index 7b859b2..0000000 --- a/Commands/Waifu.js +++ /dev/null @@ -1,49 +0,0 @@ -const axios = require('axios'); -const { MessageAttachment } = require('discord.js-selfbot-v13'); -const Config = require('../Config/Config.json'); - -module.exports = { - name: 'waifu', - description: 'Send a waifu SFW/NSFW image', - async execute(message, args, client) { - try { - if (!message.channel.nsfw && Config.GeneralSettings.EnableNSFW == false) { - message.delete(); - - const response = await axios.get('https://api.waifu.pics/sfw/waifu'); - const imageUrl = response.data.url; - - const imageResponse = await axios.get(imageUrl, { responseType: 'arraybuffer' }); - const buffer = Buffer.from(imageResponse.data); - - const attachment = new MessageAttachment(buffer, 'image.gif'); - await message.channel.send({ files: [attachment] }); - - const user = message.mentions.users.first(); - if (user) { - await message.channel.send(`${user} How cute is this waifu?`); - } - return message.reply('This command can only be used in NSFW channels!'); - } - message.delete(); - - const response = await axios.get('https://api.waifu.pics/nsfw/waifu'); - const imageUrl = response.data.url; - - const imageResponse = await axios.get(imageUrl, { responseType: 'arraybuffer' }); - const buffer = Buffer.from(imageResponse.data); - - const attachment = new MessageAttachment(buffer, 'image.gif'); - await message.channel.send({ files: [attachment] }); - - const user = message.mentions.users.first(); - if (user) { - await message.channel.send(`${user} Look at this waifu...`); - } - - } catch (error) { - console.error('Error sending image:', error); - await message.channel.send('Could not send image...'); - } - }, -};