Skip to content
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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Replace Idle & Online Commands with Status Command #192

wants to merge 1 commit into from

Conversation

Tanya575
Copy link

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