mirror of
https://github.com/SpudGunMan/meshing-around.git
synced 2026-07-04 00:41:35 +02:00
enhance
This commit is contained in:
@@ -173,7 +173,7 @@ Players can `q: join` to join the game, `q: leave` to leave the game, `q: score`
|
||||
To Answer a question, just type the answer prefixed with `q: <answer>`.
|
||||
|
||||
#### Survey
|
||||
To use the Survey feature edit the json files in data/survey multiple surveys are possible.
|
||||
To use the Survey feature edit the json files in data/survey multiple surveys are possible such as `survey snow`
|
||||
|
||||
## Other Install Options
|
||||
|
||||
|
||||
@@ -947,6 +947,7 @@ def surveyHandler(message, nodeID, deviceID):
|
||||
if nodeID not in survey_module.responses:
|
||||
msg = survey_module.start_survey(user_id=nodeID, survey_name=surveySays, location=location)
|
||||
else:
|
||||
# Process the answer
|
||||
msg = survey_module.answer(user_id=nodeID, answer=surveySays, location=location)
|
||||
|
||||
return msg
|
||||
|
||||
+1
-1
@@ -92,7 +92,7 @@ class SurveyModule:
|
||||
location = self.responses[user_id].get('location')
|
||||
row.insert(1 if surveyRecordID else 0, str(location) if location is not None else "N/A")
|
||||
f.write(','.join(row) + '\n')
|
||||
logger.info(f"Responses saved to {filename}")
|
||||
logger.info(f"Survey: Responses for user {user_id} saved for survey '{survey_name}' to {filename}.")
|
||||
except Exception as e:
|
||||
logger.error(f"Error saving responses to {filename}: {e}")
|
||||
|
||||
|
||||
Reference in New Issue
Block a user