Skip to content

Commit

Permalink
fix bug in issue formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
Bohaska authored Mar 3, 2023
1 parent bb857da commit a0e3002
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions nationstates_ai.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,10 @@ def format_issue(ns_issue: Issue):
{ns_issue.text}
The Debate"""
index = 1
for option in ns_issue.options:
formatted_issue += f"""\n\n{option.id + 1}. {option.text}"""
formatted_issue += f"""\n\n{index}. {option.text}"""
index += 1
return formatted_issue


Expand Down Expand Up @@ -120,7 +122,7 @@ def execute_issues(nation: str, password: str, issues: list, x_pin: str, hf_head
selected_option = int(selected_option.strip())
print(selected_option)
logging.info(selected_option)
selected_option=issue.options[selected_option-1].id
selected_option = issue.options[selected_option-1].id
logging.info(f"Final option ID: {selected_option}")
except ValueError:
selected_option = selected_option.strip()
Expand Down

0 comments on commit a0e3002

Please sign in to comment.