Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(role_welcome): new cog #293

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

feat(role_welcome): new cog #293

wants to merge 1 commit into from

Conversation

tigattack
Copy link
Member

Initial Checklist

  • Has @tigattack / @issy been added as a reviewer?
  • If applicable, have the relevant project(s), milestone(s), and label(s) been applied?
  • If applicable, have you added details of the cog to the readme as per README.md?

Details

TL;DR: This cog welcomes users who are new to a defined role. Mods can set a trigger role, templated welcome message, welcome channel, and more (see readme).

Does this resolve an issue?

Not logged, but yes. Cba writing a reasonable explanation so here's my 3 AM ramblings:

ok so one thing I need to do before actually making this [jail cog] usable is to tweak our verify cog
Or, tbh, just strip out the one, tiny part of it that we still actually use and make it its own cog lol
The verify cog does a ton of cool stuff that we just don't use anymore, it's from back when we had a far more customised and involved user join process
All we use it for these days is join messages ("Welcome, user!"), triggered by someone having a defined role (Labbers role) applied
The problem there is that it triggers when someone is removed from a jail, since the labbers role is reapplied to them
I worked around this with the timeout cog by adding a feature to the verify cog to exclude roles from the welcome trigger lol, super hacky now I think about it tbh, but it works™️
However, that won't work for this since a new role is created for each jail instance.
Sooo.... I guess the easiest way is to just validate that the user has actually joined somewhat recently
<some time later>
Actually gonna go for a different approach which eliminates any scope for false triggers - Trigger when a user gets the Labbers role, welcome the user and add them to a stored list of welcomed users, then remove them from that list if they leave the server, so all it has to do is check the list of welcomed users to prevent false triggers.

Note: functionality has changed slightly from that described in my ramblings above. Take this as description of my motivation for the cog rather than the cog itself. See docs.

Changes

Features / Fixes

  • Adds role_welcome cog

Breaking Changes

Additional

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.

1 participant