Receipt Timer: Changed date format
This commit is contained in:
@@ -10,9 +10,14 @@ module.exports = {
|
|||||||
async tick(client, timer) {
|
async tick(client, timer) {
|
||||||
try {
|
try {
|
||||||
// 1. Send the message
|
// 1. Send the message
|
||||||
const currentDate = new Date().toLocaleDateString();
|
const currentDate = new Date().toLocaleDateString('en-GB', {
|
||||||
|
weekday: 'long',
|
||||||
|
day: '2-digit',
|
||||||
|
month: '2-digit',
|
||||||
|
year: 'numeric'
|
||||||
|
});
|
||||||
const channel = await client.channels.fetch(timer.data.channelId);
|
const channel = await client.channels.fetch(timer.data.channelId);
|
||||||
if (channel) await channel.send(`Current date is ${currentDate}`);
|
if (channel) await channel.send(`Today is ${currentDate}`);
|
||||||
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
console.error('[TIMER] Error:', error);
|
console.error('[TIMER] Error:', error);
|
||||||
|
|||||||
Reference in New Issue
Block a user