Discord bot aktif ama cevap vermiyor

Konu hakkında daha detaylı bir bilgi verirseniz sevinirim.

Hocam boyleki ben bu botu cok sunucumda kullandim adi volcano camp (reklam amacli yazmadim) ve kendisi her sunucuda modullere ayrilmis bir sekilde cevap veriyordu bugune kadar baska sunucularda cevap vermemeye basladi kendi sunucumda hala cevap veriyordu ama bugün vermemeye basladi ne kendi sunucumda ne de diger sunucularda.

Konu hakkında daha detaylı bir bilgi verirseniz sevinirim.

En detayli bilgiye vermek isterim.
Sadece bu komutla yazmaya basladigim botlar cevap vermiyor.
 

Cevap vermediğini anladım fakat kodlama kısmından detaylı bilgi verirseniz iyi olacak yoksa kimse size yardım edemez.
 
Cevap vermediğini anladım fakat kodlama kısmından detaylı bilgi verirseniz iyi olacak yoksa kimse size yardım edemez.

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('I 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:'WATCHING'});
});

Client.on('message', msg => {

İf (msg.content.toLowerCase() === 'merhaba') {
Msg.reply('Merhaba!');
}
İf (msg.content.toLowerCase() === 'crazy duello') {
Msg.reply('This Is 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 İnsanı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 Insult!');
}
İ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!');
}
}
});

"
 

Düzgün bir Command Handler'a ihtiyacınız var resmen tüm kodları main dosyasına atmışsınız.
 
Size önerim düzgün bir şekilde JS'yi ve Node.js'yi öğrenmeniz ardından discord.js üzerinden metodlara bakarak kendiniz yazmanız.

Uzun surer ama deneyebilirim bu arada command handler ne?
 
Bu siteyi kullanmak için çerezler gereklidir. Siteyi kullanmaya devam etmek için çerezleri kabul etmelisiniz. Daha Fazlasını Öğren.…