PythonTwitchBotFramework icon indicating copy to clipboard operation
PythonTwitchBotFramework copied to clipboard

add random quote command

Open sharkbound opened this issue 5 years ago • 1 comments

sharkbound avatar Dec 07 '20 06:12 sharkbound

few issues i ran into when trying this:

  1. the sql random functions change per database
  2. the universal solutions involves loading ALL quotes into a list, then choosing one, this has the potential to use quite a bit of memory with a larger quote DB

to get around this, i can pick a random int (based on max id quote), then see if it exists, then choose it, but it has potential to failed A LOT if the ID's are wide in range, (aka 1, 100, 101) exists, so it can draw 2-99 quite a few times before it draws 1,100, or 101.

will continue to investigate

sharkbound avatar Dec 10 '20 04:12 sharkbound