@@ -26,7 +26,6 @@ import ml.duncte123.skybot.Variables
2626import ml.duncte123.skybot.objects.command.CommandContext
2727import ml.duncte123.skybot.objects.command.MusicCommand
2828import ml.duncte123.skybot.utils.AudioUtils
29- import net.dv8tion.jda.api.entities.Guild
3029import net.dv8tion.jda.api.events.interaction.command.SlashCommandInteractionEvent
3130import net.dv8tion.jda.api.utils.FileUpload
3231import java.time.ZonedDateTime
@@ -42,7 +41,7 @@ class SaveCommand : MusicCommand() {
4241 ctx.channel.sendMessage(" ${ctx.author.asTag} , here is the queue which can be re-imported with `${ctx.prefix} load`" )
4342 .addFiles(
4443 FileUpload .fromData(
45- toByteArray(ctx.guild , ctx.audioUtils, ctx.variables.jackson),
44+ toByteArray(ctx.guildId , ctx.audioUtils, ctx.variables.jackson),
4645 " playlist-${getDatabaseDateFormat(ZonedDateTime .now())} .json"
4746 )
4847 )
@@ -53,9 +52,9 @@ class SaveCommand : MusicCommand() {
5352 event.reply(" Slash command not supported yet, sorry. Please report this issue." ).queue()
5453 }
5554
56- private fun toByteArray (guild : Guild , audioUtils : AudioUtils , mapper : ObjectMapper ): ByteArray {
55+ private fun toByteArray (guildId : Long , audioUtils : AudioUtils , mapper : ObjectMapper ): ByteArray {
5756 val array = mapper.createArrayNode()
58- val manager = audioUtils.getMusicManager(guild )
57+ val manager = audioUtils.getMusicManager(guildId )
5958
6059 val urls = manager.scheduler.queue
6160 .map {
0 commit comments