Skip to content

Commit

Permalink
every? returns a bool, not a seq
Browse files Browse the repository at this point in the history
  • Loading branch information
plexus committed Aug 26, 2024
1 parent ffddda0 commit 58d46d6
Showing 1 changed file with 14 additions and 15 deletions.
29 changes: 14 additions & 15 deletions src/co/gaiwan/compass/services/discord.clj
Original file line number Diff line number Diff line change
Expand Up @@ -57,21 +57,20 @@
(str "/guilds/" (config/value :discord/server-id)
"/members/" user-id
"/roles/" role-id))))]
(doall
(every? (fn [slug]
(if-let [response (add-role! slug)]
(= 202 (:status response))
true))
(cond-> [slug]
(#{"crew"
"sponsor"
"speaker"
"diversity-ticket"
"early-bird"
"regular-conference"
"late-conference"
"student"} slug)
(conj "regular-ticket"))))))
(every? (fn [slug]
(if-let [response (add-role! slug)]
(= 202 (:status response))
true))
(cond-> [slug]
(#{"crew"
"sponsor"
"speaker"
"diversity-ticket"
"early-bird"
"regular-conference"
"late-conference"
"student"} slug)
(conj "regular-ticket")))))

;; NOTE: we originally wanted to use the linked roles Discord feature, but the UX of that turned out to be crap.
;; So now we don't use it anymore and assign configured roles directly
Expand Down

0 comments on commit 58d46d6

Please sign in to comment.