Skip to content

Commit 9d67d35

Browse files
committed
Role manager: don't force fetch if data seems correct
1 parent 284facf commit 9d67d35

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

botfest/src/main/kotlin/net/modfest/botfest/extensions/RoleManager.kt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -285,6 +285,10 @@ class RoleManager : Extension(), KordExKoinComponent {
285285
roleDiff.removeIf { !managed.contains(it) } // Only work on managed roles
286286
roleDiff.removeIf { !roles!!.contains(it) } // Only work on roles that we know actually exist
287287

288+
if (roleDiff.isEmpty()) {
289+
return
290+
}
291+
288292
try {
289293
roleDiff.toAdd.forEach { role ->
290294
logger.info { "Adding `$role` to $user (in $MAIN_GUILD_ID)" }

0 commit comments

Comments
 (0)