-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
46 lines (36 loc) · 1.5 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
const { EmbedBuilder, WebhookClient } = require('discord.js');
require('dotenv').config();
const webhookClient = new WebhookClient({ url: process.env.WEBHOOK_URL });
// async function editor() {
// const message = await webhookClient.fetchMessage('1158139607171477655');
// const embed = new EmbedBuilder()
// .setTitle('IDKK')
// .setColor('#00FFFF')
// .setFooter({ text: 'Last updated' })
// .setTimestamp(); // Automatically adds a timestamp for "Last updated"
// webhookClient.editMessage('1158139607171477655', {
// content: 'Webhook test2222',
// // username: 'Digitomize | Stats',
// // avatarURL: 'https://res.cloudinary.com/dsazw0r59/image/upload/v1693023476/logo_bg_y5ixum.jpg',
// embeds: [embed],
// });
// }
// Call editor() initially
// editor();
// Set up setInterval to call editor() every 1 hour (3600 seconds)
// setInterval(editor, 3600 * 1000); // 3600 seconds = 1 hour
// const message = await webhookClient.fetchMessage('1158139068970967070');
// const embed = new EmbedBuilder()
// .setTitle('Test')
// .setColor(0x00FFFF);
const embed = new EmbedBuilder()
.setTitle('IDKK')
.setColor('#00FFFF')
.setFooter({ text: 'Last updated' })
.setTimestamp(); // Automatically adds a timestamp for "Last updated"
webhookClient.send({
content: 'Webhook test',
username: 'Digitomize | Stats',
avatarURL: 'https://res.cloudinary.com/dsazw0r59/image/upload/v1693023476/logo_bg_y5ixum.jpg',
embeds: [embed],
});