Burhan Taşkesen
Burhan Taşkesen

Reputation: 5

discord bot set game status with discord.js

how can i change my bots game status. i tried this code but didnt work :

const Discord = require('discord.js');
require('discord-reply');
const client = new Discord.Client();
const ayarlar = require('./ayarlar.json')

var prefix = ayarlar.prefix;

client.on('ready', () => {
  console.log(`Bot ${client.user.tag} başlatıldı...`);
  //client.channels.cache.get('832756476379922462').send('Bot başlatıldı')
  client.user.setGame('bhelp ')
});

Error : PowerShell Error

Upvotes: 0

Views: 225

Answers (1)

Lioness100
Lioness100

Reputation: 8402

As the error said, ClientUser#setGame() is not a function. Instead, use ClientUser#setActivity or ClientUser#setPresence.

client.user.setActivity('bhelp');

Upvotes: 1

Related Questions