Skip to content

Conversation

@wolfy1339
Copy link
Member

No description provided.

@wolfy1339 wolfy1339 added enhancement New feature or request review This is ready for review labels Apr 20, 2018
@wolfy1339 wolfy1339 requested a review from BWBellairs April 20, 2018 20:19
@ghost ghost assigned wolfy1339 Apr 20, 2018
@wolfy1339 wolfy1339 force-pushed the colors branch 3 times, most recently from bbba240 to fe246be Compare April 26, 2018 02:20
* @param {string} [style=null]
*/
privmsg(target, message) {
privmsg(target, message, background=null, rainbow=false, style=null) {
Copy link
Member

Choose a reason for hiding this comment

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

I think it'd be better for plugins/root to add colours to the message before calling message functions with it hence the extra three arguments wouldn't be necessary.

Copy link
Member

Choose a reason for hiding this comment

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

Yeah, it would be nice if colours were provided as a util. Maybe something like

const colors = require('../utils/colors.js');
colors("some text").red().bold();

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 wouldn't know how to do that kind of function, with the chained functions

wolfy1339 added 12 commits May 4, 2018 16:30
Add JSDoc comments (placeholders mostly for now)
Rename string variables to msg to better reflect their usage
Switched parameters around and ended up re-adding the reply infinite loop and replying in PRIVMSG instead of in the channel (if the message was sent in a channel)�
- Strip the first byte (0x3) to get the color code
- Color names are in upper case, so transform the argument for that
When using an empty string, String.prototype.concat doesn't seem to work, but using += does
@wolfy1339 wolfy1339 added in progress This is being worked on and removed review This is ready for review labels May 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request in progress This is being worked on

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants