Skip to content

Commit

Permalink
Finish updates, remove verification
Browse files Browse the repository at this point in the history
  • Loading branch information
gdude2002 committed Feb 29, 2024
1 parent cda511b commit edcc9b3
Show file tree
Hide file tree
Showing 13 changed files with 25 additions and 1,022 deletions.
2 changes: 1 addition & 1 deletion gradle/wrapper/gradle-wrapper.properties
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
distributionUrl=https\://services.gradle.org/distributions/gradle-8.6-bin.zip
networkTimeout=10000
zipStoreBase=GRADLE_USER_HOME
zipStorePath=wrapper/dists
2 changes: 0 additions & 2 deletions settings.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,5 @@ enableFeaturePreview("TYPESAFE_PROJECT_ACCESSORS")
include(":module-log-parser")
include(":module-moderation")
include(":module-role-sync")
include(":module-tags")
include(":module-user-cleanup")
include(":module-welcome")
include(":module-ama")
2 changes: 0 additions & 2 deletions src/main/kotlin/org/quiltmc/community/App.kt
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,6 @@ suspend fun setupQuilt() = ExtensibleBot(DISCORD_TOKEN) {
}

extensions {
add(::ApplicationsExtension)
add(::FilterExtension)
add(::ForumExtension)
add(::LookupExtension)
Expand All @@ -114,7 +113,6 @@ suspend fun setupQuilt() = ExtensibleBot(DISCORD_TOKEN) {
add(::SuggestionsExtension)
add(::SyncExtension)
add(::UtilityExtension)
add(::VerificationExtension)

extPluralKit()

Expand Down
1 change: 0 additions & 1 deletion src/main/kotlin/org/quiltmc/community/_Utils.kt
Original file line number Diff line number Diff line change
Expand Up @@ -269,7 +269,6 @@ fun UserFlag.getName(): String = when (this) {
UserFlag.HouseBravery -> "HypeSquad: Bravery"
UserFlag.HouseBrilliance -> "HypeSquad: Brilliance"
UserFlag.HypeSquad -> "HypeSquad"
UserFlag.System -> "System User"
UserFlag.TeamUser -> "Team User"
UserFlag.VerifiedBot -> "Verified Bot"
UserFlag.VerifiedBotDeveloper -> "Early Verified Bot Developer"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ object Migrations : KordExKoinComponent {
21 -> ::v21
22 -> ::v22
23 -> ::v23
24 -> ::v24

else -> break
}(db.mongo)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ data class ServerSettings(

var commandPrefix: String? = "?",
val moderatorRoles: MutableSet<Snowflake> = mutableSetOf(),
var verificationRole: Snowflake? = null,

var cozyLogChannel: Snowflake? = null,
var filterLogChannel: Snowflake? = null,
Expand Down Expand Up @@ -157,14 +156,6 @@ data class ServerSettings(

builder.append("\n")

builder.append("**Verification role:** ")

if (verificationRole != null) {
builder.append("<@&$verificationRole>")
} else {
builder.append("N/A")
}

builder.append("\n\n")
builder.append("**__Moderator Roles__**\n")

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,11 @@
package org.quiltmc.community.database.entities

import com.github.jershell.kbson.UUIDSerializer
import com.kotlindiscord.kord.extensions.modules.extra.tags.data.Tag
import dev.kord.common.Color
import dev.kord.common.entity.Snowflake
import kotlinx.serialization.Serializable
import kotlinx.serialization.UseSerializers
import org.quiltmc.community.cozy.modules.tags.data.Tag
import org.quiltmc.community.database.Entity

@Serializable
Expand Down
19 changes: 19 additions & 0 deletions src/main/kotlin/org/quiltmc/community/database/migrations/v24.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
/*
* This Source Code Form is subject to the terms of the Mozilla Public
* License, v. 2.0. If a copy of the MPL was not distributed with this
* file, You can obtain one at https://mozilla.org/MPL/2.0/.
*/

package org.quiltmc.community.database.migrations

import com.mongodb.client.model.Updates
import org.litote.kmongo.EMPTY_BSON
import org.litote.kmongo.coroutine.CoroutineDatabase
import org.quiltmc.community.database.collections.ServerSettingsCollection

suspend fun v24(db: CoroutineDatabase) {
db.getCollection<ServerSettingsCollection>(ServerSettingsCollection.name).updateMany(
EMPTY_BSON,
Updates.unset("verificationRole")
)
}
Loading

0 comments on commit edcc9b3

Please sign in to comment.