Skip to content

SpellBot v7 with Slash Commands#582

Merged
lexicalunit merged 0 commit into
masterfrom
version7
Oct 19, 2021
Merged

SpellBot v7 with Slash Commands#582
lexicalunit merged 0 commit into
masterfrom
version7

Conversation

@lexicalunit
Copy link
Copy Markdown
Owner

@lexicalunit lexicalunit commented Sep 7, 2021

Complete re-write to support slash commands.

  • /about
  • /lfg (looking for game)
    • friends: (create/join game with a list of mentioned players already joined)
    • seats: (how many player seats available at this game)
    • voice channel with invite
    • honor block lists clicking "join game" button
    • honor block lists when using /lfg
    • honor block lists when mentioning friends in a /lfg command
    • honor banned list when mentioning friends in a /lfg command
    • add !ban and !unban DM commands that only I use
    • ignore yourself if you mention yourself in /lfg as a friend
    • join and leave buttons
    • Remove join/leave buttons when the game starts
    • support for public/private links
    • DM users in the game when it starts
    • Post mini-embed with link to game when you are put into an existing one
    • Support for picking a game format (with assumed default number of seats)
    • Leave a game and join a different game when clicking on Join button not planned for v7.0
    • Post mini-CTA to a game you're in if you /lfg when you're already in a game not planned for v7.0
    • tags: (tag support for custom games) not planned for v7.0
    • note: free form notes attached to a game (upon creation) not planned for v7.0
  • /plays (how many games have you played on this server)
  • /block
    • users can block and unblock other users
  • /unblock
  • Server configuration commands
    • show/hide links
    • enable/disable voice channel creation
    • set server message of the day
    • set default number of seats for new games for a given channel
    • provide a way for admins to see what the current configuration is for their guild
  • background processing
    • delete old voice channels
    • Expire games after some period of time with no activity not planned for v7.0
  • Commands for event runners not planned for v7.0
  • User verification support (may not be possible, might need message content intents -- will have to apply for these when Discord opens up applications in the future)
  • Player awards based on number of games played
    • give out awards based on number of plays
    • allow admins to configure the awards on their server
  • Watch and unwatch moderator commands
    • context menu commands
    • note response
    • DM moderators when a watched user joins a game
    • command for admins to see current list of watched users for a guild
  • teams not planned for v7.0
  • power level not planned for v7.0
  • reporting & points
    • enable/disable show points for a server
    • allow users in a game to enter points (1 to 10) for a game
    • allow users to fetch information about points they have
    • show game format in score page
    • fetch recent game history in a channel
    • download fetched game histories as csv
    • pagination support
  • updated icon
  • TODOs
    • add a catchall for old message content commands telling the user to use slash commands instead
    • refactor src/spellbot/web/server.py
    • refactor safe_add_role() to use with suppress():
    • refactor BaseInteraction so that it doesn't fail in tests
    • refactor webserver code so it's all not just in a single __init__.py file
    • in lfg_interaction.py, log error (send message in channel?) if we can't give a user a role
    • in /awards embed, implement pagination
    • use Factory Boy with Faker in test: https://www.mybluelinux.com/database-integration-tests-with-pytest-sqlalchemy-and-factory-boy-with-faker/
    • build mocks for discord objects like ctx
    • refactor all ensure_X_exists() service calls into one central place?
    • move channel configuration list to a paginated embed via command: /channels
    • Add test for /score that checks that it counts games only for the current guild
  • metrics and instrumentation not planned for v7.0
  • script to migrate old data from pre-v7.0 database tables into new v7 tables.
  • 100% test coverage (so far we're up to 93%)
  • rewrite README.md
  • rewrite index.html
  • Create a privacy policy and set it here: https://discord.com/developers/applications/725510263251402832/information
    • added: PRIVACY_POLICY.md
    • add link to bot information once v7 is released
  • Create a terms of service and set it here: https://discord.com/developers/applications/725510263251402832/information
    • added: TERMS_OF_SERVICE.md
    • add link to bot information once v7 is released

Resolves #581

@codecov-commenter
Copy link
Copy Markdown

codecov-commenter commented Sep 7, 2021

Codecov Report

Merging #582 (920d186) into master (35649a7) will decrease coverage by 39.18%.
The diff coverage is 57.04%.

Impacted file tree graph

@@             Coverage Diff             @@
##           master     #582       +/-   ##
===========================================
- Coverage   94.58%   55.40%   -39.19%     
===========================================
  Files          69       35       -34     
  Lines        3547     1444     -2103     
  Branches      504      120      -384     
===========================================
- Hits         3355      800     -2555     
- Misses        128      627      +499     
+ Partials       64       17       -47     
Impacted Files Coverage Δ
src/spellbot/__init__.py 51.06% <ø> (-41.11%) ⬇️
src/spellbot/operations.py 12.94% <12.50%> (-69.76%) ⬇️
src/spellbot/interactions/lfg_interaction.py 29.23% <29.23%> (ø)
src/spellbot/interactions/config_interaction.py 31.48% <31.48%> (ø)
src/spellbot/interactions/leave_interaction.py 32.69% <32.69%> (ø)
src/spellbot/spelltable.py 36.36% <36.36%> (ø)
src/spellbot/cogs/tasks.py 40.67% <40.67%> (ø)
src/spellbot/services/games.py 42.55% <42.55%> (ø)
src/spellbot/interactions/plays_interaction.py 46.42% <46.42%> (ø)
src/spellbot/models/game.py 48.61% <48.61%> (ø)
... and 60 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 35649a7...920d186. Read the comment docs.

@lexicalunit lexicalunit force-pushed the version7 branch 11 times, most recently from 743bdd6 to 9f09b0f Compare September 13, 2021 03:35
@lexicalunit lexicalunit force-pushed the version7 branch 18 times, most recently from f97eb50 to 615de91 Compare September 21, 2021 19:41
@lexicalunit
Copy link
Copy Markdown
Owner Author

I'm going to merge this to master now. Further test coverage will come later as quick follow-on PRs. SpellBot won't be deployed until such time as we have 100% coverage.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate to slash commands before April 2022

2 participants