Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  4] [ 1]  / answers: 1 / hits: 42359  / 7 Years ago, sun, august 27, 2017, 12:00:00

I have been coding my Discord bot using Discord.JS for about 2 months now and I've just recently noticed that my bot isn't saying that it's playing what I'm telling it. When I first coded the bot up until recently it worked just fine. Now the 3 discord bots I have aren't showing their games.



This is the code I'm using:



const Discord = require(discord.js);
const bot = new Discord.Client();
bot.on(ready, () => {
console.log(Ready);
bot.user.setGame(Type !help);
}

More From » node.js

 Answers
2

.setGame() is deprecated now but you could use .setPresence() or you could use the .setActivity() which is the same thing and format as the .setGame().
Ex.



const Discord = require('discord.js');
const bot = new Discord.Client();
bot.user.setActivity('YouTube', { type: 'WATCHING' });


Here is a link to the documentation in case you wanted to change 'Watching' to something else like 'Playing'.


[#56647] Wednesday, August 23, 2017, 7 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
eanskylerg

Total Points: 524
Total Questions: 107
Total Answers: 100

Location: Colombia
Member since Mon, May 2, 2022
2 Years ago
;