mirror of
https://github.com/migatu/conjurer.git
synced 2026-07-14 21:38:38 +00:00
bgfx
This commit is contained in:
+1
-1
@@ -801,7 +801,7 @@ class MusicModule(commands.Cog):
|
||||
|
||||
async def setup(bot):
|
||||
logger = logging.getLogger("discord")
|
||||
await music_functions.MUSIC_FILE_LIST.refresh_file_list()
|
||||
await music_functions.MUSIC_FILE_LIST.refresh_file_list(bot)
|
||||
logger.info("Playlist generation")
|
||||
await bot.add_cog(MusicModule(bot, "discord"))
|
||||
logger.info("Loading music commands module done")
|
||||
|
||||
+4
-4
@@ -29,13 +29,13 @@ class MusicFileList(object):
|
||||
file service or local directory and update the list with new items.
|
||||
"""
|
||||
|
||||
def __init__(self, uplogger) -> None:
|
||||
def __init__(self, uplogger,) -> None:
|
||||
self.music_file_list = []
|
||||
self.file_service_active = False
|
||||
self.logger = uplogger
|
||||
self.logger.info("Created Playlist organizer class")
|
||||
|
||||
async def refresh_file_list(self):
|
||||
async def refresh_file_list(self, bot):
|
||||
"""
|
||||
The `refresh_file_list` function attempts to connect to a file service to retrieve a list of music
|
||||
files, and if unsuccessful, it populates the list by scanning a local directory for .mp3 files.
|
||||
@@ -70,10 +70,10 @@ class MusicFileList(object):
|
||||
radio_hardkor = discord.Streaming(
|
||||
name="Radio Hardkor", url="http://95.175.16.246:666/mp3-stream"
|
||||
)
|
||||
await self.bot.change_presence(status=status, activity=radio_hardkor)
|
||||
await bot.change_presence(status=status, activity=radio_hardkor)
|
||||
|
||||
else:
|
||||
await self.bot.change_presence(
|
||||
await bot.change_presence(
|
||||
activity=discord.Game(name="Axe Throwing Darts")
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user