Make [p]streamalert list show platform, allow to pass target channel to [p]streamalert commands #4151
No reviewers
Labels
No labels
Automated PR
Blocked
Blocked By: Damage Control
Blocked By: Dependency
Blocked By: Other PR
Breaking Change
Category: CI
Category: Cogs - Admin
Category: Cogs - Alias
Category: Cogs - Audio
Category: Cogs - Bank
Category: Cogs - Cleanup
Category: Cogs - CustomCommands
Category: Cogs - Dev
Category: Cogs - Downloader
Category: Cogs - Economy
Category: Cogs - Filter
Category: Cogs - General
Category: Cogs - Image
Category: Cogs - Mod
Category: Cogs - Modlog
Category: Cogs - Mutes
Category: Cogs - Permissions
Category: Cogs - Reports
Category: Cogs - Streams
Category: Cogs - Trivia
Category: Cogs - Trivia - Lists
Category: Cogs - Warnings
Category: Core - API - App Commands Package
Category: Core - API - Audio
Category: Core - API - Bank
Category: Core - API - Commands Package
Category: Core - API - Config
Category: Core - API - Other
Category: Core - API - Utils Package
Category: Core - Bot Class
Category: Core - Bot Commands
Category: Core - Command-line Interfaces
Category: Core - Downloader
Category: Core - Help
Category: Core - i18n
Category: Core - Modlog
Category: Core - Other Internals
Category: Core - RPC/ZMQ
Category: Docker
Category: Docs - Changelogs
Category: Docs - For Developers
Category: Docs - Install Guides
Category: Docs - Other
Category: Docs - User Guides
Category: Meta
Category: RPC/ZMQ methods
Category: Vendored Packages
Changelog Entry: Added
Changelog Entry: Pending
Changelog Entry: Skipped
Closed: Duplicate
Closed: External
Closed: Invalid
Closed: User Error
Closed: Won't Fix
Complex Issue
Docs-only
Feature Branch
Good First Issue
Help Wanted
High Priority
Needs Backport To stable-docs
No Activity
No Repro
QA: Bypassed
QA: Changes Requested
QA: Passed
Release Blocker
Status: Accepted
Status: Frozen
Status: In Progress
Status: Needs Discussion
Status: Needs Info
Status: Needs Triage
Status: PRs Welcome
Type: Bug
Type: Dependency Update
Type: Deprecation
Type: Enhancement
Type: Feature
Type: Informational
Type: Merge
Type: Optimisation
Type: Question
Type: Removal
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
Mrcoolgamer11/Red-DiscordBot!4151
Loading…
Reference in a new issue
No description provided.
Delete branch "3866-streamalert"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Type
Description of the changes
Fixes #3866
if you change all instances of
discord_channel: strtodiscord_channel: discord.TextChannel, it becomes unnecessary to use regex to get the channel object as you will already have the channel object. I would also make sure all supported streaming services can have a discord channel specified (at the moment, Hitbox and Picarto seem to be excluded on this)You should be using redbot.core.utils.chat_formating.humanize_list() here.
Got it, thank you, I've made the changes you asked for. After implementing the change for Picarto and Hitbox, I saw that I couldn't use token_name as platform name because theirs are initialized as None, so I made an attribute in the Stream class to hold the platform name. Is that and my other changes all right?
Thank you, I made the changes. I also split the platform and streams concatenation to msg into two different lines, which I believe is more readable. Let me know if there is anything else :)
Looks pretty good, just needs some small polishing 👍
It looks like the repository with the base branch has been removed, so you most likely will need to recreate the branch from this PR's head and make a new PR. If you need a hand with that, you can ping me in
#advanced-codingchannel on Discord.@ -300,3 +308,3 @@returnawait self.stream_alert(ctx, TwitchStream, channel_name.lower())await self.stream_alert(ctx, TwitchStream, channel_name.lower(), discord_channel)discord_channelshould have a default ofNonehere same as other commands.@ -424,3 +444,4 @@await self.add_or_remove(ctx, stream, discord_channel)@commands.group()@checks.mod_or_permissions(manage_channels=True)(this comment is optional) You could use nested defaultdict for
streams_listinstead and then not have to use.setdefault()on it later on:Channel mention would look better here. I also re-ordered the channel mention and "channel" word.
Channel mention would look better here. I also added a dot at the end and re-ordered the channel mention and "channel" word in the code suggestion.
YouTube uses a different casing for its name:
The platform is now called Smashcast and the class is named
HitboxStreamfor backwards compatibility.@douglas-cpp Hi, if you still want to handle this, let me know.
I'll be making a PR based on your contribution otherwise, as it would be wasteful if we haven't used it :)
All credit for your work will, of course, be retained - you will be a co-author on the new PR and the list of contributors for the relevant release will include you so you don't have to worry about that.
Superseded by #5160
Pull request closed