mirror of
https://github.com/Cog-Creators/Red-DiscordBot.git
synced 2025-11-06 11:18:54 -05:00
[Audio] Fix DM Crash (#3880)
Signed-off-by: Drapersniper <27962761+drapersniper@users.noreply.github.com>
This commit is contained in:
parent
e3322af384
commit
17496ff5cf
@ -44,17 +44,19 @@ class DpyEvents(MixinMeta, metaclass=CompositeMetaClass):
|
|||||||
# notify_channel = player.fetch("channel")
|
# notify_channel = player.fetch("channel")
|
||||||
# if not notify_channel:
|
# if not notify_channel:
|
||||||
# player.store("channel", ctx.channel.id)
|
# player.store("channel", ctx.channel.id)
|
||||||
|
self._daily_global_playlist_cache.setdefault(
|
||||||
|
self.bot.user.id, await self.config.daily_playlists()
|
||||||
|
)
|
||||||
|
if self.local_folder_current_path is None:
|
||||||
|
self.local_folder_current_path = Path(await self.config.localpath())
|
||||||
|
if not ctx.guild:
|
||||||
|
return
|
||||||
dj_enabled = self._dj_status_cache.setdefault(
|
dj_enabled = self._dj_status_cache.setdefault(
|
||||||
ctx.guild.id, await self.config.guild(ctx.guild).dj_enabled()
|
ctx.guild.id, await self.config.guild(ctx.guild).dj_enabled()
|
||||||
)
|
)
|
||||||
self._daily_playlist_cache.setdefault(
|
self._daily_playlist_cache.setdefault(
|
||||||
ctx.guild.id, await self.config.guild(ctx.guild).daily_playlists()
|
ctx.guild.id, await self.config.guild(ctx.guild).daily_playlists()
|
||||||
)
|
)
|
||||||
self._daily_global_playlist_cache.setdefault(
|
|
||||||
self.bot.user.id, await self.config.daily_playlists()
|
|
||||||
)
|
|
||||||
if self.local_folder_current_path is None:
|
|
||||||
self.local_folder_current_path = Path(await self.config.localpath())
|
|
||||||
if dj_enabled:
|
if dj_enabled:
|
||||||
dj_role = self._dj_role_cache.setdefault(
|
dj_role = self._dj_role_cache.setdefault(
|
||||||
ctx.guild.id, await self.config.guild(ctx.guild).dj_role()
|
ctx.guild.id, await self.config.guild(ctx.guild).dj_role()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user