Muz_
DIAdiscord.js - Imagine an app
•Created by Muz_ on 12/2/2024 in #djs-questions
Getting poll results
so how do i?
6 replies
DIAdiscord.js - Imagine an app
•Created by Muz_ on 12/2/2024 in #djs-questions
Getting poll results
can i use await interaction.MessageUpdate?
6 replies
DIAdiscord.js - Imagine an app
•Created by Muz_ on 12/2/2024 in #djs-questions
Getting poll results
const { SlashCommandBuilder } = require('discord.js');
const data = {
name: "create-poll",
description: "Create a poll",
};
// Get the current date
let now = new Date();
// Set the time to 17:00 (5:00 PM) today
now.setHours(17, 0, 0, 0); // Set hours, minutes, seconds, and milliseconds
// Get the Unix timestamp (in seconds)
let timestamp = Math.floor(now.getTime() / 1000);
var addweek = 604800;
var addhour = 3600
var nw17 = timestamp + addweek;
var nw18 = timestamp + addweek + addhour;
var nw19 = timestamp + addweek + addhour * 2;
var nw20 = timestamp + addweek + addhour * 3;
var nw21 = timestamp + addweek + addhour * 4;
module.exports = {
data: new SlashCommandBuilder()
.setName('create_poll')
.setDescription('Creates a poll'),
async execute(interaction) {
await interaction.reply(`Time 1 = <t:${nw17}> \n Time 2 = <t:${nw18}> \n Time 3 = <t:${nw19}> \n Time 4 = <t:${nw20}> \n Time 5 = <t:${nw21}> `
)
await interaction.channel.send({
poll: {
question: { text: "Pick a time for Hide and seek next week!" },
answers: [
{ text: 'Time 1' },
{ text: 'Time 2' },
{ text: 'Time 3' },
{ text: 'Time 4' },
{ text: 'Time 5' }
]
}
})
await interaction.reply("Pick a Gamemode to play")
await interaction.channel.send({
poll: {
question: { text: "Pick the Gamemode to play!"},
answers: [
{ text: "Hide and Seek" },
{ text: "Sardines" },
{ text: "Freeze Tag" },
{ text: "Hide and Seek, Teams!"}
]
}
})
}
}
const { SlashCommandBuilder } = require('discord.js');
const data = {
name: "create-poll",
description: "Create a poll",
};
// Get the current date
let now = new Date();
// Set the time to 17:00 (5:00 PM) today
now.setHours(17, 0, 0, 0); // Set hours, minutes, seconds, and milliseconds
// Get the Unix timestamp (in seconds)
let timestamp = Math.floor(now.getTime() / 1000);
var addweek = 604800;
var addhour = 3600
var nw17 = timestamp + addweek;
var nw18 = timestamp + addweek + addhour;
var nw19 = timestamp + addweek + addhour * 2;
var nw20 = timestamp + addweek + addhour * 3;
var nw21 = timestamp + addweek + addhour * 4;
module.exports = {
data: new SlashCommandBuilder()
.setName('create_poll')
.setDescription('Creates a poll'),
async execute(interaction) {
await interaction.reply(`Time 1 = <t:${nw17}> \n Time 2 = <t:${nw18}> \n Time 3 = <t:${nw19}> \n Time 4 = <t:${nw20}> \n Time 5 = <t:${nw21}> `
)
await interaction.channel.send({
poll: {
question: { text: "Pick a time for Hide and seek next week!" },
answers: [
{ text: 'Time 1' },
{ text: 'Time 2' },
{ text: 'Time 3' },
{ text: 'Time 4' },
{ text: 'Time 5' }
]
}
})
await interaction.reply("Pick a Gamemode to play")
await interaction.channel.send({
poll: {
question: { text: "Pick the Gamemode to play!"},
answers: [
{ text: "Hide and Seek" },
{ text: "Sardines" },
{ text: "Freeze Tag" },
{ text: "Hide and Seek, Teams!"}
]
}
})
}
}
6 replies
DIAdiscord.js - Imagine an app
•Created by Muz_ on 12/2/2024 in #djs-voice
Getting poll results.
should i re post it?
8 replies
DIAdiscord.js - Imagine an app
•Created by Muz_ on 12/2/2024 in #djs-voice
Getting poll results.
miss read the titles
8 replies
DIAdiscord.js - Imagine an app
•Created by Muz_ on 12/2/2024 in #djs-voice
Getting poll results.
sry
8 replies
DIAdiscord.js - Imagine an app
•Created by Muz_ on 12/2/2024 in #djs-voice
Getting poll results.
oh wait
8 replies
DIAdiscord.js - Imagine an app
•Created by Muz_ on 12/2/2024 in #djs-voice
Getting poll results.
this is my code
8 replies
DIAdiscord.js - Imagine an app
•Created by Muz_ on 12/2/2024 in #djs-voice
Getting poll results.
const { SlashCommandBuilder } = require('discord.js');
const data = {
name: "create-poll",
description: "Create a poll",
};
// Get the current date
let now = new Date();
// Set the time to 17:00 (5:00 PM) today
now.setHours(17, 0, 0, 0); // Set hours, minutes, seconds, and milliseconds
// Get the Unix timestamp (in seconds)
let timestamp = Math.floor(now.getTime() / 1000);
var addweek = 604800;
var addhour = 3600
var nw17 = timestamp + addweek;
var nw18 = timestamp + addweek + addhour;
var nw19 = timestamp + addweek + addhour * 2;
var nw20 = timestamp + addweek + addhour * 3;
var nw21 = timestamp + addweek + addhour * 4;
module.exports = {
data: new SlashCommandBuilder()
.setName('create_poll')
.setDescription('Creates a poll'),
async execute(interaction) {
await interaction.reply(`Time 1 = <t:${nw17}> \n Time 2 = <t:${nw18}> \n Time 3 = <t:${nw19}> \n Time 4 = <t:${nw20}> \n Time 5 = <t:${nw21}> `
)
await interaction.channel.send({
poll: {
question: { text: "Pick a time for Hide and seek next week!" },
answers: [
{ text: 'Time 1' },
{ text: 'Time 2' },
{ text: 'Time 3' },
{ text: 'Time 4' },
{ text: 'Time 5' }
]
}
})
await interaction.reply("Pick a Gamemode to play")
await interaction.channel.send({
poll: {
question: { text: "Pick the Gamemode to play!"},
answers: [
{ text: "Hide and Seek" },
{ text: "Sardines" },
{ text: "Freeze Tag" },
{ text: "Hide and Seek, Teams!"}
]
}
})
}
}
const { SlashCommandBuilder } = require('discord.js');
const data = {
name: "create-poll",
description: "Create a poll",
};
// Get the current date
let now = new Date();
// Set the time to 17:00 (5:00 PM) today
now.setHours(17, 0, 0, 0); // Set hours, minutes, seconds, and milliseconds
// Get the Unix timestamp (in seconds)
let timestamp = Math.floor(now.getTime() / 1000);
var addweek = 604800;
var addhour = 3600
var nw17 = timestamp + addweek;
var nw18 = timestamp + addweek + addhour;
var nw19 = timestamp + addweek + addhour * 2;
var nw20 = timestamp + addweek + addhour * 3;
var nw21 = timestamp + addweek + addhour * 4;
module.exports = {
data: new SlashCommandBuilder()
.setName('create_poll')
.setDescription('Creates a poll'),
async execute(interaction) {
await interaction.reply(`Time 1 = <t:${nw17}> \n Time 2 = <t:${nw18}> \n Time 3 = <t:${nw19}> \n Time 4 = <t:${nw20}> \n Time 5 = <t:${nw21}> `
)
await interaction.channel.send({
poll: {
question: { text: "Pick a time for Hide and seek next week!" },
answers: [
{ text: 'Time 1' },
{ text: 'Time 2' },
{ text: 'Time 3' },
{ text: 'Time 4' },
{ text: 'Time 5' }
]
}
})
await interaction.reply("Pick a Gamemode to play")
await interaction.channel.send({
poll: {
question: { text: "Pick the Gamemode to play!"},
answers: [
{ text: "Hide and Seek" },
{ text: "Sardines" },
{ text: "Freeze Tag" },
{ text: "Hide and Seek, Teams!"}
]
}
})
}
}
8 replies