-
Notifications
You must be signed in to change notification settings - Fork 351
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Replace Idle & Online Commands with Status Command #192
base: master
Are you sure you want to change the base?
Conversation
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) |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah
There was a problem hiding this comment.
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.
There was a problem hiding this 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) |
There was a problem hiding this comment.
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.
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