gnmiller / craig-bot

discord bot
GNU General Public License v3.0
1 stars 0 forks source link

multi youtube search #3

Open gnmiller opened 1 year ago

gnmiller commented 1 year ago

If a user prompts the bot multiple times with !yt in a row without explicitly selecting a result each time the bot will happily continue to spit out YouTube searches. Expected functionality is that each user should only be able to execute one search per channel per guild.

gnmiller commented 1 year ago

simple possible fix is to make get_selection()

return something more sensible if an int is not passed as the arg

gnmiller commented 1 year ago

i exceeded my quota testing today main issue appears to be add_search() is executing the list.append() multiple times once a search has started.Same issue across guilds as well as channels within the same guild.

ex serv1: $yt some search -> correctly added to guild's search array serv2: $yt another search -> added TWICE to the array

same behavior within same server, and using two channels, the second search is duplicated into the array