mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-12-06 01:12:33 -05:00
Migration to discord.py 2.0 (#5600)
* Temporarily set d.py to use latest git revision
* Remove `bot` param to Client.start
* Switch to aware datetimes
A lot of this is removing `.replace(...)` which while not technically
needed, simplifies the code base. There's only a few changes that are
actually necessary here.
* Update to work with new Asset design
* [threads] Update core ModLog API to support threads
- Added proper support for passing `Thread` to `channel`
when creating/editing case
- Added `parent_channel_id` attribute to Modlog API's Case
- Added `parent_channel` property that tries to get parent channel
- Updated case's content to show both thread and parent information
* [threads] Disallow usage of threads in some of the commands
- announceset channel
- filter channel clear
- filter channel add
- filter channel remove
- GlobalUniqueObjectFinder converter
- permissions addglobalrule
- permissions removeglobalrule
- permissions removeserverrule
- Permissions cog does not perform any validation for IDs
when setting through YAML so that has not been touched
- streamalert twitch/youtube/picarto
- embedset channel
- set ownernotifications adddestination
* [threads] Handle threads in Red's permissions system (Requires)
- Made permissions system apply rules of (only) parent in threads
* [threads] Update embed_requested to support threads
- Threads don't have their own embed settings and inherit from parent
* [threads] Update Red.message_eligible_as_command to support threads
* [threads] Properly handle invocation of [p](un)mutechannel in threads
Usage of a (un)mutechannel will mute/unmute user in the parent channel
if it's invoked in a thread.
* [threads] Update Filter cog to properly handle threads
- `[p]filter channel list` in a threads sends list for parent channel
- Checking for filter hits for a message in a thread checks its parent
channel's word list. There's no separate word list for threads.
* [threads] Support threads in Audio cog
- Handle threads being notify channels
- Update type hint for `is_query_allowed()`
* [threads] Update type hints and documentation to reflect thread support
- Documented that `{channel}` in CCs might be a thread
- Allowed (documented) usage of threads with `Config.channel()`
- Separate thread scope is still in the picture though
if it were to be done, it's going to be in separate in PR
- GuildContext.channel might be Thread
* Use less costy channel check in customcom's on_message_without_command
This isn't needed for d.py 2.0 but whatever...
* Update for in-place edits
* Embed's bool changed behavior, I'm hoping it doesn't affect us
* Address User.permissions_in() removal
* Swap VerificationLevel.extreme with VerificationLevel.highest
* Change to keyword-only parameters
* Change of `Guild.vanity_invite()` return type
* avatar -> display_avatar
* Fix metaclass shenanigans with Converter
* Update Red.add_cog() to be inline with `dpy_commands.Bot.add_cog()`
This means adding `override` keyword-only parameter and causing
small breakage by swapping RuntimeError with discord.ClientException.
* Address all DEP-WARNs
* Remove Context.clean_prefix and use upstream implementation instead
* Remove commands.Literal and use upstream implementation instead
Honestly, this was a rather bad implementation anyway...
Breaking but actually not really - it was provisional.
* Update Command.callback's setter
Support for functools.partial is now built into d.py
* Add new perms in HUMANIZED_PERM mapping (some from d.py 1.7 it seems)
BTW, that should really be in core instead of what we have now...
* Remove the part of do_conversion that has not worked for a long while
* Stop wrapping BadArgument in ConversionFailure
This is breaking but it's best to resolve it like this.
The functionality of ConversionFailure can be replicated with
Context.current_parameter and Context.current_argument.
* Add custom errors for int and float converters
* Remove Command.__call__ as it's now implemented in d.py
* Get rid of _dpy_reimplements
These were reimplemented for the purpose of typing
so it is no longer needed now that d.py is type hinted.
* Add return to Red.remove_cog
* Ensure we don't delete messages that differ only by used sticker
* discord.InvalidArgument->ValueError
* Move from raw <t:...> syntax to discord.utils.format_dt()
* Address AsyncIter removal
* Swap to pos-only for params that are pos-only in upstream
* Update for changes to Command.params
* [threads] Support threads in ignore checks and allow ignoring them
- Updated `[p](un)ignore channel` to accept threads
- Updated `[p]ignore list` to list ignored threads
- Updated logic in `Red.ignored_channel_or_guild()`
Ignores for guild channels now work as follows (only changes for threads):
- if channel is not a thread:
- check if user has manage channels perm in channel
and allow command usage if so
- check if channel is ignored and disallow command usage if so
- allow command usage if none of the conditions above happened
- if channel is a thread:
- check if user has manage channels perm in parent channel
and allow command usage if so
- check if parent channel is ignored and disallow command usage
if so
- check if user has manage thread perm in parent channel
and allow command usage if so
- check if thread is ignored and disallow command usage if so
- allow command usage if none of the conditions above happened
* [partial] Raise TypeError when channel is of PartialMessageable type
- Red.embed_requested
- Red.ignored_channel_or_guild
* [partial] Discard command messages when channel is PartialMessageable
* [threads] Add utilities for checking appropriate perms in both channels & threads
* [threads] Update code to use can_react_in() and @bot_can_react()
* [threads] Update code to use can_send_messages_in
* [threads] Add send_messages_in_threads perm to mute role and overrides
* [threads] Update code to use (bot/user)_can_manage_channel
* [threads] Update [p]diagnoseissues to work with threads
* Type hint fix
* [threads] Patch vendored discord.ext.menus to check proper perms in threads
I guess we've reached time when we have to patch the lib we vendor...
* Make docs generation work with non-final d.py releases
* Update discord.utils.oauth_url() usage
* Swap usage of discord.Embed.Empty/discord.embeds.EmptyEmbed to None
* Update usage of Guild.member_count to work with `None`
* Switch from Guild.vanity_invite() to Guild.vanity_url
* Update startup process to work with d.py's new asynchronous startup
* Use setup_hook() for pre-connect actions
* Update core's add_cog, remove_cog, and load_extension methods
* Update all setup functions to async and add awaits to bot.add_cog calls
* Modernize cogs by using async cog_load and cog_unload
* Address StoreChannel removal
* [partial] Disallow passing PartialMessageable to Case.channel
* [partial] Update cogs and utils to work better with PartialMessageable
- Ignore messages with PartialMessageable channel in CustomCommands cog
- In Filter cog, don't pass channel to modlog.create_case()
if it's PartialMessageable
- In Trivia cog, only compare channel IDs
- Make `.utils.menus.menu()` work for messages
with PartialMessageable channel
- Make checks in `.utils.tunnel.Tunnel.communicate()` more rigid
* Add few missing DEP-WARNs
This commit is contained in:
@@ -78,7 +78,7 @@ class AudioSetCommands(MixinMeta, metaclass=CompositeMetaClass):
|
||||
)
|
||||
|
||||
@command_audioset_perms_global_whitelist.command(name="list")
|
||||
@commands.bot_has_permissions(add_reactions=True)
|
||||
@commands.bot_can_react()
|
||||
async def command_audioset_perms_global_whitelist_list(self, ctx: commands.Context):
|
||||
"""List all keywords added to the whitelist."""
|
||||
whitelist = await self.config.url_keyword_whitelist()
|
||||
@@ -172,7 +172,7 @@ class AudioSetCommands(MixinMeta, metaclass=CompositeMetaClass):
|
||||
)
|
||||
|
||||
@command_audioset_perms_global_blacklist.command(name="list")
|
||||
@commands.bot_has_permissions(add_reactions=True)
|
||||
@commands.bot_can_react()
|
||||
async def command_audioset_perms_global_blacklist_list(self, ctx: commands.Context):
|
||||
"""List all keywords added to the blacklist."""
|
||||
blacklist = await self.config.url_keyword_blacklist()
|
||||
@@ -268,7 +268,7 @@ class AudioSetCommands(MixinMeta, metaclass=CompositeMetaClass):
|
||||
)
|
||||
|
||||
@command_audioset_perms_whitelist.command(name="list")
|
||||
@commands.bot_has_permissions(add_reactions=True)
|
||||
@commands.bot_can_react()
|
||||
async def command_audioset_perms_whitelist_list(self, ctx: commands.Context):
|
||||
"""List all keywords added to the whitelist."""
|
||||
whitelist = await self.config.guild(ctx.guild).url_keyword_whitelist()
|
||||
@@ -361,7 +361,7 @@ class AudioSetCommands(MixinMeta, metaclass=CompositeMetaClass):
|
||||
)
|
||||
|
||||
@command_audioset_perms_blacklist.command(name="list")
|
||||
@commands.bot_has_permissions(add_reactions=True)
|
||||
@commands.bot_can_react()
|
||||
async def command_audioset_perms_blacklist_list(self, ctx: commands.Context):
|
||||
"""List all keywords added to the blacklist."""
|
||||
blacklist = await self.config.guild(ctx.guild).url_keyword_blacklist()
|
||||
@@ -453,7 +453,7 @@ class AudioSetCommands(MixinMeta, metaclass=CompositeMetaClass):
|
||||
await self.set_player_settings(ctx)
|
||||
|
||||
@command_audioset_autoplay.command(name="playlist", usage="<playlist_name_OR_id> [args]")
|
||||
@commands.bot_has_permissions(add_reactions=True)
|
||||
@commands.bot_can_react()
|
||||
async def command_audioset_autoplay_playlist(
|
||||
self,
|
||||
ctx: commands.Context,
|
||||
@@ -496,9 +496,7 @@ class AudioSetCommands(MixinMeta, metaclass=CompositeMetaClass):
|
||||
ctx,
|
||||
title=_("Playlists Are Not Available"),
|
||||
description=_("The playlist section of Audio is currently unavailable"),
|
||||
footer=discord.Embed.Empty
|
||||
if not await self.bot.is_owner(ctx.author)
|
||||
else _("Check your logs."),
|
||||
footer=None if not await self.bot.is_owner(ctx.author) else _("Check your logs."),
|
||||
)
|
||||
if scope_data is None:
|
||||
scope_data = [None, ctx.author, ctx.guild, False]
|
||||
@@ -782,7 +780,7 @@ class AudioSetCommands(MixinMeta, metaclass=CompositeMetaClass):
|
||||
|
||||
@command_audioset.command(name="localpath")
|
||||
@commands.is_owner()
|
||||
@commands.bot_has_permissions(add_reactions=True)
|
||||
@commands.bot_can_react()
|
||||
async def command_audioset_localpath(self, ctx: commands.Context, *, local_path=None):
|
||||
"""Set the localtracks path if the Lavalink.jar is not run from the Audio data folder.
|
||||
|
||||
|
||||
@@ -81,7 +81,8 @@ class PlayerControllerCommands(MixinMeta, metaclass=CompositeMetaClass):
|
||||
|
||||
@commands.command(name="now")
|
||||
@commands.guild_only()
|
||||
@commands.bot_has_permissions(embed_links=True, add_reactions=True)
|
||||
@commands.bot_has_permissions(embed_links=True)
|
||||
@commands.bot_can_react()
|
||||
async def command_now(self, ctx: commands.Context):
|
||||
"""Now playing."""
|
||||
if not self._player_check(ctx):
|
||||
|
||||
@@ -25,7 +25,8 @@ class EqualizerCommands(MixinMeta, metaclass=CompositeMetaClass):
|
||||
@commands.group(name="eq", invoke_without_command=True)
|
||||
@commands.guild_only()
|
||||
@commands.cooldown(1, 15, commands.BucketType.guild)
|
||||
@commands.bot_has_permissions(embed_links=True, add_reactions=True)
|
||||
@commands.bot_has_permissions(embed_links=True)
|
||||
@commands.bot_can_react()
|
||||
async def command_equalizer(self, ctx: commands.Context):
|
||||
"""Equalizer management.
|
||||
|
||||
|
||||
@@ -21,7 +21,8 @@ _ = Translator("Audio", Path(__file__))
|
||||
class LocalTrackCommands(MixinMeta, metaclass=CompositeMetaClass):
|
||||
@commands.group(name="local")
|
||||
@commands.guild_only()
|
||||
@commands.bot_has_permissions(embed_links=True, add_reactions=True)
|
||||
@commands.bot_has_permissions(embed_links=True)
|
||||
@commands.bot_can_react()
|
||||
async def command_local(self, ctx: commands.Context):
|
||||
"""Local playback commands."""
|
||||
|
||||
|
||||
@@ -41,7 +41,8 @@ class MiscellaneousCommands(MixinMeta, metaclass=CompositeMetaClass):
|
||||
@commands.command(name="audiostats")
|
||||
@commands.guild_only()
|
||||
@commands.is_owner()
|
||||
@commands.bot_has_permissions(embed_links=True, add_reactions=True)
|
||||
@commands.bot_has_permissions(embed_links=True)
|
||||
@commands.bot_can_react()
|
||||
async def command_audiostats(self, ctx: commands.Context):
|
||||
"""Audio stats."""
|
||||
server_num = len(lavalink.active_players())
|
||||
|
||||
@@ -9,7 +9,6 @@ import discord
|
||||
import lavalink
|
||||
from red_commons.logging import getLogger
|
||||
|
||||
from discord.embeds import EmptyEmbed
|
||||
from lavalink import NodeNotFound
|
||||
|
||||
from redbot.core import commands
|
||||
@@ -67,7 +66,7 @@ class PlayerCommands(MixinMeta, metaclass=CompositeMetaClass):
|
||||
if not self._player_check(ctx):
|
||||
if self.lavalink_connection_aborted:
|
||||
msg = _("Connection to Lavalink node has failed")
|
||||
desc = EmptyEmbed
|
||||
desc = None
|
||||
if await self.bot.is_owner(ctx.author):
|
||||
desc = _("Please check your console or logs for details.")
|
||||
return await self.send_embed_msg(ctx, title=msg, description=desc)
|
||||
@@ -175,7 +174,7 @@ class PlayerCommands(MixinMeta, metaclass=CompositeMetaClass):
|
||||
if not self._player_check(ctx):
|
||||
if self.lavalink_connection_aborted:
|
||||
msg = _("Connection to Lavalink node has failed")
|
||||
desc = EmptyEmbed
|
||||
desc = None
|
||||
if await self.bot.is_owner(ctx.author):
|
||||
desc = _("Please check your console or logs for details.")
|
||||
return await self.send_embed_msg(ctx, title=msg, description=desc)
|
||||
@@ -438,7 +437,7 @@ class PlayerCommands(MixinMeta, metaclass=CompositeMetaClass):
|
||||
if not self._player_check(ctx):
|
||||
if self.lavalink_connection_aborted:
|
||||
msg = _("Connection to Lavalink node has failed")
|
||||
desc = EmptyEmbed
|
||||
desc = None
|
||||
if await self.bot.is_owner(ctx.author):
|
||||
desc = _("Please check your console or logs for details.")
|
||||
return await self.send_embed_msg(ctx, title=msg, description=desc)
|
||||
@@ -554,7 +553,7 @@ class PlayerCommands(MixinMeta, metaclass=CompositeMetaClass):
|
||||
if not self._player_check(ctx):
|
||||
if self.lavalink_connection_aborted:
|
||||
msg = _("Connection to Lavalink node has failed")
|
||||
desc = EmptyEmbed
|
||||
desc = None
|
||||
if await self.bot.is_owner(ctx.author):
|
||||
desc = _("Please check your console or logs for details.")
|
||||
return await self.send_embed_msg(ctx, title=msg, description=desc)
|
||||
@@ -610,7 +609,7 @@ class PlayerCommands(MixinMeta, metaclass=CompositeMetaClass):
|
||||
except DatabaseError:
|
||||
notify_channel = player.fetch("notify_channel")
|
||||
if notify_channel:
|
||||
notify_channel = ctx.guild.get_channel(notify_channel)
|
||||
notify_channel = ctx.guild.get_channel_or_thread(notify_channel)
|
||||
await self.send_embed_msg(notify_channel, title=_("Couldn't get a valid track."))
|
||||
return
|
||||
except TrackEnqueueError:
|
||||
@@ -636,7 +635,8 @@ class PlayerCommands(MixinMeta, metaclass=CompositeMetaClass):
|
||||
|
||||
@commands.command(name="search")
|
||||
@commands.guild_only()
|
||||
@commands.bot_has_permissions(embed_links=True, add_reactions=True)
|
||||
@commands.bot_has_permissions(embed_links=True)
|
||||
@commands.bot_can_react()
|
||||
async def command_search(self, ctx: commands.Context, *, query: str):
|
||||
"""Pick a track with a search.
|
||||
|
||||
@@ -678,7 +678,7 @@ class PlayerCommands(MixinMeta, metaclass=CompositeMetaClass):
|
||||
if not self._player_check(ctx):
|
||||
if self.lavalink_connection_aborted:
|
||||
msg = _("Connection to Lavalink has failed")
|
||||
desc = EmptyEmbed
|
||||
desc = None
|
||||
if await self.bot.is_owner(ctx.author):
|
||||
desc = _("Please check your console or logs for details.")
|
||||
return await self.send_embed_msg(ctx, title=msg, description=desc)
|
||||
|
||||
@@ -38,7 +38,8 @@ _ = Translator("Audio", Path(__file__))
|
||||
class PlaylistCommands(MixinMeta, metaclass=CompositeMetaClass):
|
||||
@commands.group(name="playlist")
|
||||
@commands.guild_only()
|
||||
@commands.bot_has_permissions(embed_links=True, add_reactions=True)
|
||||
@commands.bot_has_permissions(embed_links=True)
|
||||
@commands.bot_can_react()
|
||||
async def command_playlist(self, ctx: commands.Context):
|
||||
"""Playlist configuration options.
|
||||
|
||||
@@ -263,9 +264,7 @@ class PlaylistCommands(MixinMeta, metaclass=CompositeMetaClass):
|
||||
ctx,
|
||||
title=_("Playlists Are Not Available"),
|
||||
description=_("The playlist section of Audio is currently unavailable"),
|
||||
footer=discord.Embed.Empty
|
||||
if not await self.bot.is_owner(ctx.author)
|
||||
else _("Check your logs."),
|
||||
footer=None if not await self.bot.is_owner(ctx.author) else _("Check your logs."),
|
||||
)
|
||||
if scope_data is None:
|
||||
scope_data = [
|
||||
@@ -392,9 +391,7 @@ class PlaylistCommands(MixinMeta, metaclass=CompositeMetaClass):
|
||||
ctx,
|
||||
title=_("Playlists Are Not Available"),
|
||||
description=_("The playlist section of Audio is currently unavailable"),
|
||||
footer=discord.Embed.Empty
|
||||
if not await self.bot.is_owner(ctx.author)
|
||||
else _("Check your logs."),
|
||||
footer=None if not await self.bot.is_owner(ctx.author) else _("Check your logs."),
|
||||
)
|
||||
if scope_data is None:
|
||||
scope_data = [None, ctx.author, ctx.guild, False]
|
||||
@@ -471,9 +468,7 @@ class PlaylistCommands(MixinMeta, metaclass=CompositeMetaClass):
|
||||
ctx,
|
||||
title=_("Playlists Are Not Available"),
|
||||
description=_("The playlist section of Audio is currently unavailable"),
|
||||
footer=discord.Embed.Empty
|
||||
if not await self.bot.is_owner(ctx.author)
|
||||
else _("Check your logs."),
|
||||
footer=None if not await self.bot.is_owner(ctx.author) else _("Check your logs."),
|
||||
)
|
||||
if scope_data is None:
|
||||
scope_data = [None, ctx.author, ctx.guild, False]
|
||||
@@ -561,9 +556,7 @@ class PlaylistCommands(MixinMeta, metaclass=CompositeMetaClass):
|
||||
ctx,
|
||||
title=_("Playlists Are Not Available"),
|
||||
description=_("The playlist section of Audio is currently unavailable"),
|
||||
footer=discord.Embed.Empty
|
||||
if not await self.bot.is_owner(ctx.author)
|
||||
else _("Check your logs."),
|
||||
footer=None if not await self.bot.is_owner(ctx.author) else _("Check your logs."),
|
||||
)
|
||||
async with ctx.typing():
|
||||
if scope_data is None:
|
||||
@@ -696,9 +689,7 @@ class PlaylistCommands(MixinMeta, metaclass=CompositeMetaClass):
|
||||
ctx,
|
||||
title=_("Playlists Are Not Available"),
|
||||
description=_("The playlist section of Audio is currently unavailable"),
|
||||
footer=discord.Embed.Empty
|
||||
if not await self.bot.is_owner(ctx.author)
|
||||
else _("Check your logs."),
|
||||
footer=None if not await self.bot.is_owner(ctx.author) else _("Check your logs."),
|
||||
)
|
||||
if scope_data is None:
|
||||
scope_data = [None, ctx.author, ctx.guild, False]
|
||||
@@ -829,9 +820,7 @@ class PlaylistCommands(MixinMeta, metaclass=CompositeMetaClass):
|
||||
ctx,
|
||||
title=_("Playlists Are Not Available"),
|
||||
description=_("The playlist section of Audio is currently unavailable"),
|
||||
footer=discord.Embed.Empty
|
||||
if not await self.bot.is_owner(ctx.author)
|
||||
else _("Check your logs."),
|
||||
footer=None if not await self.bot.is_owner(ctx.author) else _("Check your logs."),
|
||||
)
|
||||
if scope_data is None:
|
||||
scope_data = [None, ctx.author, ctx.guild, False]
|
||||
@@ -952,9 +941,7 @@ class PlaylistCommands(MixinMeta, metaclass=CompositeMetaClass):
|
||||
ctx,
|
||||
title=_("Playlists Are Not Available"),
|
||||
description=_("The playlist section of Audio is currently unavailable"),
|
||||
footer=discord.Embed.Empty
|
||||
if not await self.bot.is_owner(ctx.author)
|
||||
else _("Check your logs."),
|
||||
footer=None if not await self.bot.is_owner(ctx.author) else _("Check your logs."),
|
||||
)
|
||||
if scope_data is None:
|
||||
scope_data = [None, ctx.author, ctx.guild, False]
|
||||
@@ -1107,9 +1094,7 @@ class PlaylistCommands(MixinMeta, metaclass=CompositeMetaClass):
|
||||
ctx,
|
||||
title=_("Playlists Are Not Available"),
|
||||
description=_("The playlist section of Audio is currently unavailable"),
|
||||
footer=discord.Embed.Empty
|
||||
if not await self.bot.is_owner(ctx.author)
|
||||
else _("Check your logs."),
|
||||
footer=None if not await self.bot.is_owner(ctx.author) else _("Check your logs."),
|
||||
)
|
||||
async with ctx.typing():
|
||||
if scope_data is None:
|
||||
@@ -1217,9 +1202,7 @@ class PlaylistCommands(MixinMeta, metaclass=CompositeMetaClass):
|
||||
ctx,
|
||||
title=_("Playlists Are Not Available"),
|
||||
description=_("The playlist section of Audio is currently unavailable"),
|
||||
footer=discord.Embed.Empty
|
||||
if not await self.bot.is_owner(ctx.author)
|
||||
else _("Check your logs."),
|
||||
footer=None if not await self.bot.is_owner(ctx.author) else _("Check your logs."),
|
||||
)
|
||||
if scope_data is None:
|
||||
scope_data = [None, ctx.author, ctx.guild, False]
|
||||
@@ -1335,9 +1318,7 @@ class PlaylistCommands(MixinMeta, metaclass=CompositeMetaClass):
|
||||
ctx,
|
||||
title=_("Playlists Are Not Available"),
|
||||
description=_("The playlist section of Audio is currently unavailable"),
|
||||
footer=discord.Embed.Empty
|
||||
if not await self.bot.is_owner(ctx.author)
|
||||
else _("Check your logs."),
|
||||
footer=None if not await self.bot.is_owner(ctx.author) else _("Check your logs."),
|
||||
)
|
||||
if scope_data is None:
|
||||
scope_data = [None, ctx.author, ctx.guild, False]
|
||||
@@ -1461,9 +1442,7 @@ class PlaylistCommands(MixinMeta, metaclass=CompositeMetaClass):
|
||||
ctx,
|
||||
title=_("Playlists Are Not Available"),
|
||||
description=_("The playlist section of Audio is currently unavailable"),
|
||||
footer=discord.Embed.Empty
|
||||
if not await self.bot.is_owner(ctx.author)
|
||||
else _("Check your logs."),
|
||||
footer=None if not await self.bot.is_owner(ctx.author) else _("Check your logs."),
|
||||
)
|
||||
if scope_data is None:
|
||||
scope_data = [None, ctx.author, ctx.guild, False]
|
||||
@@ -1639,9 +1618,7 @@ class PlaylistCommands(MixinMeta, metaclass=CompositeMetaClass):
|
||||
ctx,
|
||||
title=_("Playlists Are Not Available"),
|
||||
description=_("The playlist section of Audio is currently unavailable"),
|
||||
footer=discord.Embed.Empty
|
||||
if not await self.bot.is_owner(ctx.author)
|
||||
else _("Check your logs."),
|
||||
footer=None if not await self.bot.is_owner(ctx.author) else _("Check your logs."),
|
||||
)
|
||||
if scope_data is None:
|
||||
scope_data = [None, ctx.author, ctx.guild, False]
|
||||
@@ -1810,9 +1787,7 @@ class PlaylistCommands(MixinMeta, metaclass=CompositeMetaClass):
|
||||
ctx,
|
||||
title=_("Playlists Are Not Available"),
|
||||
description=_("The playlist section of Audio is currently unavailable"),
|
||||
footer=discord.Embed.Empty
|
||||
if not await self.bot.is_owner(ctx.author)
|
||||
else _("Check your logs."),
|
||||
footer=None if not await self.bot.is_owner(ctx.author) else _("Check your logs."),
|
||||
)
|
||||
if scope_data is None:
|
||||
scope_data = [None, ctx.author, ctx.guild, False]
|
||||
@@ -1976,9 +1951,7 @@ class PlaylistCommands(MixinMeta, metaclass=CompositeMetaClass):
|
||||
ctx,
|
||||
title=_("Playlists Are Not Available"),
|
||||
description=_("The playlist section of Audio is currently unavailable"),
|
||||
footer=discord.Embed.Empty
|
||||
if not await self.bot.is_owner(ctx.author)
|
||||
else _("Check your logs."),
|
||||
footer=None if not await self.bot.is_owner(ctx.author) else _("Check your logs."),
|
||||
)
|
||||
if scope_data is None:
|
||||
scope_data = [None, ctx.author, ctx.guild, False]
|
||||
|
||||
@@ -33,7 +33,8 @@ _ = Translator("Audio", Path(__file__))
|
||||
class QueueCommands(MixinMeta, metaclass=CompositeMetaClass):
|
||||
@commands.group(name="queue", invoke_without_command=True)
|
||||
@commands.guild_only()
|
||||
@commands.bot_has_permissions(embed_links=True, add_reactions=True)
|
||||
@commands.bot_has_permissions(embed_links=True)
|
||||
@commands.bot_can_react()
|
||||
async def command_queue(self, ctx: commands.Context, *, page: int = 1):
|
||||
"""List the songs in the queue."""
|
||||
|
||||
|
||||
Reference in New Issue
Block a user