Skip to content

Commit

Permalink
Fix event convenience function
Browse files Browse the repository at this point in the history
  • Loading branch information
DRSchlaubi committed Aug 2, 2023
1 parent 8b7bb44 commit a6d9d67
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/github-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ jobs:
name: Publish artifacts
runs-on: ubuntu-20.04
needs: build
if: github.ref == 'refs/heads/main'
if: startsWith(github.ref, 'refs/tags/')
env:
SONATYPE_KEY: ${{ secrets.SONATYPE_KEY }}
SONATYPE_USER: ${{ secrets.SONATYPE_USER }}
Expand Down
2 changes: 1 addition & 1 deletion build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ plugins {
}

group = "dev.schlaubi.lavakord"
version = "5.1.4"
version = "5.1.5"

allprojects {
repositories {
Expand Down
3 changes: 3 additions & 0 deletions core/src/commonMain/kotlin/dev/schlaubi/lavakord/Plugin.kt
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
package dev.schlaubi.lavakord

import dev.schlaubi.lavakord.audio.Event
import dev.schlaubi.lavakord.audio.TrackStartEvent
import dev.schlaubi.lavakord.audio.on
import dev.schlaubi.lavakord.audio.player.Player
import kotlinx.serialization.json.JsonElement
import dev.arbjerg.lavalink.protocol.v4.Plugin as RestPlugin

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,7 @@ public interface StatsEvent {
*
* @see defaultOn
*/
public inline fun <reified T : TrackEvent> EventSource<TrackEvent>.on(
public inline fun <reified T : Event> EventSource<Event>.on(
scope: CoroutineScope = coroutineScope,
noinline consumer: suspend T.() -> Unit
): Job = defaultOn<_, T>(scope, consumer)

0 comments on commit a6d9d67

Please sign in to comment.