Devil69
Devil69
DIdiscord.js - Imagine ❄
Created by Devil69 on 1/11/2025 in #djs-questions
Forward message
Thankyou for confirmation
5 replies
DIdiscord.js - Imagine ❄
Created by Devil69 on 1/11/2025 in #djs-questions
Forward message
No description
5 replies
DIdiscord.js - Imagine ❄
Created by Devil69 on 12/29/2024 in #djs-questions
messageupdate
i actually noticed it now
21 replies
DIdiscord.js - Imagine ❄
Created by Devil69 on 12/29/2024 in #djs-questions
messageupdate
i was trying it in other server
21 replies
DIdiscord.js - Imagine ❄
Created by Devil69 on 12/29/2024 in #djs-questions
messageupdate
sorry
21 replies
DIdiscord.js - Imagine ❄
Created by Devil69 on 12/29/2024 in #djs-questions
messageupdate
Nevermind
21 replies
DIdiscord.js - Imagine ❄
Created by Devil69 on 12/29/2024 in #djs-questions
messageupdate
yes it performs other functions
21 replies
DIdiscord.js - Imagine ❄
Created by Devil69 on 12/29/2024 in #djs-questions
messageupdate
message in a server where bot has administrator permissions
21 replies
DIdiscord.js - Imagine ❄
Created by Devil69 on 12/29/2024 in #djs-questions
messageupdate
Yes
21 replies
DIdiscord.js - Imagine ❄
Created by Devil69 on 12/29/2024 in #djs-questions
messageupdate
edit message
21 replies
DIdiscord.js - Imagine ❄
Created by Devil69 on 12/29/2024 in #djs-questions
messageupdate
const { Client, Collection, Partials, GatewayIntentBits } = require('discord.js')
const client = new Client({
partials: [Partials.Message],
intents: [GatewayIntentBits.GuildMessageReactions, GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent, GatewayIntentBits.GuildMembers, GatewayIntentBits.GuildPresences]
})

const fs = require('fs')

client.commands = new Collection();
client.aliases = new Collection();
client.slashcommands = new Collection();

const handlers = fs.readdirSync(__dirname + '/handlers').filter(handler => handler.endsWith('.js'))
handlers.forEach(handler => {
require(__dirname + `/handlers/${handler}`)(client)
})

client.login(require('./config/bot.json').token)

// require('./database/loader')


const cron = require('node-cron');

// Schedule the task to run every day at midnight (12:00 AM)
cron.schedule('0 0 0 * * *', () => {
console.log('Running task at midnight');
runDailyTask();
}, {
timezone: require('./config/slot.json').timezone// Set the timezone to your desired timezone
});

async function runDailyTask() {
const data = await require('./database/loader').slotsFile;
for (let i = 0; i < data.length; i++) {
data[i].pings.here = 0;
data[i].pings.everyone = 0;
}
fs.writeFileSync(__dirname + "/database/slots.json", JSON.stringify(data));
console.log('Ping reset successfully')
}



client.on('messageUpdate', async (oldMessage, newMessage) => {
console.log(oldMessage, newMessage)
});

client.on("raw", help => {
console.log(help)
})
const { Client, Collection, Partials, GatewayIntentBits } = require('discord.js')
const client = new Client({
partials: [Partials.Message],
intents: [GatewayIntentBits.GuildMessageReactions, GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent, GatewayIntentBits.GuildMembers, GatewayIntentBits.GuildPresences]
})

const fs = require('fs')

client.commands = new Collection();
client.aliases = new Collection();
client.slashcommands = new Collection();

const handlers = fs.readdirSync(__dirname + '/handlers').filter(handler => handler.endsWith('.js'))
handlers.forEach(handler => {
require(__dirname + `/handlers/${handler}`)(client)
})

client.login(require('./config/bot.json').token)

// require('./database/loader')


const cron = require('node-cron');

// Schedule the task to run every day at midnight (12:00 AM)
cron.schedule('0 0 0 * * *', () => {
console.log('Running task at midnight');
runDailyTask();
}, {
timezone: require('./config/slot.json').timezone// Set the timezone to your desired timezone
});

async function runDailyTask() {
const data = await require('./database/loader').slotsFile;
for (let i = 0; i < data.length; i++) {
data[i].pings.here = 0;
data[i].pings.everyone = 0;
}
fs.writeFileSync(__dirname + "/database/slots.json", JSON.stringify(data));
console.log('Ping reset successfully')
}



