Skip to content

Commit

Permalink
Fix issues created by previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
DRSchlaubi committed Sep 28, 2024
1 parent 187898b commit c2ee0a2
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -8,17 +8,11 @@ import dev.schlaubi.mikmusic.commands.commands
import dev.schlaubi.mikmusic.context.playMessageAction
import dev.schlaubi.mikmusic.core.MusicExtensionPoint
import dev.schlaubi.mikmusic.core.MusicModule
import dev.schlaubi.mikmusic.playlist.TrackListSerializer
import dev.schlaubi.mikmusic.playlist.commands.PlaylistModule
import org.litote.kmongo.serialization.registerSerializer
import org.pf4j.Extension

@PluginMain
class MusicCommandsPlugin(context: PluginContext) : Plugin(context) {
override fun start() {
registerSerializer(TrackListSerializer)
}

override fun ExtensibleBotBuilder.ExtensionsBuilder.addExtensions() {
add(::PlaylistModule)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import dev.schlaubi.mikmusic.autocomplete.autoCompletedYouTubeQuery
import dev.schlaubi.mikmusic.player.queue.QueueOptions
import dev.schlaubi.mikmusic.player.queue.findTracks
import dev.schlaubi.mikmusic.playlist.PlaylistDatabase
import dev.schlaubi.mikmusic.playlist.mapToEncoded
import dev.schlaubi.mikmusic.util.mapToEncoded

class PlaylistAddArguments : PlaylistArguments(), QueueOptions {
override val query by autoCompletedYouTubeQuery("commands.playlist.add.arguments.query.description")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import dev.schlaubi.mikmusic.player.queue.QueueOptions
import dev.schlaubi.mikmusic.player.queue.findTracks
import dev.schlaubi.mikmusic.playlist.Playlist
import dev.schlaubi.mikmusic.playlist.PlaylistDatabase
import dev.schlaubi.mikmusic.playlist.mapToEncoded
import dev.schlaubi.mikmusic.util.mapToEncoded
import org.litote.kmongo.newId

class PlaylistSaveArguments : Arguments(), QueueOptions {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,12 @@ import dev.schlaubi.mikmusic.player.MusicPlayer
import dev.schlaubi.mikmusic.player.PersistentPlayerState
import dev.schlaubi.mikmusic.player.applyToPlayer
import dev.schlaubi.mikmusic.player.voiceStateWatcher
import dev.schlaubi.mikmusic.util.TrackLinkedListSerializer
import dev.schlaubi.mikmusic.util.TrackListSerializer
import kotlinx.coroutines.coroutineScope
import kotlinx.coroutines.launch
import org.koin.core.component.inject
import org.litote.kmongo.serialization.registerSerializer
import org.pf4j.ExtensionPoint
import kotlin.reflect.KMutableProperty1

Expand Down Expand Up @@ -70,6 +73,8 @@ class MusicModule(context: PluginContext) : MikBotModule(context) {
}

override suspend fun setup() {
registerSerializer(TrackListSerializer)
registerSerializer(TrackLinkedListSerializer)
context.pluginSystem.getExtensions<MusicExtensionPoint>().forEach {
with(it) {
overrideSetup()
Expand Down

0 comments on commit c2ee0a2

Please sign in to comment.