23 lines
629 B
JavaScript
23 lines
629 B
JavaScript
export default {
|
|
name: "time",
|
|
description: "Показать текущее время",
|
|
execute: async (client, message, args) => {
|
|
const now = new Date()
|
|
const timeString = now.toLocaleString("ru-RU", {
|
|
timeZone: "Europe/Moscow",
|
|
year: "numeric",
|
|
month: "2-digit",
|
|
day: "2-digit",
|
|
hour: "2-digit",
|
|
minute: "2-digit",
|
|
second: "2-digit",
|
|
})
|
|
|
|
const utcString = now.toISOString().replace("T", " ").slice(0, 19)
|
|
|
|
await client.sendMessage(message.chatId, {
|
|
message: `Текущее время:\nМосква: ${timeString}\nUTC: ${utcString}`,
|
|
})
|
|
},
|
|
}
|