1
Fork 0
mirror of https://github.com/RYGhub/royalnet.git synced 2024-11-27 13:34:28 +00:00

Fix !playmode bug

This commit is contained in:
Steffo 2019-11-04 09:32:28 +01:00
parent 78956a231d
commit 816cd42d09

View file

@ -29,14 +29,14 @@ class PlaymodeCommand(Command):
guild = list(bot.client.guilds)[0] guild = list(bot.client.guilds)[0]
# Delete the previous PlayMode, if it exists # Delete the previous PlayMode, if it exists
if bot.music_data[guild] is not None: if bot.music_data[guild] is not None:
bot.music_data[guild].delete() bot.music_data[guild].playmode.delete()
# Create the new PlayMode # Create the new PlayMode
if mode_name == "playlist": if mode_name == "playlist":
bot.music_data[guild] = Playlist() bot.music_data[guild].playmode = Playlist()
elif mode_name == "pool": elif mode_name == "pool":
bot.music_data[guild] = Pool() bot.music_data[guild].playmode = Pool()
elif mode_name == "layers": elif mode_name == "layers":
bot.music_data[guild] = Layers() bot.music_data[guild].playmode = Layers()
else: else:
raise CommandError("Unknown PlayMode specified.") raise CommandError("Unknown PlayMode specified.")
return {} return {}