Skip to content

JATaber twitch notification#156

Merged
brennondenny merged 19 commits intoreactivepixel:Release2from
JATaber:JATaber_twitch_notification
May 21, 2018
Merged

JATaber twitch notification#156
brennondenny merged 19 commits intoreactivepixel:Release2from
JATaber:JATaber_twitch_notification

Conversation

@JATaber
Copy link

@JATaber JATaber commented May 17, 2018

This is the feature to where a user can easily announce they are going live on Twitch.

Copy link

@mattpezzente mattpezzente left a comment

Choose a reason for hiding this comment

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

Overall a very good tool. I like your use of ES6 throughout your solution. Make sure to comment your code as well, and take a look at the reviews I've left for your consideration.

const util = require('apex-util');
// const util = require('apex-util');

class StreamerLiveController extends BaseController {

Choose a reason for hiding this comment

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

Would it be more appropriate to name the class in tangent with the file name? Example: TwitchLiveController

Copy link
Author

Choose a reason for hiding this comment

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

I named this class with other streaming services in mind. That way a command for Mixer and others can be added at a later point.

@@ -19,7 +19,10 @@ class StreamerLiveController extends BaseController {
addTwitchAction() {

Choose a reason for hiding this comment

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

Would naming this to something like "announceTwitchLive" be more appropriate?

'!twitchLive <twitch_name>',
'Twitch Live',
'A quick easy way to ',
'A quick easy way to announce you are going live on Twitch.',

Choose a reason for hiding this comment

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

Grammar suggestion:

'A quick easy way...'
vs.
'A quick and easy way...'

Copy link
Author

Choose a reason for hiding this comment

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

fixed the grammar issue.

const streamMessage = `Hey everyone! ${message.author.username} is going live playing ${twitchGame}!! Check him out at ${twitchURL} !`;
const targetChannel = message.guild.channels.get('319548128267206666');
const sender = message.author.username;
return targetChannel.send('```' + sender + ' has an announcment: ```' + streamMessage);

Choose a reason for hiding this comment

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

App crashes because I do not have the specific channel ID for testing. Make a provision to handle if the channel exists or not, maybe by sending the message to the default channel if the one you are searching for can't be found.

Copy link
Contributor

Choose a reason for hiding this comment

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

Definitely, need to make sure the channel ID is changed appropriately so that it will in any channel not just the one with that specific ID.

Copy link
Author

Choose a reason for hiding this comment

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

changed this to look for a specific channel name

Copy link
Contributor

@brennondenny brennondenny left a comment

Choose a reason for hiding this comment

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

The feature could be made more generic so users can post they are streaming on Twitch, Youtube, Mixer, etc..

I've left a few reviews dealing with this for you to take a look at.

const controller = this;
this.commands = [
new Command(
'!twitchLive',
Copy link
Contributor

Choose a reason for hiding this comment

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

Since your goal is to make the StreamerLiveController generic, consider changing the command too!live and add a service attribute, for example !live twitch myname mygame.

Copy link
Author

Choose a reason for hiding this comment

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

I am going to implement this method making one command good for twitch or mixer

),
];
}
addTwitchAction() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider changing this to "streamerLiveAction" to better fit the overall functionality.

Copy link
Author

Choose a reason for hiding this comment

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

changed the method name

),
];
}
addTwitchAction() {
Copy link
Contributor

Choose a reason for hiding this comment

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

Consider changing this to "streamerLiveAction" to better fit the overall functionality.

Copy link
Author

Choose a reason for hiding this comment

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

changed the method name.

Copy link
Contributor

@brennondenny brennondenny left a comment

Choose a reason for hiding this comment

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

The feature could be made more generic so users can post they are streaming on Twitch, Youtube, Mixer, etc..

I've left a few reviews dealing with this for you to take a look at.

bot/client.js Outdated

// TODO: Set Twitch notification

// Message for new users
Copy link
Contributor

@brennondenny brennondenny May 18, 2018

Choose a reason for hiding this comment

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

Remove the old Welcome Feature, this should only include code for the live stream notification.

Copy link
Author

Choose a reason for hiding this comment

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

Thank you for this I am removing it now

@brennondenny brennondenny merged commit f1a8cd7 into reactivepixel:Release2 May 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants