Skip to content

Commit

Permalink
Add better message fallback when the stream info hasn't been loaded, …
Browse files Browse the repository at this point in the history
…change Twitch notification page title
  • Loading branch information
MrPowerGamerBR committed Oct 4, 2023
1 parent a121b93 commit 201b4a6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import kotlinx.serialization.json.decodeFromJsonElement
import kotlinx.serialization.json.jsonObject
import mu.KotlinLogging
import net.perfectdreams.loritta.cinnamon.pudding.tables.TwitchEventSubEvents
import net.perfectdreams.loritta.i18n.I18nKeysData
import net.perfectdreams.loritta.morenitta.LorittaBot
import net.perfectdreams.loritta.serializable.internal.requests.LorittaInternalRPCRequest
import net.perfectdreams.loritta.serializable.internal.responses.LorittaInternalRPCResponse
Expand Down Expand Up @@ -105,8 +106,8 @@ class PostTwitchEventSubCallbackRoute(val loritta: LorittaBot) : BaseRoute("/api
LorittaInternalRPCRequest.TwitchStreamOnlineEventRequest(
broadcasterUserIdAsLong,
broadcasterUserLogin,
stream?.title ?: "???",
stream?.gameName ?: "???"
stream?.title,
stream?.gameName
)
)
}
Expand Down
2 changes: 1 addition & 1 deletion resources/languages/pt/dashboard-twitch.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
website:
dashboard:
twitch:
title: "Twitch"
title: "Notificações da Twitch"
3 changes: 3 additions & 0 deletions resources/languages/pt/modules-twitch.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
modules:
twitch:
couldntGetLivestreamInformation: "Não foi possível pegar as informações da live" #Used for the stream title and stream game placeholders if Loritta failed to get the stream information

0 comments on commit 201b4a6

Please sign in to comment.