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

Revamp the discord interaction format #1320

Open
m-haisham opened this issue Mar 30, 2022 Discussed in #1318 · 0 comments
Open

Revamp the discord interaction format #1320

m-haisham opened this issue Mar 30, 2022 Discussed in #1318 · 0 comments
Assignees
Labels
discord-bot feature Feature suggestion

Comments

@m-haisham
Copy link

Discussed in #1318

Originally posted by mensch272 March 30, 2022

Proposal

I'm essentially proposing forgoing the current start and the other choices that follow by introducing a small domain-specific language.

Grammar

The following describes the grammar in a readable manner.

Download => [download] <url> [from <from:int>] [to <to:int>] [into <...target:str>]
Select   => [select] <option:int>
Close    => close [session]
Search   => search [with] <key:any>
Status   => [show] status

Where [optional] <input>

Example

Usecase 1: Download with just URL

The user sends the following message in the private channel:

https://www.webnovel.com/book/my-vampire-system_16709365405930105

This falls under the download rule, hence the bot will fill in the other options with defaults (ex: from=0 to=end, target=['epub']) and create a new download session.

Usecase 2: Download with other information

The user sends the message:

https://www.webnovel.com/book/my-vampire-system_16709365405930105 from 25 to 100 into epub, text, html

The bot will then start a download session using the provided information.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
discord-bot feature Feature suggestion
Projects
None yet
Development

No branches or pull requests

2 participants