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

adding new feature to treehouses message discord #2138

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rjpadilla
Copy link
Member

New feature:

  • webhook
  • send

webhook pulls info from the Discord API.
send sends a message to your selected discord channel.

Can add multiple channels.

else
log_comment_and_exit1 "ERROR: message not delivered"
fi
;;
*)
log_help_and_exit1 "Error: This command does not exist" message
Copy link
Member

Choose a reason for hiding this comment

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

Error message could be updated to explicitly list all the Discord commands that exist.

Copy link
Member Author

Choose a reason for hiding this comment

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

I'm still in the rough draft stages >.<

@@ -509,6 +509,42 @@ function message {
echo "you have successfully authorized and your access token is $access_token "
fi
;;
webhook)
Copy link
Member

Choose a reason for hiding this comment

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

Could echo error message if webhook and/or apitoken isn't provided:

e.g.

Error: Please add a webhook URL.


echo "Your webhook url is $webhook_url"
;;
send)
Copy link
Member

Choose a reason for hiding this comment

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

Should account for empty messages. Empty messages generate this error:

line 542: {"message":: command not found
ERROR: message not delivered

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.

2 participants