Fogel
canvas.replace(12,33)   Azerbaijan
 
 
help command discord.js

const fs = require('fs');
const { SlashCommandBuilder } = require('@discordjs/builders');
const { languages } = require('../assets/descriptions');
const { getChat } = require('../database');
const util = require('util');

const readdir = util.promisify(fs.readdir);

const commandFiles = readdir('./commands').then(files => files.filter(file => file.endsWith('.js')));

module.exports = {
data: new SlashCommandBuilder()
.setName('help')
.setDescription(languages.help.main['en-US'])
.setDescriptionLocalizations(languages.help.main),
async execute(interaction) {
let chat = await getChat(interaction.guildId);
let lang = chat.lang === 'en' ? 'en-US' : chat.lang;
let commands = await commandFiles;
let str = '';

for (const file of commands) {
const command = require(`./${file}`);
let name = command.data.name;
let description = command.data.description_localizations[lang];
str += `**/${name}** - *${description}*\n`;
}

return await interaction.reply({
content: str,
ephemeral: true,
});
},
};
Currently Offline
Completionist Showcase
44
Perfect Games
4,099
Achievements in Perfect Games
Recent Activity
7.5 hrs on record
last played on 26 Dec
3,778 hrs on record
last played on 20 Sep
28 hrs on record
last played on 20 Sep
режу сукам глотки 8 Jun, 2023 @ 10:29pm 
+REP
76561199167784704 Trade Banned 24 Feb, 2023 @ 3:16am 
yo do u want to sell or exchange? i have a good offer
Vikaaaa 23 Feb, 2023 @ 9:44am 
added for trade
cr0ll 16 Feb, 2023 @ 8:10am 
neyropopa
mdnk228 12 Jan, 2023 @ 4:21am 
я балбес ♥♥♥♥♥♥
w3r1o 3 Jan, 2023 @ 1:00pm 
cwelu jebany