Developer-DAO / Developer-DAO/devie-bot

Adding a new Resource requires an Author, but can't list them all yet

Open
#20 0 comments 0 reactions 0 assignees View on GitHub
enhancement help wanted
Dominant language
TypeScript
Stars
29
Forks
8
PR merge metrics
No merged PRs in 30d

Description

## Problem
When adding a new Resource the Author field is currently required. Currently the list of Authors is restricted to 25 as this is the maximum number of options that can be listed in a Select Menu for discord. [Discord documentation](https://discord.com/developers/docs/interactions/message-components)

We need a new approach for selecting Authors as part of the `/add-resource` command.

I have thought about a few approaches that could be taken, but other ideas are welcome.

### 1) Make Author Optional
This would make it possible to add Resources without an Author and therefore allow submissions to continue.
**Pros**
Simple change
Immediately allows submissions of articles where the Authors are currently not listed
**Cons**
Data quality is reduced
Authors should be searchable

### 2) Add Paging Options
Change the first (apart from the first page) and last options in the Select Menu to be _paging_ selections
**Pros**
Allows all Authors to be listed (eventually)
Possibly a simple code change
**Cons**
Finding an Author near the end of the list will take a long time

### 3) Create an _index_ strategy
Sort all of the Authors into buckets, with a maximum of 25 entries at each level, e.g.

```
A-B
|-> Aa - Ag
|-> Aaron Aardvaark
Aaron Smith
Abbey Mills
...
Agatha Doe
```
**Pros**
Potentially faster average time to find authors
Should be possible to list all authors
**Cons**
Relies on consistent naming of Authors to make sense to users. e.g. Firstname, Surname or Surname, Firstname

### 4) Autocomplete Interaction
It should be possible to create an [Autocomplete Message Interaction](https://discord.com/developers/docs/interactions/application-commands#autocomplete) to allow _searching_ for Authors.
**Pros**
Makes it possible to search for an Author
**Cons**
This does not seem to be supported by discord.js at this time

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.