Skip to content

Conversation

@FdwZ47
Copy link

@FdwZ47 FdwZ47 commented May 18, 2021

so i just make changes with idle and online commands and make it in one command for example if you want to set it to online just type
status online
and it will change / you can also use this method to make a command that change the bot activity type and content

so i just make changes with idle and online commands and make it in one command for example if you want to set it to online just type 
status online
and it will change / you can also use this method to make a command that change the bot activity type and content
description: "Sets bot status to online.",
process: function (bot, msg, suffix) {
bot.user.setStatus("online").then(console.log).catch(console.error);
if(massage.author.id !== yor id here) return; // here you check if the message auhor id was the same (so only you can use it)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would probably remove this line and let people restrict command access via the permission system. Otherwise the bot might break if someone doesn't manually edit this line.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 on using the permission system to restrict access. Could make it a default restricted command if we're worried about it, although changing the bot's status is relatively harmless.

Copy link
Collaborator

@Einarin Einarin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good change. The reason online and idle are separate commands is that once upon a time they were used to set the bot's "now playing" status as well.

description: "Sets bot status to online.",
process: function (bot, msg, suffix) {
bot.user.setStatus("online").then(console.log).catch(console.error);
if(massage.author.id !== yor id here) return; // here you check if the message auhor id was the same (so only you can use it)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

+1 on using the permission system to restrict access. Could make it a default restricted command if we're worried about it, although changing the bot's status is relatively harmless.

@Einarin Einarin changed the title update discord_bot.js Replace Idle & Online Commands with Status Command Dec 12, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants