-
-
Notifications
You must be signed in to change notification settings - Fork 442
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
Migrate /emoteonly and /emoteonlyoff commands to the Helix API #4015
Migrate /emoteonly and /emoteonlyoff commands to the Helix API #4015
Conversation
auto currentUser = getApp()->accounts->twitch.getCurrent(); | ||
if (currentUser->isAnon()) | ||
{ | ||
channel->addMessage(makeSystemMessage( | ||
"You must be logged in to update chat settings!")); | ||
return ""; | ||
} | ||
auto *twitchChannel = dynamic_cast<TwitchChannel *>(channel.get()); | ||
if (twitchChannel == nullptr) | ||
{ | ||
channel->addMessage(makeSystemMessage( | ||
"The /emoteonlyoff command only works in Twitch channels")); | ||
return ""; |
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 almost the same as in other twitch commands. In my opinion you should be able to do something like this:
this->registerTwitchCommand("/xd",
[](const QStringList&,
std::shared_ptr<TwitchChannel>,
std::shared_ptr<TwitchAccount>) {
// ...
});
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.
clang-tidy made some suggestions
There were too many comments to post at once. Showing the first 25 out of 48. Check the log or trigger a new build to see more.
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.
clang-tidy made some suggestions
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.
nitpicks
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.
clang-tidy made some suggestions
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.
clang-tidy made some suggestions
Pull request checklist:
CHANGELOG.md
was updated, if applicableDescription
This is the first part of updating commands that use the Update Chat Settings endpoint.
Fixes #3966, #3967.