- !Edip#0170
- Katılım
- 1 Eyl 2021
- Mesajlar
- 170
- Tepkime puanı
- 106
- Şehir
- İzmir
JavaScript:
const express = require('express')
const Topgg = require('@top-gg/sdk')
const fetch = require('node-fetch')
const app = express()
const webhook = new Topgg.Webhook('top-gg-webhookpassword') //Güvenli Şifre
app.post('/vote', webhook.listener(vote => { //bitiş urlsi
let value = JSON.stringify({
embeds: [
{
title: ":sparkling_heart: | Yeni Oy!",
description: `<@${vote.user}> Giveaway için **oy verdi**!\Teşekkürler!`,
color: "6840830",
}
]
})
fetch("WEBHOOKUNUZ BURADA", { //WEBHOOKUNUZ BURADA
method: 'POST',
headers: {
'Content-type': 'application/json',
},
body: value
}).catch(e => console.log('Web kancası gönderilirken hata oluştu : ' + e))
}))
app.listen(3112) //Port
console.log("-> Top.gg Oyları -> HAZIR")