Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bot Command Message Interface #16

Open
5 of 10 tasks
j1mbl3s opened this issue Jan 31, 2020 · 5 comments
Open
5 of 10 tasks

Bot Command Message Interface #16

j1mbl3s opened this issue Jan 31, 2020 · 5 comments
Labels
RFC Request For Comments
Milestone

Comments

@j1mbl3s
Copy link
Contributor

j1mbl3s commented Jan 31, 2020

In an attempt to make this project a more generalized interface into LegiScan, I came up with commands that could be used for the Discord Bot. This interface makes certain implications about how the bot functions under the hood that I do not plan to discuss in this RFC issue.

Non-exhaustive list of implications that I will discuss here, as a part of the interface:

  1. The command prefix word !legi is used as a consistency for my idea regarding the bot name, LegiBot (see Rename project #14 (comment)).
  2. A command is the second word of a message, after the !legi prefix word.
  3. The words following a command are individual arguments, where a single argument can be captured by double quotes ("") where a space ( ) is needed during use.
  4. A forward slash (/) in a command or argument defined here denotes that any, and only one, of the words split by the slash can be used.
  5. Argument words are defined here by angle brackets (<>) and should follow some format. Argument definitions within double quotes ("") are a defined format. Argument words surrounded by square brackets ([]) are optional.
  6. Potential use of a bulk command where (s) is found in the arguments/description.
  7. Scheduled commands are given some identifier to be used for unscheduling.
  8. All of the commands relate to a specific channel and should be usable in any channel that the bot has access to on Discord.
  9. Creating or removing a schedule or watched bill would be restricted to admins/mods in some way (see Method of checking if a user is an admin #10).

Message Interface:

  • !legi help [<command>] displays bot commands and info. DM responses may be preferred.
  • !legi query/scan <state code(s)/"all"> <query> [<schedule>] performs a query, optionally on a schedule. Hard coded queries could also be implemented and used by adding an additional static string argument after query/scan, denoting that the <query> argument refers to one that is hard coded.
  • !legi ignore <bill id(s)> <schedule id(s)> ignores a specific bill(s) for a scheduled query(s).
  • !legi bill <bill id(s)> [<schedule>] displays a bill(s) info, optionally on a schedule.
  • !legi watch <bill id(s)> watches for changes to a bill(s) as they are retrieved from master server. Perhaps a way to display changes only during certain times of the day could be useful for highly active channels.
  • !legi schedules displays scheduled queries and bills. For scheduled queries, displaying the ignored bills may be helpful.
  • !legi watches displays watched bills.
  • !legi unschedule <schedule id(s)> unschedules a previously scheduled query(s) and/or bill(s).
  • !legi unwatch <bill id(s)> unwatches a previously watched bill(s).
  • !legi unignore <bill id(s)> <schedule id(s)> unignores a previously ignored bill(s) for a scheduled query(s).

This original "spec" was posted in the Discord and subsequently modified. Slightly.

@x47188 x47188 added Feature Improvements or additions to the bot. RFC Request For Comments and removed Feature Improvements or additions to the bot. labels Jan 31, 2020
@finnbear
Copy link
Member

finnbear commented Feb 1, 2020

This would do a good job of making the bot mirror interaction with LegiScan but that isn't really the goal (at least not the minimum goal).

While we absolutely need a mechanism for watching/unwatching bills (#9), we may not need advanced query commands. In the case that a user specifies their own query via an advanced command, it is unclear whether the results should be eligible for automatic watching.

@finnbear
Copy link
Member

finnbear commented Feb 1, 2020

Also I don't think we need to schedule individual bills. We could schedule scans of all bills instead. If you meant scheduling a manual reminder, that might be something to think about.

@j1mbl3s
Copy link
Contributor Author

j1mbl3s commented Feb 1, 2020

This would do a good job of making the bot mirror interaction with LegiScan but that isn't really the goal (at least not the minimum goal).

Right, this would be a v2 interface.

While we absolutely need a mechanism for watching/unwatching bills (#9), we may not need advanced query commands. In the case that a user specifies their own query via an advanced command, it is unclear whether the results should be eligible for automatic watching.

The idea behind more advanced queries was such that a bot would be publicly available for other Discord Servers to use as well. We wouldn't know every topic or movement that other users would want to follow, and therefore we wouldn't want to hard code everything.
Whether watched bills should be included in queries is a discussion for implementation.

If you meant scheduling a manual reminder, that might be something to think about.

This was the use case that I had in mind. The initial issue mention that a watching a bill watches for changes - it may be days before a bill's status changes, so reminders about it would be nice.

@j1mbl3s
Copy link
Contributor Author

j1mbl3s commented Feb 1, 2020

Amended original issue with unignore command.

@x47188 x47188 added this to the V2 milestone Feb 2, 2020
@finnbear
Copy link
Member

finnbear commented Feb 6, 2020

Prefixes (including stuff like !legi) are now supported by config prefix command

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RFC Request For Comments
Projects
None yet
Development

No branches or pull requests

3 participants