Games-Gamers / FamBot

FAM
3 stars 0 forks source link

f.time doesn't always respond with the correct timeframe response #56

Closed WikiWikiWasp closed 2 years ago

WikiWikiWasp commented 2 years ago

Description

The f.time command should respond as such:

time(24h) condition response
03-21 no fam in VCs "not yet, fam, but soon"
03-21 fam in VCs "normally, no, but I see some fam in VCs now!"
22-02 no fam in VCs "it's that time of night, fam"
22-02 fam in 1-3 VCs the above message + "we're faming in voicechannelname"

It seems to work sometimes but not others, even with one of the matching conditions shown above.

I believe the issue lies in how the time is initially captured with datetime.now() and will need to be tweaked for more consistency.

Examples

Example of when the response should have been "its that time of night, fam"

image

Suggestions

Some suggestions off the top of my head:

  1. Set a specific timezone using datetime.now(timezone=cdst) or something similar
  2. Ensure the "now" time isn't resetting when called multiple times for some reason
  3. Put the "current" time in the __init__ and make the conditional comparisons based on that

Acceptance Criteria


Notes

n/a

WikiWikiWasp commented 2 years ago

Turns out the example given in the description was due to a simple error in using > instead of >=. Looking into the voice channel responses once more users join for testing

WikiWikiWasp commented 2 years ago

since this fix was just a single character, I pushed it straight to the main branch instead of going through the feature>main PR process for just that change