1
0

account for non-uuid messages in replay redemption
All checks were successful
Build & Publish / build (push) Successful in 3m33s

This commit is contained in:
Jannik Reimers 2025-04-05 22:24:33 +02:00
parent c49a29d461
commit 18852917cb
Signed by: jansel
GPG Key ID: 39C62D7D5233CFD0

View File

@ -39,7 +39,7 @@ class Twitch : KordExKoinComponent {
// Send a message to the channel // Send a message to the channel
val channel = botRef!!.kordRef.getGuildOrNull(Snowflake(1130932838200512584))!! val channel = botRef!!.kordRef.getGuildOrNull(Snowflake(1130932838200512584))!!
.getChannelOf<GuildMessageChannel>(Snowflake(1130954956892029060)) .getChannelOf<GuildMessageChannel>(Snowflake(1130954956892029060))
val replay = ReplayCollection().get(event.message) val replay = ReplayCollection().get(event.message) ?: return@launch
channel.createMessage { channel.createMessage {
content = "Replay redeemed by: ${event.user.name}" content = "Replay redeemed by: ${event.user.name}"
this.addFile("replay.osr", ChannelProvider(null) { ByteReadChannel(replay!!.replayFile) }) this.addFile("replay.osr", ChannelProvider(null) { ByteReadChannel(replay!!.replayFile) })