ThourCS
DIAdiscord.js - Imagine an app
•Created by ThourCS on 8/19/2023 in #djs-questions
Code Not working
const Discord = require('discord.js');
const client = new Discord.Client({
intents: {
typing: false,
presences: false
}
});
client.on('ready', async () => {
console.log('Logged in as ' + client.user.name);
updatePresence();
});
const updatePresence = () => {
setInterval(() => {
const currentTime = new Date().toLocaleString('en-US', {
weekday: 'long',
hour: 'numeric',
minute: 'numeric',
hour12: true
});
client.user.setPresence({
activity: {
type: 'watching',
name: currentTime
}
});
}, 60000);
};
client.login('');
const Discord = require('discord.js');
const client = new Discord.Client({
intents: {
typing: false,
presences: false
}
});
client.on('ready', async () => {
console.log('Logged in as ' + client.user.name);
updatePresence();
});
const updatePresence = () => {
setInterval(() => {
const currentTime = new Date().toLocaleString('en-US', {
weekday: 'long',
hour: 'numeric',
minute: 'numeric',
hour12: true
});
client.user.setPresence({
activity: {
type: 'watching',
name: currentTime
}
});
}, 60000);
};
client.login('');
53 replies