Skip to content
This repository has been archived by the owner on Oct 10, 2024. It is now read-only.

Add /history command #27

Merged
merged 22 commits into from
Jul 11, 2021
Merged

Add /history command #27

merged 22 commits into from
Jul 11, 2021

Conversation

TimJentzsch
Copy link
Contributor

@TimJentzsch TimJentzsch commented Jun 16, 2021

Relevant issue: Closes #21.

Description:

Adds a /history command which creates a plot of the user's gamma over time. Multiple users can be provided to be plotted together.

Unfortunately, they are not correct yet due to the wrong dates in the Blossom API (GrafeasGroup/blossom#157).

What's missing in comparison to the old bot is that you can't specify a time frame to restrict the graph to. I am not sure yet how to integrate this properly with the Discord commands, so I want to move this to a separate issue. It's also not used that often, so we can omit it for now.

The command takes about 2.5 seconds for each provided user, which is a bit long. But it's a big improvement to the 45 seconds we had with a previous iteration. Maybe we can optimize the rate command in the API for shorter delays.

Screenshots:

Single user graph

Multi user graph

Checklist:

  • Code Quality
  • Pep-8
  • Tests (if applicable)
  • Success Criteria Met
  • Inline Documentation
  • Wiki Documentation (if applicable)

@TimJentzsch TimJentzsch changed the title Add history command Add /history command Jun 29, 2021
@TimJentzsch TimJentzsch force-pushed the 21-history-command branch from eb11f03 to 9b83686 Compare July 8, 2021 13:22
@TimJentzsch TimJentzsch force-pushed the 21-history-command branch 2 times, most recently from 024b455 to d5e194b Compare July 8, 2021 14:44
@TimJentzsch TimJentzsch marked this pull request as ready for review July 8, 2021 14:50
@TimJentzsch TimJentzsch requested a review from a team as a code owner July 8, 2021 14:50
@TimJentzsch TimJentzsch force-pushed the 21-history-command branch from d5e194b to f028dd4 Compare July 8, 2021 14:59
buttercup/cogs/history.py Outdated Show resolved Hide resolved
buttercup/cogs/helpers.py Show resolved Hide resolved
@TimJentzsch TimJentzsch mentioned this pull request Jul 10, 2021
11 tasks
@TimJentzsch TimJentzsch merged commit 28cad48 into master Jul 11, 2021
@TimJentzsch TimJentzsch deleted the 21-history-command branch July 11, 2021 12:01
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add /history command
2 participants