Module modpol.interactions

INTERACTIONS.LUA (CLI).

User interaction functions for Modular Politics Called by modpol.lua

Functions

modpol.interactions.dashboard (user) Output: Display a menu of commands to the user
modpol.interactions.org_dashboard (user, org_string) Output: Displays a menu of org-specific commands to the user
modpol.interactions.message (user, message) Output: Prints message to CLI
modpol.interactions.text_query (user, query, func) Output: Applies "func" to user input.
modpol.interactions.dropdown_query (user, label, options, func) Output: Calls func on choice.
modpol.binary_poll_user (user, question, func) Output: Applies "func" to user input.
modpol.interactions.message_org (initiator, org, message) Output: broadcasts message to all org members


Functions

modpol.interactions.dashboard (user)
Output: Display a menu of commands to the user

Parameters:

  • user (string)
modpol.interactions.org_dashboard (user, org_string)
Output: Displays a menu of org-specific commands to the user

Parameters:

  • user (string)
  • org_string (string or id)
modpol.interactions.message (user, message)
Output: Prints message to CLI

Parameters:

  • user (string)
  • message (string)
modpol.interactions.text_query (user, query, func)
Output: Applies "func" to user input. Func input: user input (string)

Parameters:

  • user (string)
  • query (string)
  • func (function)
modpol.interactions.dropdown_query (user, label, options, func)
Output: Calls func on choice. func input: choice (string)

Parameters:

  • user (string)
  • label (string)
  • options (table of strings)
  • func (choice) (function)
modpol.binary_poll_user (user, question, func)
Output: Applies "func" to user input. Func input: user input (string: y/n)

Parameters:

  • user (string)
  • question (string)
  • func (function)
modpol.interactions.message_org (initiator, org, message)
Output: broadcasts message to all org members

Parameters:

  • initiator (string)
  • org (number or string)
  • message (string)
generated by LDoc 1.4.6 Last updated 2022-01-20 10:54:01