discord-timestamps
v0.1.4
Published
Create Timestamps Easly
Downloads
16
Maintainers
Readme
Installation
Use node.js to install discord-timestamps
Docs
This package can ba used with all discord.js versions
You can use multiples formats
- Full - Show All info about this date
- Short Time - Display only hours and minutes
- Date - Display only current date
- Relative - Discord automatically choose what display
- Time - Display only hours, minutes & seconds
Create a timestamp with a specified time
const { Client } = require('discord.js')
const client = new Client({ Intents: ['GUILDS', 'GUILD_MESSAGES']})
const { create } = require('discord-timestamps')
client.login('Token')
client.on('message', async message => {
if (message.content == '.timestamp') {
let c = await create(`May 25 2022`, 'full')
message.channel.send(c)
}
})
Create a timestamp with some seconds from current data
const { Client } = require('discord.js')
const client = new Client({ Intents: ['GUILDS', 'GUILD_MESSAGES']})
const { create } = require('discord-timestamps')
client.login('Token')
client.on('message', async message => {
if (message.content == '.timestamp') {
let c = await create(60, 'full')
message.channel.send(c)
}
})