Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- const { SlashCommandBuilder, EmbedBuilder } = require("discord.js");
- module.exports = {
- data: new SlashCommandBuilder()
- .setName("time")
- .setDescription("the current time and date"),
- async execute (interaction) {
- const embed = new EmbedBuilder()
- .setTitle("Time")
- .addFields(
- {name: "Time:", value: `<t:${Math.floor((Date.now()) / 1000)}:T>`, inline: true},
- {name: "Date:", value: `<t:${Math.floor((Date.now()) / 1000)}:D>`, inline: true}
- )
- return interaction.reply({
- embeds: [embed]
- })
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment