#Trivia Bot Thread
1 messages · Page 1 of 1 (latest)
A
B
@sinful nexus saw the message! I'll be sure to check it out once I'm done with schoolwork
You did that really quickly too lol
yeah i didnt bother to make it good looking
i just added the functionality
that they wanted
this is the main part
but i recommend that you check out the two commands /ask /end
because they handle edge cases and shows how to handle active questions
alr!
I'll have to get on this later...
oreo you have an interesting plugin there
for the equal value and type (===) and the arrow function (=>)
So like what should the data visualization look like?
its up in the air, just something that makes sense and is accessible
Ight
Google sheets are apparently easy to work with now
With js if u use Google app stuff
no need, you can just export to csv and skip the api stuff
btw
If it was easy to convert to Google sheets
did you use prisma
ive actually never used an orm before

but i used it the other day for my wiki app and its great
or did you use something called sapphire
Both
Sapphire is just a framework for djs
U dont need need to use it since the logic in the commands will still be the same
ye i might just use plain ts
unless you recommend it a lot
I mean if I make a bot I always use sapphire, but since this both is solely gonna be for trivia I see no need for it.
Unless this bot will handle a lot of events in the future.
If it will
Then yes I recommend sapphire
It's very flexible
Almost as flexible as plain ts
so how are things here 
its going well but slow due to schoolwork
can work on it today
School goes first 
I'm having so many issues with docker 
When I tell docker to run some commands it doesn't work but when I tell it to run a script containing the exact same commands NOW it works
At least I can move on... 
Hopefully this was worth it for when it has to be deployed
Tbh I don't know if I can host it myself when the time comes
I guess it depends on when the Trivia event takes place and how much manpower we can muster
Theoretically having 6(+) people should make it easy compared to the previous one
But I was not there at the first trivia event so 
I don't think we'll run into performance issues unless we get like ~200 participants
I could be eating my words in a year or two
I would say that is to be expected 
The previous event had around that number no?
Really?
Huh
I suppose I can simulate a stress test
I would've thought the turnout would be lower since I got into the top active so quickly lol
I think I saved the trivia event participants list hold on
Yeah uh, the first trivia event was like during one of the heights of activity with the anime (still airing(?)) I think
A second trivia event with season 2 would probably be uh, comparable
Potentially more...
Okay so it was more like 158 I think, according to the results excel document, which you may already have 
Anyway the performance issues on the server side are pretty low, there could easily be 5k questions answered per second if it wasnt going through the discord api
That and the hardware it's run on
158? Alr I'll expect like 400 max
I'll assume everybody answers proportionally in 5 seconds or something
But that's later
5 seconds per question? I think that's really hopeful 
Hopeful for who
Like the people or the server
the people
Oh yeah for sure lol

Some of these questions absolutely cannot be answered in 5 seconds
(S1 trivia event)
Maybe they'll decide to do a warmup or something 
Like I said I can handle the hosting if you trust me
You could just store the message using a collector first
And then parse the questions after
That's the best way to keep performance consistent
Bc I don't think my old method will work if you're expecting 200+ competitors
Since it only fetches the last 100 msgs
Idk how much u can fetch
not all too much which is why i wont be doing that
yeah the graders wanted to go in manually afterwards so i think i was heading there
alr looks like the websocket can comfortably handle ~50-100 messages per second
which is great
ive never really seen that many being sent at once anyway
the delay is about ~150ms in the container id say so very small
testing the db load next
did a bit of optimization with setImmediate() and async stuff
not sure if it will make a difference
Are u gonna use mongo?
Postgres
Ah I see
If it's an issue I'll switch
Orm makes that easier
True
But there are some stuff that don't work in sqlite that works in postgres
I forgot what it was
Something to do with an array or something
I mean I could help if you want me to
For bigger projects I'd love to collab sometime
I'm planning a Pokémon type bot but for freiren characters where u collect cards based on characters and battle each other lol
Idk why
Just got that idea in school one day
Idk if I'll follow through with it
Real 
Sounds fun though!
I am also "working" on a frieren game
I figured out a way to not have to store the open or closed status of questions
Only the most recent question can be open and a question is only open if the bot has a listener on that channel which is something it already tracks
makes sense
@dry oyster alright the main system is done, very fast and type safe might I add :)
anyway if theres anything you want added or changed as the host let me know
you can only have 1 question open and in 1 channel, i did this to make it faster but i dont think that will be an issue
i dont know about the hosting situation but i built with docker so hopefully that will be made easier when the time comes
Ok this looks pretty nice
I haven't written any of the grading utilities stuff but that's easier
Can do point bonuses and other stuff
Does it pick up the right answers yet?
is this a private thread btw ? can't have the world know lol
Nah it's public but why not?
Nah, isulias and other ppl who did the grading say that they would rather just grade manually since people mispell stuff all the time
So it simply logs every message for grading later
@dry oyster you ARE going to be hosting right
i only really talked about it briefly more starting
also lmk about the other stuff
I'm gonna be honest with you dude
We will definitely make use of this and all that but errrrrrrrrrrrrrrrrrrrrrrrrrr I never recall announcing or planning a trivia event anytime soon
ye i kinda expected that
but someone did say better get started on that soon then or something like that
@swift sequoia #1292877165356122125 message
other messages in chat too
oh and i think @merry coyote was also interested
oreo and ravager already here
wait sacch created the thread
alr and thats good for now just in case nick wants to make private later
Cool
looks pretty solid
thanks a lot
when a levels aren’t killing me i’ll start work on a database, when i get on the wiki (hopefully)
a database?
of trivia
oh
no changes needed or prefered?
we should do a trial run at some point
yeah its kinda long so might not load well if youre on mobile
yeah the file type was unsupported on my phone for some reason
i saw it after i got on pc
its an mp4 
oh cool
discord mobile is just buns
i couldnt view it even after i downloaded it
To early to tell
Alr then
Ty for your feedback
Umm, when I get on the wiki I’ll make up a small test run database
Enough for you and me to test run
Alr
@gentle fable #1292877165356122125 message
oh you mean people's answers are already logged
I was confused because each question only ever has the one answer, which you create when you create the question, so I wasn't sure why we wouldn't have the answer lmao
yes!
i think people mentioned how there was a lot of different forms people gave their answers in so
no auto grading with a preset answer
yeah, I remember the discussion in the wiki channel
@merry coyote i just added role removal when the boosts expire
- made sure double boosting doesnt break anything
