diff options
| author | 2022-01-27 09:55:26 +0000 | |
|---|---|---|
| committer | 2022-01-27 09:55:26 +0000 | |
| commit | b9df3f2ba73c12cd0b4f32e3007bd6bdc9944fd1 (patch) | |
| tree | 388708a1454987f90744749af292549241380f01 | |
| parent | Add voice_ban stub commands (diff) | |
| parent | Add missing restart-policy to metricity container (diff) | |
Merge branch 'main' into voicemute
Diffstat (limited to '')
| -rw-r--r-- | .github/workflows/lint-test.yml | 4 | ||||
| -rw-r--r-- | bot/exts/moderation/infraction/superstarify.py | 8 | ||||
| -rw-r--r-- | bot/resources/tags/contribute.md | 2 | ||||
| -rw-r--r-- | docker-compose.yml | 1 | 
4 files changed, 12 insertions, 3 deletions
| diff --git a/.github/workflows/lint-test.yml b/.github/workflows/lint-test.yml index f2c9dfb6c..57cc544d9 100644 --- a/.github/workflows/lint-test.yml +++ b/.github/workflows/lint-test.yml @@ -46,6 +46,10 @@ jobs:        PYTHONUSERBASE: ${{ github.workspace }}/.cache/py-user-base        PRE_COMMIT_HOME: ${{ github.workspace }}/.cache/pre-commit-cache +      # See https://github.com/pre-commit/pre-commit/issues/2178#issuecomment-1002163763 +      # for why we set this. +      SETUPTOOLS_USE_DISTUTILS: stdlib +      steps:        - name: Add custom PYTHONUSERBASE to PATH          run: echo '${{ env.PYTHONUSERBASE }}/bin/' >> $GITHUB_PATH diff --git a/bot/exts/moderation/infraction/superstarify.py b/bot/exts/moderation/infraction/superstarify.py index a037ca1be..3f1bffd76 100644 --- a/bot/exts/moderation/infraction/superstarify.py +++ b/bot/exts/moderation/infraction/superstarify.py @@ -57,7 +57,9 @@ class Superstarify(InfractionScheduler, Cog):              return          infraction = active_superstarifies[0] -        forced_nick = self.get_nick(infraction["id"], before.id) +        infr_id = infraction["id"] + +        forced_nick = self.get_nick(infr_id, before.id)          if after.display_name == forced_nick:              return  # Nick change was triggered by this event. Ignore. @@ -67,11 +69,13 @@ class Superstarify(InfractionScheduler, Cog):          )          await after.edit(              nick=forced_nick, -            reason=f"Superstarified member tried to escape the prison: {infraction['id']}" +            reason=f"Superstarified member tried to escape the prison: {infr_id}"          )          notified = await _utils.notify_infraction( +            bot=self.bot,              user=after, +            infr_id=infr_id,              infr_type="Superstarify",              expires_at=time.discord_timestamp(infraction["expires_at"]),              reason=( diff --git a/bot/resources/tags/contribute.md b/bot/resources/tags/contribute.md index 070975646..50c5cd11f 100644 --- a/bot/resources/tags/contribute.md +++ b/bot/resources/tags/contribute.md @@ -7,6 +7,6 @@ Looking to contribute to Open Source Projects for the first time? Want to add a  • [Site](https://github.com/python-discord/site) - resources, guides, and more  **Where to start** -1. Read our [contributing guidelines](https://pythondiscord.com/pages/guides/pydis-guides/contributing/) +1. Read our [contribution guide](https://pythondiscord.com/pages/guides/pydis-guides/contributing/)  2. Chat with us in <#635950537262759947> if you're ready to jump in or have any questions  3. Open an issue or ask to be assigned to an issue to work on diff --git a/docker-compose.yml b/docker-compose.yml index 869d9acb6..ce78f65aa 100644 --- a/docker-compose.yml +++ b/docker-compose.yml @@ -38,6 +38,7 @@ services:    metricity:      << : *logging +    << : *restart_policy      restart: on-failure  # USE_METRICITY=false will stop the container, so this ensures it only restarts on error      depends_on:        postgres: | 
