[Core] Adding Team support #2781
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#2781
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
Discord has recently added support to pull the team members via the endpoint
GET discordapp.com/api/v7/oauth/applications/@me. (see sample output below) I'm interested in adding this behavior into Red but I'm now sure on how ever I want to go at it. So far I've come up with 2 possible ideas to allow team support.co_ownersfield within Red at boot up, or--teamflag enabled, we will then add in the team members to theco_ownersfield. This will ensure that there is an explicit opt-in for team support.Beyond the first issue of adding in new co-owners to teams. We'd also need to update the
infocommand to reflect that its being hosted on a team. Which we can now do. Such as listing the "Instance owned by" field as "Team Red-DiscordBot"EDIT: Forgot JSON sample >.<
I'd assume d.py would figure out team support upstream, and things like the bot's is_owner coro would be updated to reflect this new feature. We should see how d.py handles this, since it could mess up ratelimits and the like if we access the API directly, and since it's likely to include team support in methods our bot class inherits or calls.
Support for teams will probably not be backported to 1.2.x (since it requires adding new attributes). It'll probably be in 1.3.
I was thinking of adding it in a patch bump so it'll be in the 1.2.3 version that is currently blocking #2769 but since it murks up the versioning scheme I decided against.
I'm fine with waiting on full support for it to be added upstream. Our current team users should already be using the coowner flag for now, so we don't lose anything to wait.
Is this the proper place to also report that !info does not correctly display Teams as the owner? It shows the Team ID instead of the actual Team name:
Yep, thanks for the info, we'll be looking into handling this when we add team support too.