This repository was archived by the owner on May 11, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathselfbot.js
More file actions
53 lines (48 loc) · 1.67 KB
/
selfbot.js
File metadata and controls
53 lines (48 loc) · 1.67 KB
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
//eslint-disable-next-line
console.error('This is the old selfbot file. This is currently being migrated to a new system.')
console.error('Please do not run this version.')
console.log('Booting...')
const Discord = require('discord.js');
const client = new Discord.Client();
const config = require('./config.json');
console.log('Loaded.')
console.log(`Settings:\nPrefix: ${config.prefix}`)
client.on('ready', () => {
console.log(`Logged in as ${client.user.username}!`);
});
client.on('message', message => {
if (message.author !== client.user) return;
let prefix = config.prefix
if (message.content.startsWith(prefix + 'checkgame')) {
if (client.user.presence.game.name === null) {
const embed = new Discord.RichEmbed()
.setAuthor('Game!', `${message.author.avatarURL}`)
.setColor(0x0000FF)
.setDescription('```No game!```')
.setFooter('')
.setTimestamp()
message.edit({ embed })
} else {
const embed = new Discord.RichEmbed()
.setAuthor('Game!', `${message.author.avatarURL}`)
.setColor(0x0000FF)
.setDescription(`\`\`\`${client.user.presence.game.name}\`\`\``)
.setFooter('')
.setTimestamp()
message.edit({ embed })
}
}
if (message.content.startsWith(prefix + 'setgame')) {
let game = message.content.split(' ').slice(1).join(' ')
client.user.setGame(game)
const embed = new Discord.RichEmbed()
.setAuthor('Game Set!', `${message.author.avatarURL}`)
.setColor(0x0000FF)
.setDescription(`game set to \`${game}\``)
.setFooter('')
.setTimestamp()
message.edit({ embed })
}
});
console.log('Logging in!')
client.login(config.token);