A supplemental tool for F3 regions to get more out of their data! WeaselBot is a Slack bot designed to get the PAX in your region more engaged, here's what he can do:
Please note - the first two features rely on data from PAXMiner. If you haven't already installed that and incorporated into your region (which you should anyway!), do that first and then come back here!
You will be creating the structure for WeaselBot, but I will run it from my end (similar to PAXMiner). There are some steps you need to take to set it up, and then some information I will need from you to add your instance to my daily runs.
Create New App
From an app manifest
, and select your region's workspaceCreate
:display_information:
name: WeaselBot
description: "Hi there! I'm a bot created by @Moneyball in F3 St. Charles and maintained by @Sumo in F3 Chicago to do some stuff like #achievement-unlocked."
background_color: '#2c2d30'
features:
bot_user:
display_name: WeaselBot
always_online: true
oauth_config:
scopes:
bot:
- app_mentions:read
- channels:join
- channels:read
- chat:write
- files:read
- files:write
- im:read
- reactions:write
- users:read
- channels:history
settings:
org_deploy_enabled: false
socket_mode_enabled: false
token_rotation_enabled: false
Basic Information
):Or you can use ChatGPT or your favorite AI image generator to create your own avatar. Get creative. It's fun.
Oauth & Permissions
on your bot page, and copy / save the Bot User Auth Token
#achievements-unlocked
. Copy that new channel's Channel ID
. You can find this on Desktop by clicking on the dropdown for the channel, the channel's ID will be at the bottom.@Sumo (Chicago)
on the F3 Nation Slack the following info:
xoxb
.If enabled, WeaselBot will pull your PAXMiner data daily to see if any of your PAX have crossed certain activity thresholds. If they have, and if they haven't already been awarded them (as per the achievements_awarded
table), WeaselBot will give them a shout-out in your #achievements-unlocked
channel and add the award to your achievements_awarded
table. This table in turn drives the achievements_view
view, which you can use in your region's dashboard / reporting for a cool "trophy case".
Please note that the 6-Pack achievement is a weekly achievement. When a PAX earns 6-Pack the first time in a year, a message is sent to #achievements-unlcoked
. All subsequent 6-Pack achievements for that PAX are sent as a DM to that PAX. This is the only achievement that displays this behavior.
achievements_list
table#qsource
#blackops
#rucking
@Sumo (Chicago)
on the Nation Slack if you're seeing undesired behavior.You can add manual achievements in your region for things like "run a 5k" or "complete a GrowRuck GTE". Here are the steps to using this functionality:
achievements_list
table (follow the PAXMiner instructions for using DBeaver or something similar). You will need to specify the achievement's name, a description (for trophy cases, etc), a "verb" (essentially just the description in verb form) and a code to uniquely identify the achievement#achievements-unlocked
channel and WeaselBot will know not to include themIf enabled, once a week WeaselBot will check your PAXMiner data and see if any of your PAX have hit certain thresholds of inactivity - right now, that is set at 2 weeks of not having posted anywhere, but less than 4 weeks of not having posted anywhere (to prevent WeaselBot from including them for the rest of time). PAX are also tracked based on their last Q, and guys without Qs or a long time since will be included on the report. These values are configurable. Please notify @Sumo (Chicago)
on the Nation Slack if you'd like to customize the values for your region.
WeaselBot compiles this list, then sends reports out. At a minimum, the full list will be sent to a user you specify. If desired, the list can also be aggregated by those PAX "home AO", as determined by their recent posting history. If you specify your Site Qs, those lists will be sent to them according to their AO.
...
and then Copy Member ID
(you can also find these on your users
table)aos
table for Site QsWe're always happy to take PRs! Below are instructions for running Weaselbot locally for development.
git clone https://github.com/F3Nation-Community/weaselbot.git
cd weaselbot
poetry env use /path/to/python3.12
poetry install
.env.example
, rename to .env
and fill credentials (ask Moneyball for these). Otherwise, create your own local db and use your own credentials.poetry run python script_name.py
pre-commit install
to install the pre commit hooks (I'll eventually apply these as Github Actions on pushes to main
)poetry run pytest
, which automatically runs all tests in the tests/
folder