Skip to content

Commit

Permalink
how tf did this never work (it does now tho
Browse files Browse the repository at this point in the history
  • Loading branch information
NotJansel committed Dec 3, 2024
1 parent 4f5dc82 commit 6fb1e79
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 2 deletions.
2 changes: 1 addition & 1 deletion gradle/libs.versions.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ jansi = "2.4.1"
kx-ser = "1.7.3"
logback = "1.5.12"
logback-groovy = "1.14.5"
logging = "7.0.0"
logging = "7.0.3"
twitch4j = "1.23.0"
events4j = "0.12.2"
kx-coroutines = "1.9.0"
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package dev.jansel.feixiao.extensions

import dev.jansel.feixiao.database.collections.StreamerCollection
import dev.jansel.feixiao.database.entities.StreamerData
import dev.jansel.feixiao.i18n.Translations
import dev.jansel.feixiao.twitchClient
import dev.kord.common.entity.Permission
Expand All @@ -14,6 +15,7 @@ import dev.kordex.core.commands.converters.impl.optionalString
import dev.kordex.core.commands.converters.impl.string
import dev.kordex.core.extensions.Extension
import dev.kordex.core.extensions.publicSlashCommand
import org.litote.kmongo.eq

class StreamerCommand : Extension() {
override val name = "streaming"
Expand Down Expand Up @@ -54,7 +56,9 @@ class StreamerCommand : Extension() {
}
action {
val streamer = arguments.streamer
StreamerCollection().removeData(guild!!.id, channel.id, streamer, null, null)
StreamerCollection().collection.findOne(StreamerData::name eq streamer)?.servers?.forEach {
StreamerCollection().removeData(it.guildId, it.channelId, streamer, it.roleId, it.liveMessage)
}
respond {
content = "Removed streamer $streamer"
}
Expand Down

0 comments on commit 6fb1e79

Please sign in to comment.