|
|
@ -31,11 +31,14 @@ class_name MajorityJudgmentChatCommandJudgmentsProvider
|
|
|
|
#
|
|
|
|
#
|
|
|
|
# A0 B2 c0 D1
|
|
|
|
# A0 B2 c0 D1
|
|
|
|
#
|
|
|
|
#
|
|
|
|
|
|
|
|
# We would like to get word grades, because numbers, although handy,
|
|
|
|
|
|
|
|
# create a bias. They don't mean the same thing to everyone.
|
|
|
|
|
|
|
|
# See https://git.mieuxvoter.fr/MieuxVoter/majority-judgment-for-streamers/issues/12
|
|
|
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
|
|
func process_chat_command(author_identifier:String, chat_command:String):
|
|
|
|
func process_chat_command(author_identifier:String, chat_command:String):
|
|
|
|
var regex = RegEx.new()
|
|
|
|
var regex = RegEx.new()
|
|
|
|
regex.compile("(?<candidate>[a-zA-Z]{1})(?<grade>[0-9]{1})")
|
|
|
|
regex.compile("(?<candidate>[a-zA-Z]{2})[ ]*(?<grade>[0-9]{2})")
|
|
|
|
|
|
|
|
|
|
|
|
var results = regex.search_all(chat_command)
|
|
|
|
var results = regex.search_all(chat_command)
|
|
|
|
if results:
|
|
|
|
if results:
|
|
|
|