Add guild message support and configuration to video_dl cog#138
Conversation
Agent-Logs-Url: https://github.com/psykzz/cogs/sessions/2a86d8a0-267f-405a-ad46-9167244395b9 Co-authored-by: psykzz <1134201+psykzz@users.noreply.github.com>
|
@copilot fix tests, and make it so only the bot owner can update if the cog can run in a server / guild |
Agent-Logs-Url: https://github.com/psykzz/cogs/sessions/31ceed65-8905-4fde-a805-68c7ee6e5725 Co-authored-by: psykzz <1134201+psykzz@users.noreply.github.com>
Done in c2d6427. Bot owner restriction: Tests fixed: The failing |
Summary
This PR extends the
video_dlcog to support automatic video downloads in guild channels with configurable permissions, in addition to the existing DM functionality for bot owners.Changes
Core Features
Config System: Added Red-bot Config system to store per-guild settings:
Permission Hierarchy:
Commands Added
Manual Download Command
[p]download <url>- Manually download a video from a URLConfiguration Commands (Admin only)
All commands require
manage_guildpermission:[p]videodl enable- Enable automatic downloads for the server[p]videodl disable- Disable automatic downloads for the server[p]videodl channelenable [channel]- Enable automatic downloads in a channel[p]videodl channeldisable [channel]- Disable automatic downloads in a channel[p]videodl userenable <user>- Enable automatic downloads for a user[p]videodl userdisable <user>- Disable automatic downloads for a user[p]videodl status- Show current configurationBehavior Changes
Technical Details
Configandchecksfromredbot.core_can_download_in_guild()method for permission checkingon_messagelistener to handle both DMs and guild messagesDocumentation Updates
info.jsondescription__init__.pydata statement to reflect stored configuration dataTesting