Discord.js setGame() not working anymore
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");
}
javascript node.js discord discord.js
add a comment |
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");
}
javascript node.js discord discord.js
add a comment |
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");
}
javascript node.js discord discord.js
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");
}
javascript node.js discord discord.js
javascript node.js discord discord.js
edited Mar 16 '18 at 12:45
André
2,19141330
2,19141330
asked Aug 27 '17 at 18:18
PMCJohnPMCJohn
5718
5718
add a comment |
add a comment |
4 Answers
4
active
oldest
votes
.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();
client.user.setActivity('YouTube', { type: 'WATCHING' });
Here is a link to the documentation in case you wanted to change 'Watching'
to something else like 'Playing'
.
Thanx! But the type: part is not working for me. Help please?
– Christoffer
Jul 23 '18 at 21:52
1
@ChristofferHjärtström make sure you used all caps and put it in exactly how I did. Check out the documentation I put in as well for clarity.
– NintendoZaedus
Jul 24 '18 at 17:45
add a comment |
The setGame() Method has stopped working, here's what you can do:
- update to latest 11.1-dev or
- use
.setPresence({ game: { name: 'nameGoesHere', type: 0 } });
as a workaround instead
Source: https://github.com/hydrabolt/discord.js/issues/1807#issuecomment-323578919
add a comment |
setGame()
is now deprecated, and discord.js asks you to use setActivity()
.
const Discord = require("discord.js");
const bot = new Discord.Client();
bot.on("ready", () => {
console.log("Ready");
bot.user.setActivity("Type !help");
})
Hope this helped.
add a comment |
Here's a short example of using the .setPresence that LW001 linked to:
var Discord = require('discord.js');
var bot = new Discord.Client();
bot.on('ready', () => {
bot.user.setStatus('available') // Can be 'available', 'idle', 'dnd', or 'invisible'
bot.user.setPresence({
game: {
name: 'Type !help',
type: 0
}
});
});
https://discord.js.org/#/docs/main/stable/class/ClientUser?scrollTo=setGame
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f45907987%2fdiscord-js-setgame-not-working-anymore%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
4 Answers
4
active
oldest
votes
4 Answers
4
active
oldest
votes
active
oldest
votes
active
oldest
votes
.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();
client.user.setActivity('YouTube', { type: 'WATCHING' });
Here is a link to the documentation in case you wanted to change 'Watching'
to something else like 'Playing'
.
Thanx! But the type: part is not working for me. Help please?
– Christoffer
Jul 23 '18 at 21:52
1
@ChristofferHjärtström make sure you used all caps and put it in exactly how I did. Check out the documentation I put in as well for clarity.
– NintendoZaedus
Jul 24 '18 at 17:45
add a comment |
.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();
client.user.setActivity('YouTube', { type: 'WATCHING' });
Here is a link to the documentation in case you wanted to change 'Watching'
to something else like 'Playing'
.
Thanx! But the type: part is not working for me. Help please?
– Christoffer
Jul 23 '18 at 21:52
1
@ChristofferHjärtström make sure you used all caps and put it in exactly how I did. Check out the documentation I put in as well for clarity.
– NintendoZaedus
Jul 24 '18 at 17:45
add a comment |
.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();
client.user.setActivity('YouTube', { type: 'WATCHING' });
Here is a link to the documentation in case you wanted to change 'Watching'
to something else like 'Playing'
.
.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();
client.user.setActivity('YouTube', { type: 'WATCHING' });
Here is a link to the documentation in case you wanted to change 'Watching'
to something else like 'Playing'
.
answered Mar 24 '18 at 18:57
NintendoZaedusNintendoZaedus
152113
152113
Thanx! But the type: part is not working for me. Help please?
– Christoffer
Jul 23 '18 at 21:52
1
@ChristofferHjärtström make sure you used all caps and put it in exactly how I did. Check out the documentation I put in as well for clarity.
– NintendoZaedus
Jul 24 '18 at 17:45
add a comment |
Thanx! But the type: part is not working for me. Help please?
– Christoffer
Jul 23 '18 at 21:52
1
@ChristofferHjärtström make sure you used all caps and put it in exactly how I did. Check out the documentation I put in as well for clarity.
– NintendoZaedus
Jul 24 '18 at 17:45
Thanx! But the type: part is not working for me. Help please?
– Christoffer
Jul 23 '18 at 21:52
Thanx! But the type: part is not working for me. Help please?
– Christoffer
Jul 23 '18 at 21:52
1
1
@ChristofferHjärtström make sure you used all caps and put it in exactly how I did. Check out the documentation I put in as well for clarity.
– NintendoZaedus
Jul 24 '18 at 17:45
@ChristofferHjärtström make sure you used all caps and put it in exactly how I did. Check out the documentation I put in as well for clarity.
– NintendoZaedus
Jul 24 '18 at 17:45
add a comment |
The setGame() Method has stopped working, here's what you can do:
- update to latest 11.1-dev or
- use
.setPresence({ game: { name: 'nameGoesHere', type: 0 } });
as a workaround instead
Source: https://github.com/hydrabolt/discord.js/issues/1807#issuecomment-323578919
add a comment |
The setGame() Method has stopped working, here's what you can do:
- update to latest 11.1-dev or
- use
.setPresence({ game: { name: 'nameGoesHere', type: 0 } });
as a workaround instead
Source: https://github.com/hydrabolt/discord.js/issues/1807#issuecomment-323578919
add a comment |
The setGame() Method has stopped working, here's what you can do:
- update to latest 11.1-dev or
- use
.setPresence({ game: { name: 'nameGoesHere', type: 0 } });
as a workaround instead
Source: https://github.com/hydrabolt/discord.js/issues/1807#issuecomment-323578919
The setGame() Method has stopped working, here's what you can do:
- update to latest 11.1-dev or
- use
.setPresence({ game: { name: 'nameGoesHere', type: 0 } });
as a workaround instead
Source: https://github.com/hydrabolt/discord.js/issues/1807#issuecomment-323578919
edited Oct 17 '17 at 15:26
answered Aug 27 '17 at 18:35
LW001LW001
1,52941323
1,52941323
add a comment |
add a comment |
setGame()
is now deprecated, and discord.js asks you to use setActivity()
.
const Discord = require("discord.js");
const bot = new Discord.Client();
bot.on("ready", () => {
console.log("Ready");
bot.user.setActivity("Type !help");
})
Hope this helped.
add a comment |
setGame()
is now deprecated, and discord.js asks you to use setActivity()
.
const Discord = require("discord.js");
const bot = new Discord.Client();
bot.on("ready", () => {
console.log("Ready");
bot.user.setActivity("Type !help");
})
Hope this helped.
add a comment |
setGame()
is now deprecated, and discord.js asks you to use setActivity()
.
const Discord = require("discord.js");
const bot = new Discord.Client();
bot.on("ready", () => {
console.log("Ready");
bot.user.setActivity("Type !help");
})
Hope this helped.
setGame()
is now deprecated, and discord.js asks you to use setActivity()
.
const Discord = require("discord.js");
const bot = new Discord.Client();
bot.on("ready", () => {
console.log("Ready");
bot.user.setActivity("Type !help");
})
Hope this helped.
edited Nov 23 '18 at 3:52
Kevin Voorn
63611230
63611230
answered Apr 29 '18 at 20:12
Pruina TempestatisPruina Tempestatis
153212
153212
add a comment |
add a comment |
Here's a short example of using the .setPresence that LW001 linked to:
var Discord = require('discord.js');
var bot = new Discord.Client();
bot.on('ready', () => {
bot.user.setStatus('available') // Can be 'available', 'idle', 'dnd', or 'invisible'
bot.user.setPresence({
game: {
name: 'Type !help',
type: 0
}
});
});
https://discord.js.org/#/docs/main/stable/class/ClientUser?scrollTo=setGame
add a comment |
Here's a short example of using the .setPresence that LW001 linked to:
var Discord = require('discord.js');
var bot = new Discord.Client();
bot.on('ready', () => {
bot.user.setStatus('available') // Can be 'available', 'idle', 'dnd', or 'invisible'
bot.user.setPresence({
game: {
name: 'Type !help',
type: 0
}
});
});
https://discord.js.org/#/docs/main/stable/class/ClientUser?scrollTo=setGame
add a comment |
Here's a short example of using the .setPresence that LW001 linked to:
var Discord = require('discord.js');
var bot = new Discord.Client();
bot.on('ready', () => {
bot.user.setStatus('available') // Can be 'available', 'idle', 'dnd', or 'invisible'
bot.user.setPresence({
game: {
name: 'Type !help',
type: 0
}
});
});
https://discord.js.org/#/docs/main/stable/class/ClientUser?scrollTo=setGame
Here's a short example of using the .setPresence that LW001 linked to:
var Discord = require('discord.js');
var bot = new Discord.Client();
bot.on('ready', () => {
bot.user.setStatus('available') // Can be 'available', 'idle', 'dnd', or 'invisible'
bot.user.setPresence({
game: {
name: 'Type !help',
type: 0
}
});
});
https://discord.js.org/#/docs/main/stable/class/ClientUser?scrollTo=setGame
answered Oct 26 '17 at 11:59
koubikoubi
12910
12910
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f45907987%2fdiscord-js-setgame-not-working-anymore%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown