Komutu atiyorum.
Bir de hocam kufurler vardi onlari bos buraktim kufur engelliyicide kufurler var.
"
Const Discord = require('discord.js');
Const ayarlar = require('./ayarlar.json');
Const Client = New Discord.Client();
Const { join } = require('path'); // tanımlamalar.
Const { readdirsync } = require('fs');
Const dB = require('./database')
Const prefix = require('./database.json')
Client.commands = New Discord.Collection();
Client.cooldown = New Discord.Collection();
Client.sunucutanıt = New Discord.Collection();
Const commandfiles = readdirsync(join(__dirname, "komutlar")).filter(file => file.endsWith(".js")); // belli bir klasörden belli .js uzantılı dosyaları buluyor.
For (const file of commandfiles) {
Const command = require(join(__dirname, "komutlar", '${file}'));
Client.commands.set(command.kod, command); // komutları ayarlıyoruz.
}
Client.on("message", message =>{
İf (!message.guild) return;
İf (dB.kontrol("sa" + message.guild.ID)){
İf (message.content.toLowerCase() === "sa"){
Message.reply("**as**")
}
} Else {
Return.
}
})
Client.on("error", Console.error);
Client.on("message", async message => {
İf(message.author.bot) return;
İf (!message.guild){
Var prefix = "!"
} Else if (dB.kontrol("prefix")){
Var prefix = dB.bul("prefix" + message.guild.ID)
} Else {
Var prefix = "!"
}
İf(message.content.startswith(prefix)) {
Const args = message.content.slice(prefix.length).trim().split(/ +/);
Const command = args.shift().toLowerCase();
İf(!Client.commands.has(command)) return message.channel.send('ı not founded **${command}** command!!! ');
Try {
Client.commands.get(command).run(Client, message, args);
} Catch (error){
Console.error(error);
}
}
});
Client.on('ready', () => {
console.log('your bot ${Client.user.tag} joined server!');
Client.user.setactivity("crazy duello coming soon!", {type:'watchıng'});
});
Client.on('message', msg => {
İf (msg.content.toLowerCase() === 'merhaba') {
Msg.reply('merhaba!');
}
İf (msg.content.toLowerCase() === 'crazy duello') {
Msg.reply('this ıs command not activated!');
}
İf (msg.content.toLowerCase() === '') {
msg.delete()
Msg.reply('küfür yasak!');
}
İf (msg.content.toLowerCase() === 'botmusun?') {
Msg.reply('üzerimde bot yazıldığına göre insanım!');
}
İf (msg.content.toLowerCase() === 'kes lan') {
Msg.reply('sadece seninle oyun oynamak istemistim
');
}
İf (msg.content.toLowerCase() === 'günaydın') {
Msg.reply('sanada günaydın hayırlı sabahlar!');
}
İf (msg.content.toLowerCase() === 'hello') {
Msg.reply('hi');
}
İf (msg.content.toLowerCase() === 'how are you') {
Msg.reply('i am fine. And you?');
}
İf (msg.content.toLowerCase() === 'good nights') {
Msg.reply('and youu!');
}
İf (msg.content.toLowerCase() === 'you bot') {
Msg.reply('no! I am human
');
}
İf (msg.content.toLowerCase() === '') {
msg.delete()
Msg.reply('dont ınsult!');
}
İf (msg.content.toLowerCase() === 'i am who') {
Msg.reply('you you');
}
İf (msg.content.toLowerCase() === 'i love you') {
Msg.React('
')
Msg.reply('thanks ??');
}
İf (msg.content.toLowerCase() === '') {
msg.delete()
Msg.reply('hop dostum hakaret yasak!');
}
İf (msg.content.toLowerCase() === '') {
msg.delete()
Msg.reply('hakaret yasak lan!');
}
İf (msg.content.toLowerCase() === '') {
msg.delete()
Msg.reply('lan hakaret yasak!');
}
İf (msg.content.toLowerCase() === 'bane') {
Msg.reply('anneanneni ye');
}
İf (msg.content.toLowerCase() === 'aga be') {
Msg.reply('
');
}
İf (msg.content.toLowerCase() === '!kick') {
Msg.reply('this command deleted!');
}
Client.on('message', async message => {
İf (message.content.startswith('!play')) {
Const args = message.content.split(' ').slice(1)
Const botmessage = args.join(" ")
İf (!botmessage) return message.reply('not said URL')
İf (message.member.voice.channel) {
Const connection = await message.member.voice.channel.join();
Const ytdl = require('ytdl-Core');
Connection.play(ytdl('${botmessage}', { filter: 'audionly'}))
} Else {
Message.reply('join sound channel!')
}
}
});
Client.on('message', message => {
İf (message.content === '!avatar') {
message.reply(message.author.displayAvatarURL());
}
});
});
Client.login('');
Client.on('message', async message => {
İf (!message.guild) return;
İf (message.content === '!play') {
İf (message.member.voice.channel) {
Const connection = await message.member.voice.channel.join();
} Else {
Message.reply('you need to join a voice channel first!');
}
}
});
"