From 12517b3e0e3e5d93d2f9a04382750064787bb242 Mon Sep 17 00:00:00 2001 From: Sophia Liang Date: Thu, 25 Apr 2024 03:50:40 -0400 Subject: [PATCH] I passed a commands.Context object to extract the author id --- redbot/cogs/audio/apis/interface.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/redbot/cogs/audio/apis/interface.py b/redbot/cogs/audio/apis/interface.py index 1fa55ab0f93..4b393932404 100644 --- a/redbot/cogs/audio/apis/interface.py +++ b/redbot/cogs/audio/apis/interface.py @@ -921,7 +921,7 @@ async def fetch_track( ) return results, called_api - async def autoplay(self, player: lavalink.Player, playlist_api: PlaylistWrapper): + async def autoplay(self, ctx: commands.Context, player: lavalink.Player, playlist_api: PlaylistWrapper): """Enqueue a random track.""" autoplaylist = await self.config.guild(player.guild).autoplaylist() current_cache_level = CacheLevel(await self.config.cache_level()) @@ -937,7 +937,7 @@ async def autoplay(self, player: lavalink.Player, playlist_api: PlaylistWrapper) self.bot, playlist_api, player.guild, - player.guild.me, + ctx.author.id ) tracks = playlist.tracks_obj except Exception as exc: