Skip to content

Commit

Permalink
Hopefully fix error spam in thread inviter
Browse files Browse the repository at this point in the history
  • Loading branch information
NoComment1105 committed Jun 15, 2022
1 parent 21009ca commit 6a0113b
Showing 1 changed file with 0 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,6 @@ import com.kotlindiscord.kord.extensions.utils.isNullOrBot
import com.kotlindiscord.kord.extensions.utils.respond
import dev.kord.common.entity.ArchiveDuration
import dev.kord.common.entity.MessageType
import dev.kord.common.entity.Permission
import dev.kord.common.entity.Permissions
import dev.kord.core.behavior.UserBehavior
import dev.kord.core.behavior.channel.asChannelOf
import dev.kord.core.behavior.channel.withTyping
Expand All @@ -33,7 +31,6 @@ import kotlinx.coroutines.delay
import kotlinx.coroutines.flow.last
import net.irisshaders.lilybot.api.pluralkit.PluralKit
import net.irisshaders.lilybot.utils.DatabaseHelper
import net.irisshaders.lilybot.utils.botHasChannelPerms
import net.irisshaders.lilybot.utils.configPresent
import kotlin.time.Duration.Companion.seconds

Expand Down Expand Up @@ -77,21 +74,6 @@ class ThreadInviter : Extension() {
config.supportTeam ?: return@action
config.supportChannel ?: return@action

this@event.check {
botHasChannelPerms(
config.supportChannel,
Permissions(
Permission.SendMessages,
Permission.CreatePublicThreads,
Permission.SendMessagesInThreads
)
)
botHasChannelPerms(
config.modActionLog,
Permissions(Permission.SendMessages, Permission.EmbedLinks)
)
}

var userThreadExists = false
var existingUserThread: TextChannelThread? = null
val textChannel = event.message.getChannel().asChannelOf<TextChannel>()
Expand Down

0 comments on commit 6a0113b

Please sign in to comment.