Create Queryable Adapter #101

Open
opened 2020-06-05 04:05:45 +01:00 by Ghost · 0 comments
Ghost commented 2020-06-05 04:05:45 +01:00 (Migrated from codeberg.org)

Feature Request

Sub-Project

Description

There are times when a command has a parameter where the Adapter may need to perform a search.
For example, on Discord a command might want to take that emote as a parameter, so it needs that emote, but it doesn't want to accept a list of multiple emotes.

The search for that emote may find multiple results, so the only choice is to assume which one the user wanted in the Adapter,

We should provide a standard mechanism for queryable parameters, ie a Queryable<Emote> object which can be which can be used by a manually implemented Adapter<Queryable<Emote>> or just a QueryableAdapter<Emote> implementation.

Instead of having to implement an interface to find a single item, it can be used to populate a Queryable with multiple results which can be in the command.

# Feature Request <!-- If you feel a heading is irrelevant, just leave it empty or remove it. --> ## Sub-Project <!-- Can you specify which sub-project(s) this is relevant to? If you aren't sure, or this is a proposal for a new sub-project, you can delete this. --> ## Description <!-- Explain what this is about, try to use full sentences, and make your point clear. --> There are times when a command has a parameter where the `Adapter` may need to perform a search. For example, on Discord a command might want to take that emote as a parameter, so it needs that emote, but it doesn't want to accept a list of multiple emotes. The search for that emote may find multiple results, so the only choice is to assume which one the user wanted in the `Adapter`, We should provide a standard mechanism for queryable parameters, ie a `Queryable<Emote>` object which can be which can be used by a manually implemented `Adapter<Queryable<Emote>>` or just a `QueryableAdapter<Emote>` implementation. Instead of having to implement an interface to find a single item, it can be used to populate a `Queryable` with multiple results which can be in the command.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
SethFalco/commandler#101
No description provided.