forked from macandcheese-spaghetticode/genshi
-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathgenshi bot
56 lines (40 loc) · 1.19 KB
/
genshi bot
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
47
48
49
50
51
52
53
54
55
56
// Import Discord.js
const {
Client,
Collection,
GatewayIntentBits,
Partials,
EmbedBuilder
} = require('discord.js');
const { token } = require('./config.json');
const client = new Client({
intents: [
Guilds,
GuildMembers, // IMPORTANT
GuildMessages,
MessageContent
],
partials: [
User,
Channel,
Message,
GuildMember // IMPORTANT
],
});
let prefix = '!';
client.once('ready', () => {
client.on('guildMemberAdd', async (GuildMember) => {
console.log(GuildMember); // View the member data
});
const random = (min, max) => {
return Math.floor(Math.random() * (max - min + 1) + min);
}
const sendRandomMsg = () => {
client.channels.cache.get('Channel ID').send(randomMsg[random(0, randomMsg.length - 1)]);
}
setInterval(function(){ sendRandomMsg() }, 1000 * 60 );
const randomMsg = ['Step 1: Write a book., Step 2: Fill each chapter in here, separated by commas., Step: 3: Run until you figure something out., Step 4: No Profit, because you are an open source writer, remember?'];
console.log('(。··)_且');
});
// Login to Discord with your client's token
client.login(token);