N
N
Nikita NeVajno2019-11-09 20:41:01
JavaScript
Nikita NeVajno, 2019-11-09 20:41:01

Discord bot status. Why is it not working?

I'm making a status for a bot, but I have no idea what I'm facing. Everything seems to be correct. Who knows, please help.
Here is the code

spoiler
const discord = require("discord.js");
const token = require("../config.json");
const client = new discord.Client();

client.on("ready", () => {
    client.user.setActivity("my code", { type: "STREAMING", url: "https://www.twitch.tv/chto-to" })
})

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Neverov, 2019-11-10
@Pangsit

Your code:

client.on('ready', () => {
  client.user.setActivity("my code", { type: "STREAMING", url: "https://www.twitch.tv/chto-to" });
});

Works:
The problem is on your end somewhere. Definitely not in the specified section.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question