Discord.js V12 Tarih ve Saat Kodu

Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Üye
Katılım
2 Mar 2023
Mesajlar
1
Tepki puanı
0
Yaş
41
3 HİZMET YILI
JavaScript:
const { Client } = require('discord.js');
const client = new Client();

client prefix = '!';

client.on('message', (message) => {
    if (!message.content.startsWtih(prefix) || message.author.bot) return;
   const args = message.content.slice(prefix.length).split(/ +/);
   const komut = args.shift().toLowerCase();
   if (komut === 'tarih') {
      message.react('✔️');
      message.channel.send('Tarih hesaplanıyor...').then(async message => {
         message.delete();
         const tarih = new Date();
         const ay = tarih.getMonth() + 1;
         message.channel.send('\n' + 'Tarih: ' + tarih.getDate() + ay + tarih.getFullYear() + '\n' + 'Saat: ' + tarih.getHours() + .tarihgetMinutes() + .tarihgetSecons() + .tarihgetMilliseconds())
      });
   }
});
//!tarih yazınca tarih ve saati gösterecektir.
 
Mai Sakurajima
Onaylı Üye
Katılım
26 Şub 2023
Mesajlar
102
Tepki puanı
8
Ödüller
2
Sosyal
3 HİZMET YILI
Dostum iyi olmuş fakat daha açıklayıcı olabilir bilmeyen veya yeni öğrenmeye başlamış bir insan bunu okuyamaz eğer öğretici amaçla bir kod yazıyorsan kodun neresinin ne işe yaradığını yazmalısın
 
Sakin ol plana güven
Ultra Üye
Katılım
12 Ağu 2018
Mesajlar
1,499
Çözümler
1
Tepki puanı
63
Ödüller
6
7 HİZMET YILI
Hocam elinize sağlık keşke görsel vs ekleseydiniz daha iyi olurdu
 
Onaylı Üye
Katılım
20 Ocak 2022
Mesajlar
56
Tepki puanı
3
Ödüller
2
Yaş
21
4 HİZMET YILI
Hocam bu ne işe yarıyo biri anlata bilirmi
 
Isse Kun
Emektar Üye
Katılım
15 May 2017
Mesajlar
4,801
Çözümler
5
Tepki puanı
2,106
Ödüller
15
Sosyal
9 HİZMET YILI
Kodun main dosya içerisine atılması gerektiğini de belirtseydiniz iyi olurdu aslında
 
Süper Üye
Katılım
24 Tem 2020
Mesajlar
1,499
Çözümler
4
Tepki puanı
87
Ödüller
5
Yaş
25
5 HİZMET YILI
JavaScript:
const { Client } = require('discord.js');
const client = new Client();

client prefix = '!';

client.on('message', (message) => {
    if (!message.content.startsWtih(prefix) || message.author.bot) return;
   const args = message.content.slice(prefix.length).split(/ +/);
   const komut = args.shift().toLowerCase();
   if (komut === 'tarih') {
      message.react('✔️');
      message.channel.send('Tarih hesaplanıyor...').then(async message => {
         message.delete();
         const tarih = new Date();
         const ay = tarih.getMonth() + 1;
         message.channel.send('\n' + 'Tarih: ' + tarih.getDate() + ay + tarih.getFullYear() + '\n' + 'Saat: ' + tarih.getHours() + .tarihgetMinutes() + .tarihgetSecons() + .tarihgetMilliseconds())
      });
   }
});
//!tarih yazınca tarih ve saati gösterecektir.
hocam elinize sağlık deniyen ve sonuçları gören arkadaş varmı ?
 
Üye
Katılım
17 Kas 2021
Mesajlar
22
Tepki puanı
0
Ödüller
1
Yaş
23
4 HİZMET YILI
hocam elinize sağlık sonuçları nasıl görebiliyoruz
 
Durum
Üzgünüz bu konu cevaplar için kapatılmıştır...
Üst