From 09db8bc3bade646cf8cb5b498f90107c1185906a Mon Sep 17 00:00:00 2001 From: Gareth Coles Date: Sun, 25 Feb 2024 17:13:18 +0000 Subject: [PATCH] Bump Sentry --- gradle/libs.versions.toml | 2 +- .../extensions/builders/ExtensibleBotBuilder.kt | 16 ++++++++-------- .../kord/extensions/sentry/SentryAdapter.kt | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 57ab988174..fb153f5a10 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -26,7 +26,7 @@ logging = "6.0.3" mongodb = "4.11.1" pf4j = "3.10.0" semver = "1.4.2" -sentry = "7.3.0" +sentry = "7.4.0" slf4j = "2.0.12" time4j-base = "5.9.4" time4j-tzdata = "5.0-2023b" diff --git a/kord-extensions/src/main/kotlin/com/kotlindiscord/kord/extensions/builders/ExtensibleBotBuilder.kt b/kord-extensions/src/main/kotlin/com/kotlindiscord/kord/extensions/builders/ExtensibleBotBuilder.kt index 15fe4cc84a..e221b30a21 100644 --- a/kord-extensions/src/main/kotlin/com/kotlindiscord/kord/extensions/builders/ExtensibleBotBuilder.kt +++ b/kord-extensions/src/main/kotlin/com/kotlindiscord/kord/extensions/builders/ExtensibleBotBuilder.kt @@ -698,14 +698,14 @@ public open class ExtensibleBotBuilder { * required. */ public open var setupCallback: SentryAdapter.() -> Unit = { - this.init { - dsn = dsn - isDebug = debug - - dist = distribution - environment = environment - release = release - serverName = serverName + this.init { options -> + options.dsn = dsn + options.isDebug = debug + + options.dist = distribution + options.environment = environment + options.release = release + options.serverName = serverName } } diff --git a/kord-extensions/src/main/kotlin/com/kotlindiscord/kord/extensions/sentry/SentryAdapter.kt b/kord-extensions/src/main/kotlin/com/kotlindiscord/kord/extensions/sentry/SentryAdapter.kt index 287950affa..f3df2a17c1 100644 --- a/kord-extensions/src/main/kotlin/com/kotlindiscord/kord/extensions/sentry/SentryAdapter.kt +++ b/kord-extensions/src/main/kotlin/com/kotlindiscord/kord/extensions/sentry/SentryAdapter.kt @@ -75,7 +75,7 @@ public open class SentryAdapter : KordExKoinComponent { * function instead for brevity. Please see the Sentry documentation for * information on how to configure it. */ - public fun init(callback: SentryOptions.() -> Unit) { + public fun init(callback: (SentryOptions) -> Unit) { Sentry.init(callback) this._enabled = true