-
Notifications
You must be signed in to change notification settings - Fork 0
/
DM_basic
36 lines (20 loc) · 865 Bytes
/
DM_basic
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
const {Client, Intents} = require('discord.js');
const myIntents = new Intents();
myIntents.add(Intents.FLAGS.GUILDS, Intents.FLAGS.GUILD_MESSAGES, Intents.FLAGS.GUILD_MEMBERS, Intents.FLAGS.GUILD_MESSAGE_TYPING, Intents.FLAGS.DIRECT_MESSAGES, Intents.FLAGS.DIRECT_MESSAGE_TYPING, Intents.FLAGS.GUILD_MESSAGE_REACTIONS)
const bot = new Client({ intents: myIntents });
const token = "INSERT TOKEN"
const PREFIX = '!';
bot.on('ready', () => {
console.log('This bot is active!');
})
bot.on('message', message => {
let args = message.content.substring(PREFIX.length).split(" ");
switch (args[0]) {
case 'latest':
const Message =
"Here is the latest Agora newsletter:";
message.author.send(Message);
break;
}
});
bot.login(token);