Spaces:
Runtime error
Runtime error
Update index.js
Browse files
index.js
CHANGED
|
@@ -17,7 +17,7 @@ const webhook = new WebhookClient({
|
|
| 17 |
url: 'https://discord.com/api/webhooks/1389959240340213910/eaxo0emjjL4XW6A1M8jAnyftIodvpUVYqmboYnSvqkq8BGaR6IGFFwnfcrhXTyWXiw0z'
|
| 18 |
})
|
| 19 |
|
| 20 |
-
const endVotenoti =
|
| 21 |
|
| 22 |
let messageRef = null
|
| 23 |
let messageSent = false
|
|
@@ -41,7 +41,7 @@ function createEmbed(data, ended) {
|
|
| 41 |
}))
|
| 42 |
const time = new Date().toLocaleString('en-US', { timeZone: 'Asia/Manila' })
|
| 43 |
return new EmbedBuilder()
|
| 44 |
-
.setTitle(ended ? 'π Final Vote Result' : 'π Live Vote Status for **Power Gauntlet**')
|
| 45 |
.addFields(fields)
|
| 46 |
.setColor(ended ? 0xff5555 : 0x00ffff)
|
| 47 |
.setFooter({ text: `Updated the vote at ${time} | Today` })
|
|
@@ -59,7 +59,7 @@ async function updateVotes() {
|
|
| 59 |
|
| 60 |
if (endVotenoti) {
|
| 61 |
if (!messageSent) {
|
| 62 |
-
await webhook.send({ content: 'Vote has been ended', embeds: [embed] })
|
| 63 |
messageSent = true
|
| 64 |
}
|
| 65 |
} else {
|
|
|
|
| 17 |
url: 'https://discord.com/api/webhooks/1389959240340213910/eaxo0emjjL4XW6A1M8jAnyftIodvpUVYqmboYnSvqkq8BGaR6IGFFwnfcrhXTyWXiw0z'
|
| 18 |
})
|
| 19 |
|
| 20 |
+
const endVotenoti = true
|
| 21 |
|
| 22 |
let messageRef = null
|
| 23 |
let messageSent = false
|
|
|
|
| 41 |
}))
|
| 42 |
const time = new Date().toLocaleString('en-US', { timeZone: 'Asia/Manila' })
|
| 43 |
return new EmbedBuilder()
|
| 44 |
+
.setTitle(ended ? 'π Final Vote Result for **Power Gauntlet**' : 'π Live Vote Status for **Power Gauntlet**')
|
| 45 |
.addFields(fields)
|
| 46 |
.setColor(ended ? 0xff5555 : 0x00ffff)
|
| 47 |
.setFooter({ text: `Updated the vote at ${time} | Today` })
|
|
|
|
| 59 |
|
| 60 |
if (endVotenoti) {
|
| 61 |
if (!messageSent) {
|
| 62 |
+
await webhook.send({ content: 'Vote has been ended view the result here https://www.rickgdbot.xyz/contest/gauntlets/results.php', embeds: [embed] })
|
| 63 |
messageSent = true
|
| 64 |
}
|
| 65 |
} else {
|