const { EmbedBuilder, version: discordVersion,SlashCommandBuilder } =require('discord.js')constmoment=require('moment');require('moment-duration-format');constlanguage=require('../../../config.json')module.exports= { cooldown:5,// Sets if the command can be used with the bot as a user-installed app or a guild-installed app. integration_types: { user:false, guild:true, }, // Sets if the command can be used in a guild-channel, the bots DMs or a private channel (only works IF the command is user-installable, group DMs and regular user DMs)
context_types: { guildChannel:true, botDM:true, privateChannel:true,}, data:newSlashCommandBuilder().setName('info').setNameLocalizations({ de:'info', fr:'info', }).setDescription('Get advanced information about the bot.').setDescriptionLocalizations({ de:'Erhalten Sie erweiterte Informationen über den Bot.', fr:'Obtenez des informations avancées sur le bot.', }).setDMPermission(false),asyncexecute(interaction) {constclient=interaction.clientvar lan = language;constlocale=require('../../../locale/'+lan+'.json')constbotUptime=moment.duration(client.uptime).format(' D [days], H [hrs], m [mins], s [secs]');constmemUsage= (process.memoryUsage().heapUsed /1024/1024).toFixed(2);constguildSize=client.guilds.cache.size.toString();constuserSize=client.users.cache.size.toString();var d =newDate();var n =d.getFullYear();constembed=newEmbedBuilder().setTitle(locale.bot.name).setDescription(locale.bot.description).addFields( { name:locale.misc.support, value:"https://discord.gg/NgpN3YYbMM", inline:true }, { name:locale.misc.developer, value:"Robin Painter", inline:true }, { name:locale.misc.guilds, value: guildSize, inline:true }, { name:locale.misc.users, value: userSize, inline:true }, { name:locale.misc.uptime, value: botUptime, inline:true }, { name:locale.misc.memory, value:`${Math.round(memUsage)} MB`, inline:true }, { name:locale.misc.discordJS, value:`v${discordVersion}`, inline:true }, { name:locale.misc.node, value:`${process.version}`, inline:true }, { name:locale.misc.version, value:"v5.2.0", inline:true }, { name: locale.misc.bugTracker, value: "https://tracker.lockyzdev.net/set_project.php?project_id=5", inline: true },
).setFooter({ text:locale.misc.copyrightText.replace('{year}', n)});interaction.reply({ embeds: [embed] }) }};