-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathindex.js
37 lines (31 loc) · 1005 Bytes
/
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
const express = require('express');
require('dotenv').config();
const colors = require("colors");
const app = express();
const port = 3000;
app.get('/', (req, res) => res.send('Hello World!'));
app.listen(port, () => console.log('\x1b[36m%s\x1b[0m', `| 🔗 Listening to Discord.js : ${port}`));
const Discord = require('discord.js');
const client = new Discord.Client();
client.on('ready', () => {
console.log(`Logged in as ${client.user.tag}!`);
});
const { ActivityType } = require("discord.js");
client.on('ready', () => {
client.user.setStatus('available')
client.user.setPresence({
game: {
name: 'Spotify ',
type: "LISTENING",
url: "https://www.twitch.tv/monstercat"
}
});
});
client.on('message', message => {
if(message.content == "hi") {
message.channel.send("Hello!");
} else if (message.content == "Dead") {
message.channel.send("Thank God! Atleast You are Alive");
}
});
client.login(process.env.token);