This commit is contained in:
parent
036083448d
commit
72a52925cd
@ -9,6 +9,7 @@ import dev.jansel.aglaea.logger
|
||||
import dev.jansel.aglaea.twitchClient
|
||||
import dev.kord.common.entity.Snowflake
|
||||
import dev.kord.core.behavior.channel.createMessage
|
||||
import dev.kord.core.behavior.getChannelOf
|
||||
import dev.kord.core.entity.channel.GuildMessageChannel
|
||||
import dev.kordex.core.koin.KordExKoinComponent
|
||||
import io.ktor.client.request.forms.*
|
||||
@ -35,9 +36,10 @@ class Twitch : KordExKoinComponent {
|
||||
runBlocking {
|
||||
launch {
|
||||
// Send a message to the channel
|
||||
val channel = botRef!!.kordRef.getChannelOf<GuildMessageChannel>(Snowflake(1130954956892029060))
|
||||
val channel = botRef!!.kordRef.getGuildOrNull(Snowflake(1130932838200512584))!!
|
||||
.getChannelOf<GuildMessageChannel>(Snowflake(1130954956892029060))
|
||||
val replay = ReplayCollection().get(event.message)
|
||||
channel!!.createMessage {
|
||||
channel.createMessage {
|
||||
content = "Channel points redeemed: ${event.customRewardId.get()}"
|
||||
this.addFile("replay.osr", ChannelProvider(null) { ByteReadChannel(replay!!.replayFile) })
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user