Closed D0rs4n closed 2 years ago
If anyone would like to give suggestions regarding the wording, please do. I can easily change them, the core part is done, so now the wording the "priority".
Since you asked for one, I've gone through and reviewed all the language in this PR. It all looks great to me, I have no objections.. and I'm pretty anal when it comes to language.
I think this seems ready to merge, once the linter is appeased. Looks like there's some trailing whitespace to sort out.
Shouldn't have happened, I pushed a patch, the linter should work.
Okay, so Code Jam Management has been integrated into Sir Robin's CJ extension..but What changed?
First and foremost.. Roles!
I have added back team roles, and have updated the flows (later on those) accordingly!
Flows:
Creation flow:
So,
cj create
behaves a tiny bit differently. From now on, when you issue the command with a csv, you'll be sent a prompt to confirm, whether we actually want all that.. 😎 , you'll see how many channels, and roles will be created. Upon confirmation the roles and channel will be created, and another prompt will pop up. That's a new thing, you can announce the teams just by clickingAnnounce Teams
. That'll send a message with a view(discord.ui.View
) attached, to announcements pinging the participants. The view is a persistent(!!) view, hence it'll work across bot restarts. But what does that view do? It'll query the newly added Code Jam Management system, and send an ephemeral message to the user with all the details regarding their teams. Members, and the team channels will be pinged, for easy use, so no need to browse images in announcements hoping to find your team. (Just kidding I had no problems with it during the last two years)Delete flow:
That's implemented the same way, except the channel and roles ids are queried from the CJMGMT (that's how I'm going to refer to Code Jam Management from now on). The confirmation prompt uses discord views from now on, the list of channels and roles scheduled to be deleted will still be uploaded to pydis paste and attached as footer to the confirmation view.
Commands:
cj info
: General info about the participant: team name. Same way just queried from CJMGMTcj remove
: Remove the participant from the Jam, this command removes the CJ Leader role as well. (Previously it did not) - the logic has been decoupled and was moved to_flows
under the name ofremove_flow
cj move
: That was a tough one actually, this command is implemented the same way, except the database is updated accordingly, preserving team lead state._flows
under the name ofmove_flow
Note:
Test helpers
, and_autospec
have been ported from bot, that might make a diff a bit bigger, but it was necessary. Also if you want to change on any of the texts, I'm open to suggestions, since those are official announcements after all. :)if you have questions on how to set it up, don't hesitate to ping me or DM me on Discord. (Necessary env vars, will update docs on that(?), if needed.:
CHANNEL_CODE_JAM_PLANNING
CATEGORY_SUMMER_CODE_JAM
SUMMER_CODE_JAM_ANNOUNCEMENTS
ROLE_ADMINS
ROLE_CODE_JAM_EVENT_TEAM
ROLE_EVENTS_LEAD
CODE_JAM_PARTICIPANTS
)