|
|
@@ -5,7 +5,13 @@ class TeamJoinApplication < ApplicationForm
|
|
|
@process ||= Application.new('Team Join Request') do |event|
|
|
|
# Calculate majority and check votes
|
|
|
maj = majority(event)
|
|
|
- check_votes(event, maj)
|
|
|
+
|
|
|
+ # Check votes
|
|
|
+ if reactions[Emoji::Y]&.count.to_i > maj
|
|
|
+ approve(event)
|
|
|
+ elsif reactions[Emoji::N]&.count.to_i > maj
|
|
|
+ deny(event)
|
|
|
+ end
|
|
|
|
|
|
rescue StandardError => e
|
|
|
error_embed(e.message)
|