client.on('messageUpdate', async (oldMessage, newMessage) => {
console.log(oldMessage, newMessage)
});

client.on("raw", help => {
console.log(help)
})
21 replies
DIdiscord.js - Imagine ❄
Created by Devil69 on 12/29/2024 in #djs-questions
messageupdate
or i have to log raw ?
21 replies
DIdiscord.js - Imagine ❄
Created by Devil69 on 12/29/2024 in #djs-questions
messageupdate
the event not working
21 replies
DIdiscord.js - Imagine ❄
Created by Devil69 on 12/29/2024 in #djs-questions
messageupdate
on using messageUpdate to
21 replies
DIdiscord.js - Imagine ❄
Created by Devil69 on 12/29/2024 in #djs-questions
messageupdate
still.
21 replies
DIdiscord.js - Imagine ❄
Created by Devil69 on 12/29/2024 in #djs-questions
messageupdate
const { Client, Collection, Partials, GatewayIntentBits } = require('discord.js')
const client = new Client({
partials: [Partials.Message],
intents: [GatewayIntentBits.GuildMessageReactions, GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent, GatewayIntentBits.GuildMembers, GatewayIntentBits.GuildPresences]
})

const fs = require('fs')

client.commands = new Collection();
client.aliases = new Collection();
client.slashcommands = new Collection();

const handlers = fs.readdirSync(__dirname + '/handlers').filter(handler => handler.endsWith('.js'))
handlers.forEach(handler => {
require(__dirname + `/handlers/${handler}`)(client)
})

client.login(require('./config/bot.json').token)

// require('./database/loader')


const cron = require('node-cron');

// Schedule the task to run every day at midnight (12:00 AM)
cron.schedule('0 0 0 * * *', () => {
console.log('Running task at midnight');
runDailyTask();
}, {
timezone: require('./config/slot.json').timezone// Set the timezone to your desired timezone
});

async function runDailyTask() {
const data = await require('./database/loader').slotsFile;
for (let i = 0; i < data.length; i++) {
data[i].pings.here = 0;
data[i].pings.everyone = 0;
}
fs.writeFileSync(__dirname + "/database/slots.json", JSON.stringify(data));
console.log('Ping reset successfully')
}



client.on('updateMessage', async (oldMessage, newMessage) => {
console.log(oldMessage, newMessage)
});
const { Client, Collection, Partials, GatewayIntentBits } = require('discord.js')
const client = new Client({
partials: [Partials.Message],
intents: [GatewayIntentBits.GuildMessageReactions, GatewayIntentBits.Guilds, GatewayIntentBits.GuildMessages, GatewayIntentBits.MessageContent, GatewayIntentBits.GuildMembers, GatewayIntentBits.GuildPresences]
})

const fs = require('fs')

client.commands = new Collection();
client.aliases = new Collection();
client.slashcommands = new Collection();

const handlers = fs.readdirSync(__dirname + '/handlers').filter(handler => handler.endsWith('.js'))
handlers.forEach(handler => {
require(__dirname + `/handlers/${handler}`)(client)
})

client.login(require('./config/bot.json').token)

// require('./database/loader')


const cron = require('node-cron');

// Schedule the task to run every day at midnight (12:00 AM)
cron.schedule('0 0 0 * * *', () => {
console.log('Running task at midnight');
runDailyTask();
}, {
timezone: require('./config/slot.json').timezone// Set the timezone to your desired timezone
});

async function runDailyTask() {
const data = await require('./database/loader').slotsFile;
for (let i = 0; i < data.length; i++) {
data[i].pings.here = 0;
data[i].pings.everyone = 0;
}
fs.writeFileSync(__dirname + "/database/slots.json", JSON.stringify(data));
console.log('Ping reset successfully')
}



client.on('updateMessage', async (oldMessage, newMessage) => {
console.log(oldMessage, newMessage)
});
21 replies
DIdiscord.js - Imagine ❄
Created by Devil69 on 12/29/2024 in #djs-questions
messageupdate
Its like i want to know my messageUpdate event does not triggers
21 replies
DIdiscord.js - Imagine ❄
Created by Devil69 on 12/29/2024 in #djs-questions
messageupdate
uh
21 replies
DIdiscord.js - Imagine ❄
Created by Devil69 on 12/29/2024 in #djs-questions
messageupdate
kind of not helpful i think
21 replies
DIdiscord.js - Imagine ❄
Created by Devil69 on 12/29/2024 in #djs-questions
messageupdate
21 replies