becca-lyria icon indicating copy to clipboard operation
becca-lyria copied to clipboard

[FEAT] - Question Of The Day with Becca!

Open Vyvy-vi opened this issue 3 years ago β€’ 16 comments

What feature would you like to see?

A Question Of The Day feature.

It would be really great if the unreliable QOTD bot can be replaced by Becca :D And that way maybe we can also get more fun questions.

Additional information

No response

Vyvy-vi avatar Dec 24 '21 21:12 Vyvy-vi

I think we'd need to iron out some implementation approaches. Ideally in a way that will scale.

naomi-lgbt avatar Jan 24 '22 22:01 naomi-lgbt

Okay,

In order for this to work, we will need to do a few things:

  • We will need to add config options to set the channel, and to set the hour for the CRON (in UTC), and optionally a role to ping.
  • We will need to load in a bunch of questions.
  • We will need to track which questions have been asked in a server. (I don't have an implementation idea for this yet...)

We can probably shove these under a new qotd top-level command.

naomi-lgbt avatar Aug 27 '22 06:08 naomi-lgbt

Hey @naomi-lgbt! I'm not sure what your plans are for implementing this, but Heptagram API has a qotd endpoint.

You can find the endpoint here, and the docs are up to date here.

Currently the endpoint is very simple, but the goal with Heptagram API is to tailor it to bots, so I am happy to change and adapt the endpoint to make it work for this implementation!

Just let me know!!

jaspermayone avatar Aug 28 '22 01:08 jaspermayone

Just saw that those docs don't have the endpoint 🀦. When I get home tomorrow, I will have those docs updated. The endpoint is currently there tho! You can do a get request on it, and it should return a random one.

jaspermayone avatar Aug 28 '22 01:08 jaspermayone

I'd be happy to consider it.

The biggest things are being able to track which questions have already been sent, and servers being able to load custom questions.

naomi-lgbt avatar Aug 28 '22 06:08 naomi-lgbt

Awesome! Re: the docs, they should now be deployed, and up to date.

What would make the tracking able to happen? Currently a response to the endpoint looks like this

{
    "_id": "62aa53296e2e5cdfd27bd4b1",
    "id": "c19034ba-9364-4d31-b700-61600a056c18",
    "uniqueID": "90",
    "qotd": "What outdoor activity haven’t you tried, but would like to?",
    "dateUploaded": "2022-05-06T23:00:40.452Z",
    "__v": 0
}

It is kind of messy right now, but we can use either "id" or "uniqueID and a new endpoint to be able to specifically call certain questions. uniqueID may make the most sense, because it is sequential, instead of randomly generated.

jaspermayone avatar Aug 30 '22 09:08 jaspermayone

Let me know what you think, I am open to suggestions, and want to make this as easy as possible for you!

jaspermayone avatar Aug 30 '22 09:08 jaspermayone

Currently the DB has 351 qotds, but we can expand that significantly.

jaspermayone avatar Aug 30 '22 10:08 jaspermayone

@naomi-lgbt, what do you think?

jaspermayone avatar Sep 01 '22 14:09 jaspermayone

For this to work, we would need:

  • Either a way to pass a list of questions that we want to exclude from the random questions OR a way to pull down all the questions at once (so we can do the filter logic locally)
  • Assurance that the uniqueID will never change when new questions are added.

naomi-lgbt avatar Sep 01 '22 16:09 naomi-lgbt

Hey @naomi-lgbt, I would love to take this on...

jaspermayone avatar Oct 08 '22 18:10 jaspermayone

For this to work, we would need:

  • Either a way to pass a list of questions that we want to exclude from the random questions OR a way to pull down all the questions at once (so we can do the filter logic locally)
  • Assurance that the uniqueID will never change when new questions are added.

I am working on routes to make those things possible

jaspermayone avatar Oct 08 '22 18:10 jaspermayone

Is this also blocked until the config overhaul?

jaspermayone avatar Oct 08 '22 18:10 jaspermayone

Yes.

naomi-lgbt avatar Oct 08 '22 18:10 naomi-lgbt

I will focus on the API side while I wait then. πŸ˜„

jaspermayone avatar Oct 08 '22 19:10 jaspermayone

Would love to take this once I finish my other issue

jaspermayone avatar Oct 19 '22 02:10 jaspermayone

@naomi-lgbt, with the API temporarily removed from the scam link detection, would you prefer we don't use it for QOTDs?

jaspermayone avatar Oct 25 '22 13:10 jaspermayone

Nah, we can totally use it for QOTDs - this isn't a feature that will result in erroneous kicks/bans so we're all good.

naomi-lgbt avatar Oct 25 '22 17:10 naomi-lgbt

πŸ‘πŸ»

jaspermayone avatar Oct 25 '22 19:10 jaspermayone

image

jaspermayone avatar Oct 27 '22 00:10 jaspermayone

You can filter out now....

jaspermayone avatar Oct 27 '22 00:10 jaspermayone

API is all set to go!

jaspermayone avatar Oct 27 '22 00:10 jaspermayone

The IDs will never change for an QOTD

jaspermayone avatar Oct 27 '22 00:10 jaspermayone

Loading up the database now, but we have 1505 qotds in there now

jaspermayone avatar Oct 27 '22 01:10 jaspermayone