- Kuatyw#0001
- Katılım
- 22 Tem 2021
- Mesajlar
- 35
- Tepkime puanı
- 29
JavaScript:
const fetch = require('node-fetch');
let JsonBody = {
content: "Siteye gitmek için tıkla",
components: [{type: 1, components: [{
type: 2,
label: "Tıkla",
style: 5,
url: "https://fibercode.xyz/"
}]}]
}
fetch(`https://discord.com/api/v8/channels/${message.channel.id}/messages`, {
method: 'POST',
body: JSON.stringify(JsonBody),
headers: {
Authorization: `Bot ${client.token}`,
'content-type': 'application/json'
}
})
Kod modülle değil discord apisi kullanılarak yapılmıştır.
Direk dosyaya atıp çalışmıyor demeyin komut yükleyicisiz paylaştım çünkü herkesin altyapısı farklı olabilir.
Komut örneği fotoğrafta mevcuttur.
Moderatör tarafından düzenlendi: