aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrew Lee <alee14498@protonmail.com>2020-07-23 13:10:06 -0400
committerAndrew Lee <alee14498@protonmail.com>2020-07-23 13:10:06 -0400
commitbcdde81872db6a702c0b34b73bb507b8fcd104aa (patch)
tree70b3dbb9b7279a6035fb790fac43dc569f524ec9
parent02edfe5a176de1315b4905b249e486269bc38b45 (diff)
downloadDLAP-bcdde81872db6a702c0b34b73bb507b8fcd104aa.tar.gz
DLAP-bcdde81872db6a702c0b34b73bb507b8fcd104aa.tar.bz2
DLAP-bcdde81872db6a702c0b34b73bb507b8fcd104aa.zip
Re-added setPresence
-rw-r--r--bot.js15
1 files changed, 12 insertions, 3 deletions
diff --git a/bot.js b/bot.js
index e368b83..57cdfb2 100644
--- a/bot.js
+++ b/bot.js
@@ -49,6 +49,7 @@ function playAudio() {
console.log('Now playing ' + audio);
const statusEmbed = new Discord.MessageEmbed()
+ .setAuthor(`${bot.user.username}`, bot.user.avatarURL())
.addField('Now Playing', `${audio}`)
.setColor('#0066ff')
@@ -78,15 +79,23 @@ bot.on('ready', () => {
console.log(`Voice Channel: ${config.voiceChannel}`);
console.log(`Status Channel: ${config.statusChannel}\n`);
+ bot.user.setPresence({
+ activity: {
+ name: `Music | ${config.prefix}help`
+ },
+ status: 'online',
+ afk: false,
+ }).then(console.log)
+ .catch(console.error);
+
const readyEmbed = new Discord.MessageEmbed()
- .setTitle(bot.user.username)
+ .setAuthor(`${bot.user.username}`, bot.user.avatarURL())
.setDescription('Starting bot...')
.setColor('#0066ff')
let statusChannel = bot.channels.cache.get(config.statusChannel);
if (!statusChannel) return console.error('The status channel does not exist! Skipping.');
statusChannel.send(readyEmbed);
- bot.user.setStatus('online');
console.log('Connected to the voice channel.');
playAudio();
});
@@ -167,7 +176,7 @@ bot.on('message', async msg => {
if (command == 'stop') {
await msg.reply('Powering off...');
const statusEmbed = new Discord.MessageEmbed()
- .setTitle(bot.user.username)
+ .setAuthor(`${bot.user.username}`, bot.user.avatarURL())
.setDescription(`That\'s all folks! Powering down ${bot.user.username}...`)
.setColor('#0066ff')
let statusChannel = bot.channels.cache.get(config.statusChannel);