i can't change the status using a command #1164
Closed
SoulReaperc
started this conversation in
General
Replies: 1 comment 1 reply
-
client.user is obviously undefined. We need more context to help you more. |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
module.exports = {
name: 'status',
description: 'Change bot status',
execute(message, client) {
client.user.setStatus('online')
.then(() => {
message.channel.send(
Bot status has been set to .
);})
.catch(error => {
console.error('Error setting bot status:', error);
message.channel.send("An error occurred while setting bot status.");
});
},
};
TypeError: Cannot read properties of undefined (reading 'setStatus')
at Object.execute (status.js:5:20)
Beta Was this translation helpful? Give feedback.
All reactions