aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeLines
...
* | | | | | | | | | | | | | | | | | | | Merge pull request #1286 from python-discord/kubernetes-deployGravatar Joe Banks2020-11-19-3/+195
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
| * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Merge branch 'master' into kubernetes-deployGravatar Leon Sandøy2020-11-19-286/+486
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | |
* | | | | | | | | | | | | | | | | | | | | Merge pull request #1290 from ↵Gravatar Sebastiaan Zeeff2020-11-19-59/+80
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | python-discord/sebastiaan/backend/improve-actions-workflow Ensure flake8 actually lints pull requests
| * | | | | | | | | | | | | | | | | | | | | Add comment explaining buildx to workflowGravatar Sebastiaan Zeeff2020-11-19-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's better to document these steps. Signed-off-by: Sebastiaan Zeeff <[email protected]>
| * | | | | | | | | | | | | | | | | | | | | Use GHCR image tags in PipfileGravatar Sebastiaan Zeeff2020-11-18-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sebastiaan Zeeff <[email protected]>
| * | | | | | | | | | | | | | | | | | | | | Update badges in README to new workflowsGravatar Sebastiaan Zeeff2020-11-18-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Sebastiaan Zeeff <[email protected]>
| * | | | | | | | | | | | | | | | | | | | | Make sure we lint the actual pull requestGravatar Sebastiaan Zeeff2020-11-18-55/+64
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Unfortunately, our old setup did not actually lint the PR, as it was running in the context of the target repository. To sidestep the issue of using `pull_request_target` altogether, I've now changed our run of flake8 to using it directly and having it output its errors in teh format of Workflow Commands. This means that our flake8 output will not be translated automatically in annotations for the run. In addition, I've split up the workflow into two separate files: one for linting & testing and one for building (& deploying). Signed-off-by: Sebastiaan Zeeff <[email protected]>
| * | | | | | | | | | | | | | | | | | | | | Pull snekbox image from GHCR in docker-composeGravatar Sebastiaan Zeeff2020-11-18-1/+1
|/ / / / / / / / / / / / / / / / / / / / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're in the process of migrating snekbox to the GitHub Container Repository, which will replace DockerHub. I've changed docker-compose to reflect that change. Signed-off-by: Sebastiaan Zeeff <[email protected]>
* | | | | | | | | | | | | | | | | | | | | Merge pull request #1245 - global bot instanceGravatar Mark2020-11-16-282/+304
|\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \
| * \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ Merge master and fix conflictsGravatar MarkKoz2020-11-16-747/+1885
| |\ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / / / / / / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | | | | | Set up Sentry when running rather than upon importGravatar MarkKoz2020-10-17-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It was causing an error if a DSN was not configured. It also feels wrong and confusing to attempt to make a connection just upon import.
| * | | | | | | | | | | | | | | | | | | | | Move bot creation code from __main__.py to bot.pyGravatar MarkKoz2020-10-17-53/+58
| | | | | | | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | | | | | Move logging set up to a separate moduleGravatar MarkKoz2020-10-17-83/+93
| | | | | | | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | | | | | Syncers: make functions staticGravatar MarkKoz2020-10-17-65/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The classes no longer hold any state since they can use the global bot instance.
| * | | | | | | | | | | | | | | | | | | | | Use global bot instance in syncersGravatar MarkKoz2020-10-16-45/+62
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | They're pretty close to being fully static classes, but it's difficult to make the name attribute a static abstract property.
| * | | | | | | | | | | | | | | | | | | | | Use global bot instance in InterpreterGravatar MarkKoz2020-10-16-4/+4
| | | | | | | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | | | | | Use global bot instance in try_get_channelGravatar MarkKoz2020-10-16-10/+8
| | | | | | | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | | | | | Use global bot instance in wait_for_deletionGravatar MarkKoz2020-10-16-10/+8
| | | | | | | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | | | | | Use global bot instance in send_to_paste_serviceGravatar MarkKoz2020-10-16-27/+28
| | | | | | | | | | | | | | | | | | | | | |
| * | | | | | | | | | | | | | | | | | | | | Add global bot instanceGravatar MarkKoz2020-10-16-3/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Is **very** convenient when writing utility functions that rely on the bot's state, but aren't in cogs and therefore lack the typical way to access the instance. No more passing around of the instance as an arg!
| | * | | | | | | | | | | | | | | | | | | | Update snekbox address in config-default.ymlGravatar Joe Banks2020-11-19-1/+1
| | | | | | | | | | | | | | | | | | | | | |
| | * | | | | | | | | | | | | | | | | | | | Update config options with new hostsGravatar Joe Banks2020-11-15-2/+2
| | | | | | | | | | | | | | | | | | | | | |
| | * | | | | | | | | | | | | | | | | | | | Add deploy steps to GitHub ActionsGravatar Joe Banks2020-11-15-0/+14
| | | | | | | | | | | | | | | | | | | | | |
| | * | | | | | | | | | | | | | | | | | | | Add Kubernetes deployment manifestGravatar Joe Banks2020-11-15-0/+21
| |/ / / / / / / / / / / / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | |
| | * | | | | | | | | | | | | | | | | | | Cover Unicode emojis catching as antispam rule with test casesGravatar ks1292020-11-20-4/+25
| | | | | | | | | | | | | | | | | | | | |
| | * | | | | | | | | | | | | | | | | | | Catch Unicode emojis in emojis filtering ruleGravatar ks1292020-11-20-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead detecting only custom emojis, rule now catch too Unicode emojis. This converts Unicode emojis to :emoji: format and count them.
| | * | | | | | | | | | | | | | | | | | | Install emoji package for emojis filteringGravatar ks1292020-11-20-19/+31
| |/ / / / / / / / / / / / / / / / / / / |/| | | | | | | | | | | | | | | | | | |
| | * | | | | | | | | | | | | | | | | | Remove duplicate checkmarkGravatar Gustav Odinger2020-11-21-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - This removes a duplicate checkmark from the title of the embed - The checkmark was left from the previous title system and wasn't removed in the change
| | * | | | | | | | | | | | | | | | | | Update available help channel embed messageGravatar Gustav Odinger2020-11-21-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - This changes "we'll try to help you" to say "others will try to help you" - Clarifies that the rest of the community is going to help — not some dedicated help/staff team
| | * | | | | | | | | | | | | | | | | | Update available message to sound betterGravatar Gustav Odinger2020-11-17-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - This replaces "one" with "any" - This is supposed to read better
| | * | | | | | | | | | | | | | | | | | Use author as the title of the embedGravatar Gustav Odinger2020-11-17-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Allows the icon to be centered
| | * | | | | | | | | | | | | | | | | | Add green-checkmark to bot constantsGravatar Gustav Odinger2020-11-17-0/+4
| | | | | | | | | | | | | | | | | | | |
| | * | | | | | | | | | | | | | | | | | Update help channel available messageGravatar Gustav Odinger2020-11-16-10/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Adds a footer and title - Uses a green colored embed - Updates message to be easier to read and contain practical info for asking better questions
| | * | | | | | | | | | | | | | | | | | Add bright green color to constantsGravatar Gustav Odinger2020-11-16-0/+2
| |/ / / / / / / / / / / / / / / / / / |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - The color is used in the new help channel embed
| | * | | | | | | | | | | | | | | | | Make `additional_info` non-optional.Gravatar kosayoda2020-10-20-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `Optional` typehint suggests allowing None as a value, which does not make sense as a message in the logs.
| | * | | | | | | | | | | | | | | | | Improve default argument.Gravatar kosayoda2020-10-08-4/+1
| | | | | | | | | | | | | | | | | | |
| | * | | | | | | | | | | | | | | | | Resolve logic error with reason override.Gravatar kosayoda2020-10-08-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The reason override for the user message should be set to the infraction reason *if* the override is None, not if it isn't. The parameter is also renamed to `user_reason` for better clarity.
| | * | | | | | | | | | | | | | | | | Modify `!superstar` to use `apply_infraction`.Gravatar kosayoda2020-10-01-49/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Using `apply_infraction` from `InfractionScheduler` rather than doing it manually allows us to handle HTTP errors while reducing code duplication. Specifically, discord.Forbidden is handled when the bot tries to superstar someone they do not have permissions to. Resolves BOT-5Q.
| | | | | * | | | | | | | | | | | | | fix(bot): PR reivew of bot.pyGravatar Thomas Petersson2020-11-27-8/+10
| | | | | | | | | | | | | | | | | | |
| | | | | * | | | | | | | | | | | | | Merge branch 'master' into fix/tagp/graceful-stasd-connectGravatar Thomas Petersson2020-11-09-907/+2421
| | | | | |\ \ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | |/ / / / / / / / / / / / / / | | | | |/| | | | | | | | | | | | | |
| | | | | * | | | | | | | | | | | | | fix(bot): statds pr review suggestionsGravatar Thomas Petersson2020-11-09-6/+14
| | | | | | | | | | | | | | | | | | |
| | | | | * | | | | | | | | | | | | | fix(bot): better fallback logicGravatar Thomas Petersson2020-10-05-3/+3
| | | | | | | | | | | | | | | | | | |
| | | | | * | | | | | | | | | | | | | fix(bot): refactor of connect_statsdGravatar Thomas Petersson2020-10-05-9/+5
| | | | | | | | | | | | | | | | | | |
| | | | | * | | | | | | | | | | | | | fix(bot): redundant false checks on self.statsGravatar Thomas Petersson2020-10-05-11/+3
| | | | | | | | | | | | | | | | | | |
| | | | | * | | | | | | | | | | | | | fix(bot): Not assign stats to NoneGravatar Thomas Petersson2020-10-05-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | self.stats is referred to as bot.stats in the project, which was overlooked. This should "disable" stats until it's successfully reconnected. The retry attempts will continue until it stops throwing or fails 10x
| | | | | * | | | | | | | | | | | | | fix(statsd): Gracefully handle gaierroGravatar Thomas Petersson2020-10-05-4/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Per issue #1185 the bot might go down if the statsd client fails to connect during instantiation. This can be caused by an outage on their part, or network issues. If this happens getaddrinfo will raise a gaierror. This PR catched the error, sets self.stats to None for the time being, and handles that elsewhere. In addition a fallback logic was added to attempt to reconnect, in the off-chance it's a temporary outage
| | | | | | * | | | | | | | | | | | | Added docstring for the user activity function.Gravatar Xithrius2020-12-10-1/+6
| | | | | | | | | | | | | | | | | | |
| | | | | | * | | | | | | | | | | | | Merge branch 'moderation/user-from-metricity' of ↵Gravatar Xithrius2020-12-10-12/+7
| | | | | | |\ \ \ \ \ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://github.com/python-discord/bot into moderation/user-from-metricity
| | | | | | | * | | | | | | | | | | | | Slightly reformatted activity block building.Gravatar Xithrius2020-12-10-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Hassan Abouelela <[email protected]>
| | | | | | | * | | | | | | | | | | | | Compressed embed buildingGravatar Xithrius2020-12-10-11/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Hassan Abouelela <[email protected]>