ccprojects commited on
Commit
5d03556
Β·
verified Β·
1 Parent(s): 12a41ce

Update index.js

Browse files
Files changed (1) hide show
  1. index.js +3 -3
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 = false
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 {