account for non-uuid messages in replay redemption
This commit is contained in:
parent
c49a29d461
commit
18852917cb
1 changed files with 1 additions and 1 deletions
|
@ -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) })
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue