#dev-log

1 messages ยท Page 51 of 1

regal archBOT
#
[python-discord/bot] New branch created: bug/mod/1065/unnominate\-banned
ebon magnetBOT
#

Build 20200815.6 succeeded

Requested by

GitHub

Duration

00:02:39

Build pipeline

Bot

regal archBOT
#

I wish there was a more Pythonic way to write this

I feel you and I actually didn't mean for it to be like that. I saw that I redefined handle_event on every iteration, and without even thinking more about it moved it above the loop. If i had noticed the hide() and show() calls in the function, I wouldn't have expected this to work, but since it did I actually didn't notice this horror before you pointed it out.

#

I wish there was a more Pythonic way to write this

I feel you and I actually didn't mean for it to be like that. I saw that I redefined handle_event on every iteration, and without even thinking more about it moved it above the loop. If i had noticed the hide() and show() calls in the function, I wouldn't have expected this to work, but since it did I actually didn't notice this horror before you pointed it out.

So, callbacks will have access to this, right, but would `element...

regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
#

this looks better, but if I'm reading this correctly, if the element already has the is-active class, we still try to add that class before returning true. What happens when you try to add a class that an element already has - will it end up with two of that class, or will it just do nothing?

Either way, it would be tidier if it just returned true right away, so here's a suggestion for how that might look.

        const show = () => {
            if (element.classL...
regal archBOT
ebon magnetBOT
#

Build 20200816.1 succeeded

Requested by

GitHub

Duration

00:03:01

Build pipeline

Bot

regal archBOT
#

This seems like a solid way of handling; it's easy and hopefully won't break easily. I think any sort of ban should end a nomination, so there's no need to make it more complicated by separating tempbans from permbans like we did with Big Brother.

I made one comment that's not related to anything you wrote; you just moved it in your refactor. I think I originally wrote those lines and I disagree with how I did it back then.

#

Reading this code again (I think I wrote it), I wonder why I put the defaults before the user__id dict in the ChainMap. The lookup order is from left to right, not right to left, meaning that the default values in api_default_params now take precedence over the specific values inserted as params.

It may not matter too much in this version, as I don't think our defaults will ever include a user__id field, but if we ever add something to the second dictionary hoping to "override" a...

regal archBOT
regal archBOT
north knotBOT
ebon magnetBOT
#

Build 20200816.2 succeeded

Requested by

Leon Sandรธy

Duration

00:04:40

Build pipeline

Bot

oak estuaryBOT
regal archBOT
#

Updating to v2.0.0, and it looks like the submodules you're using now aren't included in the tarball. Since I get the following error when attempting to run django.

FileNotFoundError: [Errno 2] No such file or directory: '/home/bpepple/.local/share/virtualenvs/metron-UZX73b7p/lib/python3.6/site-packages/django_simple_bulma/bulma/sass'

Pulled the tarball down from the release page, and verified the bulma folder is empty.

#

We used to have a tag called !ask which was designed to tell people the basics of how to ask a good question.

image

The problem was that we saw a lot of users abusing this tag. As soon as someone asked a less-than-perfect question in our community, other members would throw themselves at the keyboard to !ask that stupid user right in their stupid face.

This didn't harmonize wel...

ebon magnetBOT
#

Build 20200816.3 succeeded

Requested by

GitHub

Duration

00:02:48

Build pipeline

Bot

regal archBOT
#

If the client parameter of wait_for_deletion is not specified, the function itself will set the client parameter, but as an instance of discord.Member, rather than an instance of discord.Client or a subclass of it.. What's the problem with this? discord.Member object has no attribute wait_for, and this attribute is actually used in the function, no matter what.

Points of interest:
https://github.com/python-discord/bot/blob/4df3089d8d03f54cdbd14d7683149ae7931036c1/bot/utils/m...

ebon magnetBOT
#

Build 20200816.4 succeeded

Requested by

GitHub

Duration

00:02:50

Build pipeline

Bot

regal archBOT
regal archBOT
#
[python-discord/django-simple-bulma] New tag created: v2\.0\.1
#
[python-discord/django-simple-bulma] New tag created: v2\.0\.2
#
[python-discord/django-simple-bulma] New tag created: v2\.0\.3
regal archBOT
ebon magnetBOT
#

Build 20200816.5 succeeded

Requested by

GitHub

Duration

00:02:57

Build pipeline

Bot

regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
ebon magnetBOT
#

Build 20200817.1 failed

Requested by

GitHub

Duration

00:01:04

Build pipeline

Seasonal Bot

regal archBOT
ebon magnetBOT
#

Build 20200817.2 succeeded

Requested by

GitHub

Duration

00:00:54

Build pipeline

Seasonal Bot

regal archBOT
regal archBOT
#

I've put together a quick implementation at https://gist.github.com/Numerlor/e57096cedd06dd536cdddff86be2661f, since we have control over the output there I've decided to simply ignore the information we don't need during the parsing.
Should we also handle version 1 inventories? The implementation is simple (although I haven't tested it) but none of the bot's current inventories use that version and I've only managed to find one when searching.

regal archBOT
regal archBOT
regal archBOT
regal archBOT
#
[python-discord/bot] New branch created: bug/mod/915/silence\-reactions
regal archBOT
regal archBOT
regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
regal archBOT
regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200818.1 succeeded

Requested by

GitHub

Duration

00:02:44

Build pipeline

Bot

regal archBOT
#
[python-discord/bot] branch deleted: bug/frontend/1030/reddit\-title\-escape
north knotBOT
ebon magnetBOT
#

Build 20200818.2 succeeded

Requested by

GitHub

Duration

00:04:30

Build pipeline

Bot

oak estuaryBOT
regal archBOT
regal archBOT
regal archBOT
#

Fixes #915
Fixes #1053

As discussed in #915, it isn't safe to assume default values for a channel's previous overwrites. Therefore, their previous values must be cached and restored once unsilenced. I decided to store both overwrites in a single cache via JSON (de)serialisation. This feels nicer than dealing with multiple caches and also removes worries of them falling out of sync.

Since I was already working on caching, I implemented caching of the unsilence times too. This means mod...

ebon magnetBOT
#

Build 20200818.3 succeeded

Requested by

GitHub

Duration

00:02:51

Build pipeline

Bot

north knotBOT
#

Postgres backup completed!

regal archBOT
regal archBOT
#

It mostly looks fine, but I have a few changes to request.

  • Please justify or change the frequent use of explicit relative imports. I don't think we have enough complexity in our package layout for the imports to end up being that verbose, and PEP8 recommends that we use absolute imports as much as possible in cases where this is true.
  • Maybe we should default to just importing all the extensions instead of maintaining this long list of load_extensions calls in __main__. For extensions ...
regal archBOT
#
[python-discord/bot] branch deleted: bug/filters/1005/antispam\-ctx\-patch
#
[python-discord/bot] branch deleted: bug/filters/1099/dupe\-offensive\-msg
north knotBOT
ebon magnetBOT
#

Build 20200819.1 succeeded

Requested by

GitHub

Duration

00:04:51

Build pipeline

Bot

oak estuaryBOT
north knotBOT
oak estuaryBOT
ebon magnetBOT
#

Build 20200819.2 succeeded

Requested by

GitHub

Duration

00:04:39

Build pipeline

Bot

regal archBOT
regal archBOT
regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200819.3 succeeded

Requested by

GitHub

Duration

00:03:02

Build pipeline

Bot

regal archBOT
regal archBOT
#

Addressed by f150e69.

I don't feel strongly about it, but there are some nice things about relative imports:

  1. They tend to be shorter
    • Easier to read (contentious, I guess)
    • Easier to write (mentioning this for completeness sake; it's not really a valid argument on its own)
    • More room to import many things without breaking into multiple lines
  2. Sorting imports puts relative ones at the end. This makes it more convenient to find the most relevant objects to the curr...
regal archBOT
regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200819.4 succeeded

Requested by

GitHub

Duration

00:03:23

Build pipeline

Bot

regal archBOT
#
[python-discord/bot] branch deleted: bug/mod/1065/unnominate\-banned
north knotBOT
ebon magnetBOT
#

Build 20200819.5 succeeded

Requested by

GitHub

Duration

00:04:59

Build pipeline

Bot

oak estuaryBOT
north knotBOT
ebon magnetBOT
#

Build 20200819.6 succeeded

Requested by

GitHub

Duration

00:04:30

Build pipeline

Bot

oak estuaryBOT
regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200819.1 failed

Requested by

GitHub

Duration

00:02:06

Build pipeline

Snekbox

regal archBOT
ebon magnetBOT
#

Build 20200819.2 failed

Requested by

GitHub

Duration

00:01:52

Build pipeline

Snekbox

regal archBOT
#

Now I don't know why it fails. Maybe cause it's an older version (0.5.0). Shellcheck 0.7.1 doesn't complain locally.

Test shell scripts with shellcheck.......................................Failed
- hook id: shellcheck
- exit code: 1

In scripts/check_dockerfiles.sh line 22:
    if [[ -v build_cache["${branch}"] ]]; then
    ^-- SC1009: The mentioned syntax error was in this if expression.
       ^-- SC1073: Couldn't parse this test expression. Fix to allow more checks.
      ...
regal archBOT
ebon magnetBOT
#

Build 20200820.1 failed

Requested by

GitHub

Duration

00:01:18

Build pipeline

Snekbox

regal archBOT
ebon magnetBOT
#

Build 20200820.2 succeeded

Requested by

GitHub

Duration

00:02:11

Build pipeline

Snekbox

#

Build 20200820.3 succeeded

Requested by

GitHub

Duration

00:02:13

Build pipeline

Snekbox

regal archBOT
regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
ebon magnetBOT
#

Build 20200820.1 succeeded

Requested by

GitHub

Duration

00:02:17

Build pipeline

Site

ebon magnetBOT
#

Build 20200820.1 succeeded

Requested by

GitHub

Duration

00:03:02

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200820.2 succeeded

Requested by

GitHub

Duration

00:01:55

Build pipeline

Site

regal archBOT
regal archBOT
regal archBOT
north knotBOT
regal archBOT
ebon magnetBOT
#

Build 20200820.3 succeeded

Requested by

GitHub

Duration

00:03:36

Build pipeline

Site

regal archBOT
#
[python-discord/bot] New branch created: bug/1112/backend/wait\-for\-deletion\-client
ebon magnetBOT
#

Build 20200820.2 succeeded

Requested by

GitHub

Duration

00:02:43

Build pipeline

Bot

regal archBOT
#

Just had this issue again, but with a slightly different traceback.

ResponseCodeError: Status: 400 Response: {'deletedmessage_set': [{'embeds': {'0': ["Tag embed must contain one of the fields {'image', 'description', 'video', 'title', 'fields'}."]}}, {'embeds': {'0': ["Tag embed must contain one of the fields {'image', 'description', 'video', 'title', 'fields'}."]}}, {'embeds': {'0': ["Tag embed must contain one of the fields {'image', 'description', 'video', 'title', 'fields'}."]}}, {...
#
[python-discord/bot] New branch created: bug/mod/1094/watch\-leaked\-token
#
[python-discord/bot] branch deleted: bug/1112/backend/wait\-for\-deletion\-client
ebon magnetBOT
#

Build 20200820.3 succeeded

Requested by

GitHub

Duration

00:02:45

Build pipeline

Bot

north knotBOT
ebon magnetBOT
#

Build 20200820.4 succeeded

Requested by

GitHub

Duration

00:04:31

Build pipeline

Bot

oak estuaryBOT
ebon magnetBOT
#

Build 20200820.5 succeeded

Requested by

GitHub

Duration

00:02:37

Build pipeline

Bot

regal archBOT
north knotBOT
oak estuaryBOT
ebon magnetBOT
#

Build 20200820.6 succeeded

Requested by

Joseph Banks

Duration

00:04:47

Build pipeline

Bot

regal archBOT
north knotBOT
oak estuaryBOT
ebon magnetBOT
#

Build 20200820.7 succeeded

Requested by

Joseph Banks

Duration

00:04:28

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200820.1 failed

Requested by

Joseph Banks

Duration

00:01:01

Build pipeline

Seasonal Bot

regal archBOT
ebon magnetBOT
#

Build 20200820.2 failed

Requested by

Joseph Banks

Duration

00:01:07

Build pipeline

Seasonal Bot

regal archBOT
north knotBOT
ebon magnetBOT
#

Build 20200820.3 succeeded

Requested by

Joseph Banks

Duration

00:02:49

Build pipeline

Seasonal Bot

night lilyBOT
#
SeasonalBot

Connected!

north knotBOT
#

Postgres backup completed!

regal archBOT
regal archBOT
regal archBOT
#
[python-discord/bot] New branch created: kwzrd/fix\-1095
#

I'm struggling to think of a nice way to solve this. I've pushed two commits, 9d13ba2 and 419c560, which adjust the tests to what I think they should be like. The tests now fail. But I'm not sure how to fix the cache itself.

Moving the boolean check before the loop would technically be possible but bool is not always in prefixes, depending on which partial calls the method. And if it isn't, then we'd want to reach the raise TypeError. So we'd have to check both whether the passed typ...

regal archBOT
#

Right now, we're syncing users in a hugely inefficient way. When we request the users, we get a giant 90,000 item reply, and when we send users we're sending them one at a time with 90,000 requests.

Let's not do either of these things.

This will be a cross-platform change, so see the corresponding bot issue here.

Use DRF pagination

On the User endpoint, enable DRF pagination and send something like 10000 items at a ti...

#

Currently when we sync the users to the site, we sync all 90,000 users one at a time. This is pretty much the single worst way we could possibly do this, so let's make it smarter.

See the related site-side changes required for this here: https://github.com/python-discord/site/issues/375

Paginated retrievals

In https://github.com/python-discord/site/issues/375, I propose adding pagination to the user endpoint via DRFs built-in pagination feature. This means we'll need to make a smart...

regal archBOT
#

On mobile (Android, not sure about iOS), an opening bracket without a matching closing bracket causes the Markdown renderer to interpret everything in between as a link title. The mobile renderer ostensibly uses the earliest opening bracket it finds while the desktop renderer uses the latest. It renders as a link because later on, there is link Markdown which is used for the following post's title. This is what that looks like on mobile:

![bild](https://user-images.githubusercontent.com/15...

regal archBOT
regal archBOT
#
[python-discord/site] New branch created: add\_deployment\_info
ebon magnetBOT
#

Build 20200821.1 succeeded

Requested by

GitHub

Duration

00:02:11

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20200822.1 failed

Requested by

GitHub

Duration

00:01:38

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20200822.2 failed

Requested by

GitHub

Duration

00:01:20

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20200822.3 failed

Requested by

GitHub

Duration

00:01:18

Build pipeline

Site

#

Build 20200822.4 failed

Requested by

GitHub

Duration

00:01:23

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20200822.5 failed

Requested by

GitHub

Duration

00:01:57

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20200822.6 failed

Requested by

GitHub

Duration

00:02:02

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20200822.7 succeeded

Requested by

GitHub

Duration

00:02:09

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20200822.1 succeeded

Requested by

GitHub

Duration

00:01:02

Build pipeline

Seasonal Bot

regal archBOT
ebon magnetBOT
#

Build 20200822.8 succeeded

Requested by

GitHub

Duration

00:02:05

Build pipeline

Site

ebon magnetBOT
#

Build 20200822.9 succeeded

Requested by

GitHub

Duration

00:01:59

Build pipeline

Site

north knotBOT
#

Postgres backup completed!

regal archBOT
regal archBOT
regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200822.1 succeeded

Requested by

GitHub

Duration

00:02:35

Build pipeline

Bot

regal archBOT
#
[python-discord/bot] New branch created: feat/backend/707/alias\-decorator
north knotBOT
#

Postgres backup completed!

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200823.1 succeeded

Requested by

GitHub

Duration

00:00:58

Build pipeline

Seasonal Bot

regal archBOT
ebon magnetBOT
#

Build 20200823.1 succeeded

Requested by

GitHub

Duration

00:02:59

Build pipeline

Bot

#

Build 20200823.2 succeeded

Requested by

GitHub

Duration

00:00:55

Build pipeline

Seasonal Bot

regal archBOT
#
jb3
[python-discord/seasonalbot] branch deleted: python\-topics
north knotBOT
ebon magnetBOT
#

Build 20200823.3 succeeded

Requested by

Joseph Banks

Duration

00:02:32

Build pipeline

Seasonal Bot

night lilyBOT
#
SeasonalBot

Connected!

regal archBOT
ebon magnetBOT
#

Build 20200823.2 succeeded

Requested by

GitHub

Duration

00:02:52

Build pipeline

Bot

#

Build 20200823.3 succeeded

Requested by

GitHub

Duration

00:02:37

Build pipeline

Bot

regal archBOT
#
[python-discord/bot] branch deleted: joseph/enhanced\-user\-command
ebon magnetBOT
#

Build 20200823.4 failed

Requested by

GitHub

Duration

00:04:23

Build pipeline

Bot

ocean rock
#

uh oh

north knotBOT
ebon magnetBOT
#

Build 20200823.4 succeeded

Requested by

GitHub

Duration

00:01:36

Build pipeline

Bot

oak estuaryBOT
regal archBOT
#

Closes #707

Feature overview

A new keyword argument has been added to the discord.ext.commands.GroupMixin.command decorator. The kwarg root_aliases allows a sequence of alias names to be specified which are meant to act as top-level commands. For example,

@site_group.command(name="rules", aliases=("r", "rule"), root_aliases=("rules", "rule"))

Help command

These aliases also show up in the help command (they're sorted too)

![bild](https://user-images.g...

ebon magnetBOT
#

Build 20200823.5 succeeded

Requested by

GitHub

Duration

00:02:44

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200823.6 succeeded

Requested by

GitHub

Duration

00:02:48

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200823.7 succeeded

Requested by

GitHub

Duration

00:02:49

Build pipeline

Bot

regal archBOT
#

Currently Modmail threads aren't marked as mod channels. This means that invoking the !user command does now show any existing notes on a user. This means that the moderator then either has to make an explicit infraction search just to make sure, or to move to a mod channel and invoke the command there (which is less desirable as we usually keep all relevant actions inside the Modmail channel).

The suggestion is to therefore to whitelist Modmail channels as mod channels. As these channel...

regal archBOT
#

I don't particularly see the need to exclude #incidents or #incidents-archive, since no one is going to invoke commands in those channels. For the !infractions command group, we just whitelist the entire ModMail category, along with the mod channels:
https://github.com/python-discord/bot/blob/f97a5a62ab2f8e9af8a426b1ac6d9bf4896a75da/bot/cogs/moderation/management.py#L285-L297

For the user command, we currently have this:
https://github.com/python-discord/bot/blob/f97a5a62ab2f8e9af8a426...

regal archBOT
regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
regal archBOT
regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200824.1 succeeded

Requested by

GitHub

Duration

00:02:52

Build pipeline

Bot

regal archBOT
#
jb3

Some notes on a not getting banned from Discord front:

  • If we trip the anti-spam system we will receive an error similar to discord.errors.Forbidden: 403 Forbidden (error code: 20026): Your bot has been flagged by our anti-spam system for abusive behavior. Please reach out to our team by going to https://dis.gd/report and selecting "Appeal an Action Trust and Safety took on my bot" as the Report Type.
  • This should cancel the DM process and alert the entire administration team since it w...
regal archBOT
regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
north knotBOT
#
Auto-deployed: metricity
#
Auto-deployed: metricity
ocean rock
#

mfw autodeploy triggers before the docker build

north knotBOT
#
Auto-deployed: metricity
north knotBOT
#
Auto-deployed: metricity
north knotBOT
#
Auto-deployed: metricity
regal archBOT
north knotBOT
#
Auto-deployed: metricity
regal archBOT
#
[python-discord/bot] New branch created: feat/info/1125/user\-cmd\-whitelist\-modmail
north knotBOT
#
Auto-deployed: metricity
ebon magnetBOT
#

Build 20200825.1 failed

Requested by

GitHub

Duration

00:02:21

Build pipeline

Bot

north knotBOT
#
Auto-deployed: metricity
regal archBOT
ebon magnetBOT
#

Build 20200825.3 succeeded

Requested by

GitHub

Duration

00:02:34

Build pipeline

Bot

north knotBOT
#
Auto-deployed: metricity
#
Auto-deployed: metricity
north knotBOT
#
Auto-deployed: metricity
north knotBOT
#
Auto-deployed: metricity
regal archBOT
regal archBOT
regal archBOT
#
[python-discord/bot] New branch created: bold\_link
ebon magnetBOT
#

Build 20200825.4 succeeded

Requested by

GitHub

Duration

00:02:50

Build pipeline

Bot

north knotBOT
ebon magnetBOT
#

Build 20200826.1 succeeded

Requested by

GitHub

Duration

00:04:20

Build pipeline

Bot

oak estuaryBOT
regal archBOT
ebon magnetBOT
#

Build 20200826.2 succeeded

Requested by

GitHub

Duration

00:02:17

Build pipeline

Bot

regal archBOT
#
[python-discord/bot] branch deleted: feat/backend/707/alias\-decorator
north knotBOT
ebon magnetBOT
#

Build 20200826.3 succeeded

Requested by

GitHub

Duration

00:04:36

Build pipeline

Bot

oak estuaryBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
regal archBOT
regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200826.4 succeeded

Requested by

GitHub

Duration

00:02:46

Build pipeline

Bot

ebon magnetBOT
#

Build 20200826.5 succeeded

Requested by

GitHub

Duration

00:02:44

Build pipeline

Bot

regal archBOT
#

closes #375

Implementation

Pagination

  • Using built in PageNumberPagination with the default page size being 10,000 user objects(dicts) per page.
  • 2 query parameteres to control page number and page size.

Bulk Update

#

Thank you for contributing to Python Discord!

Please check out the following documents:

ebon magnetBOT
#

Build 20200826.1 failed

Requested by

GitHub

Duration

00:02:01

Build pipeline

Site

ebon magnetBOT
#

Build 20200826.6 succeeded

Requested by

GitHub

Duration

00:02:45

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200826.2 failed

Requested by

GitHub

Duration

00:02:04

Build pipeline

Site

regal archBOT
#

Currently the site requires 100% test coverage, so yes you will have to write and adjust tests.

By the way, it seems like we may already support bulk input in this endpoint - see the BulkSerializerMixin that we use in the serializer. So it might only be pagination that's required.

I was planning to handle this issue myself, but if you're confident you can handle it you're welcome to it.

regal archBOT
ebon magnetBOT
#

Build 20200826.7 succeeded

Requested by

GitHub

Duration

00:02:30

Build pipeline

Bot

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200826.3 failed

Requested by

GitHub

Duration

00:01:42

Build pipeline

Site

regal archBOT
#

Okay, before I really jump into this review, I need you to take a look at the BulkSerializerMixin and figure out whether we still need it. It looks like it was implemented specifically to solve bulk input, and we even have a dependency just for that. So I'd like you to justify your approach over that approach, and consider whether this PR should remove the dependency that includes the BulkSerializerMixin.

#

@ikuyarihS, I think it's enough to check if the Command was invoked with arguments since if that's a single tag, no following arguments will be provided

I'm not sure I buy this line of reasoning. some moderation commands (like !silence) do not take arguments. I think prefering commands over tags is probably the right suggestion.

@F4zii Do you have time to get this wrapped up? It looks like it's fallen victim to Covid19 and we should try to nurse it back to health and get it merged.

regal archBOT
ebon magnetBOT
#

Build 20200827.1 failed

Requested by

GitHub

Duration

00:02:16

Build pipeline

Bot

oak estuaryBOT
regal archBOT
ebon magnetBOT
#

Build 20200827.2 succeeded

Requested by

GitHub

Duration

00:02:46

Build pipeline

Bot

oak estuaryBOT
regal archBOT
ebon magnetBOT
#

Build 20200827.1 failed

Requested by

GitHub

Duration

00:01:41

Build pipeline

Site

ebon magnetBOT
#

Build 20200827.2 failed

Requested by

GitHub

Duration

00:01:31

Build pipeline

Site

ebon magnetBOT
#

Build 20200827.3 failed

Requested by

GitHub

Duration

00:01:33

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20200827.4 failed

Requested by

GitHub

Duration

00:01:28

Build pipeline

Site

regal archBOT
#

The Situation

The Python Discord is a huge guild and mistakes do happen and can't always be prevented.
However what can be prevented is lack of an explanation or confusion for people when these disruptive messages do get sent out.

The Pinging Situation
(Today has only lasted for 1 hour and 34 minutes so far and there are already 87 mentions way after the ping event)

If you look...

ebon magnetBOT
#

Build 20200827.5 failed

Requested by

GitHub

Duration

00:01:22

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20200827.6 failed

Requested by

GitHub

Duration

00:01:42

Build pipeline

Site

ebon magnetBOT
#

Build 20200827.7 failed

Requested by

GitHub

Duration

00:01:33

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20200827.8 failed

Requested by

GitHub

Duration

00:01:44

Build pipeline

Site

ebon magnetBOT
#

Build 20200827.9 failed

Requested by

GitHub

Duration

00:01:44

Build pipeline

Site

north knotBOT
#

Postgres backup completed!

ebon magnetBOT
#

Build 20200827.10 failed

Requested by

GitHub

Duration

00:01:33

Build pipeline

Site

regal archBOT
regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200827.3 succeeded

Requested by

GitHub

Duration

00:02:50

Build pipeline

Bot

regal archBOT
#

@lemonsaurus @ks129 My feedback on this PR has been addressed but a somewhat out-of-scope change was made here that I'm not entirely excited about & @sco1 agreed that it's sub-optimal when we spoke about it some time back.

I requested only that the newlines are removed from the string because they are later on stripped by the shorten, and so the result string looks different than what the literal implies, which is misleading. @ks129 made a more adventurous attempt at keeping the newlines...

regal archBOT
#

The issue:

Currently, if someone puts down an @everyone ping, a mod has to come and respond to it to tell the person not to ping 95k+ people. Now, this usually works fine, but accidents happen, and things can end up happening like lemon accidentally pinging everyone, because android doesn't have a check for that (we're not upset lemon!).

Proposed solution:

We add a auto-respond to the bot, sort of like in the attachment auto-respond, that contacts the user to explain why they shoul...

#

I managed to simplify the code in the bulk update PR, I no longer need to override the to_internal_value function, I just had to define an id field explicitly as mentioned in the docs(which I missed before).

Coming to the drf-bulk package, we are only using it for multiple creations, this can be easily achieved by overriding the create method in ModelViewSet as mentioned in the docs(I tested it and works fine, takes around 7-10 lines of code).

So, I would say that we can get r...

#
  • This should be implemented as a filter.
  • Automatically deletes the message with the fake everyone ping in it, because we don't want any idiot owners quoting those messages by accident :grin:
  • Mutes the user for 10 minutes, similar to what we do for spam detectors.
  • Posts a message to the channel with a ping of the user and a message similar to what's in OPs description.
  • Maybe we don't need to link the pinned message, lol.
oak estuaryBOT
regal archBOT
#

Currently there are two internal tasks: one that manages users periodically (give role or kick), and one that pings @Unverified every n hours. When I was designing this initially I wanted there to be a command which will allow us to start or stop the tasks, and persist this setting in Redis, so that they will remember whether to run or not if the bot restarts. However, at the time it felt like we didn't need to keep track of these settings on per-task basis, either both tasks are running (m...

regal archBOT
regal archBOT
regal archBOT
#
[python-discord/bot] New branch created: bug/filters/1130/ignore\-codeblock\-emoji
ebon magnetBOT
#

Build 20200827.4 succeeded

Requested by

GitHub

Duration

00:02:54

Build pipeline

Bot

regal archBOT
north knotBOT
#
Auto-deployed: metricity
north knotBOT
#
Auto-deployed: metricity
north knotBOT
#
Auto-deployed: metricity
regal archBOT
regal archBOT
regal archBOT
north knotBOT
ebon magnetBOT
#

Build 20200827.5 succeeded

Requested by

Joseph Banks

Duration

00:04:38

Build pipeline

Bot

oak estuaryBOT
ebon magnetBOT
#

Build 20200828.1 succeeded

Requested by

GitHub

Duration

00:02:40

Build pipeline

Bot

regal archBOT
#

e0438b2 Watchchannels: censor message content if it has... - MarkKoz
c0afea1 Don't send code block help if message has a web... - MarkKoz
c6ccc40 Merge branch 'master' into bug/mod/1094/watch-l... - Den4200
1bd5c80 Merge pull request #1118 from python-discord/bu... - Den4200

#
[python-discord/bot] branch deleted: bug/mod/1094/watch\-leaked\-token
north knotBOT
ebon magnetBOT
#

Build 20200828.2 succeeded

Requested by

GitHub

Duration

00:04:43

Build pipeline

Bot

oak estuaryBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
ebon magnetBOT
#

Build 20200828.1 failed

Requested by

GitHub

Duration

00:01:11

Build pipeline

Site

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200828.2 failed

Requested by

GitHub

Duration

00:01:44

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20200828.3 succeeded

Requested by

GitHub

Duration

00:02:11

Build pipeline

Site

regal archBOT
regal archBOT
#

I really had a feeling there must be a simpler way to do it. I played around with a bunch of ideas and ultimately came up with this:

queryset = self.get_queryset().order_by('used', '?')[:random_count]

if any(obj.used for obj in queryset):
    self.get_queryset().update(
        used=Case(
            When(name__in=(obj.name for obj in queryset), then=Value(True)),
            default=Value(False)
        )
    )
else:
    self.get_queryset().filter(
        name__in=(obj...
#

It's redundant to write "test" in the docstring of a test function. It's also awkward to use "does". If I were to use "test", I'd write it as

Test if this returns a 401 response when not authenticated.

Can also use "that" instead of "if". Anyway, as I said, I'd really opt for something along the lines of

Should return a 401 response code when not authenticated.

or

Returned a 401 response code because of no authentication.

regal archBOT
regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
ebon magnetBOT
#

Build 20200829.1 failed

Requested by

GitHub

Duration

00:01:55

Build pipeline

Site

ebon magnetBOT
#

Build 20200829.2 succeeded

Requested by

GitHub

Duration

00:02:17

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20200829.1 succeeded

Requested by

GitHub

Duration

00:03:01

Build pipeline

Bot

regal archBOT
#
[python-discord/seasonalbot] New branch created: wolfram\-cog
regal archBOT
#

Relevant Issues

Closes #1114 in the Python Discord bot repository.

Description

I've migrated the Cog from here to seasonalbot/bot/exts/evergreen/wolfram. No changes in the cog, but slight changes in how the constants are created. No .yml file is used for configuring environment variables.

Reasoning

I copy pasted the cog from one repository...

ebon magnetBOT
#

Build 20200829.1 succeeded

Requested by

GitHub

Duration

00:00:53

Build pipeline

Seasonal Bot

regal archBOT
#
[python-discord/bot] New branch created: remove\-wolfram
ebon magnetBOT
#

Build 20200829.2 succeeded

Requested by

GitHub

Duration

00:04:14

Build pipeline

Bot

regal archBOT
north knotBOT
#
Auto-deployed: metricity
regal archBOT
regal archBOT
#

46ef497 (Off-topic Channel Names): Added new field to m... - ks129
a3d2938 (Off-topic Channel Names Viewset): Added docume... - ks129
81516be (Off-topic Channel Names Viewset Tests): Added ... - ks129
1f66694 (Off-topic Channel Names Viewset Tests): Added ... - ks129
02315e7 (Off-topic Channel Names Viewset Tests): Added ... - ks129

north knotBOT
regal archBOT
ebon magnetBOT
#

Build 20200829.3 succeeded

Requested by

GitHub

Duration

00:04:00

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20200829.3 succeeded

Requested by

GitHub

Duration

00:02:57

Build pipeline

Bot

regal archBOT
#
jb3
[python-discord/site] New branch created: revert\-348\-off\-topic\-non\-random
ebon magnetBOT
#

Build 20200829.4 succeeded

Requested by

GitHub

Duration

00:01:56

Build pipeline

Site

north knotBOT
regal archBOT
ebon magnetBOT
#

Build 20200829.5 succeeded

Requested by

GitHub

Duration

00:03:44

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20200829.4 succeeded

Requested by

GitHub

Duration

00:02:55

Build pipeline

Bot

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200829.2 failed

Requested by

GitHub

Duration

00:00:56

Build pipeline

Seasonal Bot

regal archBOT
ebon magnetBOT
#

Build 20200829.3 succeeded

Requested by

GitHub

Duration

00:00:58

Build pipeline

Seasonal Bot

regal archBOT
ebon magnetBOT
#

Build 20200829.4 succeeded

Requested by

GitHub

Duration

00:00:58

Build pipeline

Seasonal Bot

#

Build 20200829.5 failed

Requested by

GitHub

Duration

00:00:49

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200829.5 succeeded

Requested by

GitHub

Duration

00:00:52

Build pipeline

Seasonal Bot

#

Build 20200829.6 succeeded

Requested by

GitHub

Duration

00:02:41

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200829.6 succeeded

Requested by

GitHub

Duration

00:01:30

Build pipeline

Seasonal Bot

regal archBOT
#

Issue

When using a command like !rule [rules...] or !pep , there is no way for the user to delete the response sent by the bot.

This is would be relevant when entering the wrong argument (for example !rule 4 instead of !rule 5), you just want to check something real quick or you get the output wasn't what you expected.

Proposed solution

Add a "trash can" reaction to let the user delete the response from the bot. This would be the default for all commands, with the **...

regal archBOT
ebon magnetBOT
#

Build 20200830.1 succeeded

Requested by

GitHub

Duration

00:02:07

Build pipeline

Site

north knotBOT
#

Postgres backup completed!

regal archBOT
ebon magnetBOT
#

Build 20200830.1 succeeded

Requested by

GitHub

Duration

00:02:44

Build pipeline

Bot

#

Build 20200830.2 succeeded

Requested by

GitHub

Duration

00:02:42

Build pipeline

Bot

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200830.3 succeeded

Requested by

GitHub

Duration

00:02:37

Build pipeline

Bot

ebon magnetBOT
#

Build 20200830.4 succeeded

Requested by

GitHub

Duration

00:02:28

Build pipeline

Bot

regal archBOT
#

You've implemented this as a frequency filter, which I find a bit weird. It's not really relevant for our community to be able to configure this filter to allow only 2 @everyone per 10 seconds, for example. I can't see why anyone would ever need that.

Perhaps we can just simplify this pull request by removing the frequency aspect completely from this filter, and removing the corresponding configuration option, too.

#

@lemonsaurus
The issue is, to implement this as an anti-spam rule, in anitspam.py, there is this code that checks for those two config options:

for required_key in ('interval', 'max'):
    if required_key not in config:
        log.error(
            f"`{required_key}` is required but was not "
                f"set in rule `{name}`'s configuration."
            )
            validation_errors[name] = f"Key `{required_key}` is required but not set for rule `{name}`"

...

regal archBOT
regal archBOT
regal archBOT
north knotBOT
regal archBOT
ebon magnetBOT
#

Build 20200830.2 succeeded

Requested by

GitHub

Duration

00:03:50

Build pipeline

Site

regal archBOT
regal archBOT
north knotBOT
ebon magnetBOT
#

Build 20200830.5 succeeded

Requested by

GitHub

Duration

00:04:51

Build pipeline

Bot

oak estuaryBOT
regal archBOT
ebon magnetBOT
#

Build 20200831.1 succeeded

Requested by

GitHub

Duration

00:02:50

Build pipeline

Bot

regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
#

There are at least 5-6 requests every day in python discord, asking how to install python, which version of python they want to install, why "pip" is not working and someone directly pinging the help channel without doing any research for their errors. While I don't think we can deal with people trying to get spoonfed but at least, we do something about the "pip", python versions, and how to install python and IDEs.

regal archBOT
native joltBOT
#

Describe the bug
When using type comments and having ANN101disabled, I received a ANN001 Missing type annotation for function argument for method containing a self argument.

In contrast, using type hints no error is raised.

Is this intended?

To Reproduce

.flake8:

[flake8]
max-line-length = 88
ignore = E501, E203, W503, ANN101, ANN102

A.py:

class A:
    def __init__(self):  # type: () -> None
        self._var = 1

    @property
 ...
#

Bumps black from 19.10b0 to 20.8b1.

Changelog
Sourced from black's changelog.

20.8b1
Packaging

explicitly depend on Click 7.1.2 or newer as Black no longer works with versions
older than 7.0

20.8b0
Black

re-implemented support for explicit trailing commas: now it works consistently within
any bracket pair, including nested structures (#1288 and duplicates)

Black now reindents docstrings when reindenting code around it (#1053)

Black now shows colored d...

native joltBOT
#

Greetings, thanks for the report.

Yes, this is the expected behavior. Setting the ANN101 flag does not inject an annotation for self, but rather just ignores the code when yielding errors to flake8. For type comments, this means that def sum(self, a): # type: (int) -> int is interpreted as hinting self as int, rather than a, resulting in the ANN001 error being yielded.

This type of scenario is what we had in mind for the [partial type comment caveat](https://github.com/py...

regal archBOT
native joltBOT
regal archBOT
ebon magnetBOT
#

Build 20200831.2 succeeded

Requested by

GitHub

Duration

00:03:15

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200831.1 succeeded

Requested by

GitHub

Duration

00:02:10

Build pipeline

Site

regal archBOT
north knotBOT
regal archBOT
ebon magnetBOT
#

Build 20200831.2 succeeded

Requested by

GitHub

Duration

00:04:03

Build pipeline

Site

regal archBOT
#

Currently the antimalware cog file filter triggers on messages from the bot, and also on webhook messages. So for the example somebody tries to send an attachment from python using !int eval, it will be caught by the filter
image
Also, if somebody sends a non-whitelisted attachment to the bot, (and it isn't ignored because of #1139), it will be relayed to dm-log but then caught by the ...

regal archBOT
regal archBOT
#

We've been getting that 415 for a long time and no one has ever figured out why. A 415 response doesn't even make sense, but that's Discord for you. I believe use_cached is enabled because some other code does try to log attachments for deleted messages. If 415 is the standard response for when a cached asset couldn't be retrieved, then that error should be ignored in send_attachments.

#

I don't strongly oppose this, but I'd rather not implement this. The purpose of the eval command is to make it convenient for users to evaluate code while they're in the Discord client. If users already leave the client to write code and upload it to a paste site, then they can go through the extra trouble to run their code themselves and paste the output. In this work flow, I doubt someone would have uploaded code without running it first anyway.

This is a relatively incomplex feature, bu...

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200901.1 succeeded

Requested by

GitHub

Duration

00:02:54

Build pipeline

Bot

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200901.2 failed

Requested by

GitHub

Duration

00:02:06

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200901.3 succeeded

Requested by

GitHub

Duration

00:02:37

Build pipeline

Bot

ebon magnetBOT
#

Build 20200901.4 succeeded

Requested by

GitHub

Duration

00:02:50

Build pipeline

Bot

north knotBOT
#

Postgres backup completed!

regal archBOT
regal archBOT
regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200901.5 failed

Requested by

GitHub

Duration

00:05:28

Build pipeline

Bot

ebon magnetBOT
#

Build 20200901.6 succeeded

Requested by

GitHub

Duration

00:03:12

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200901.7 succeeded

Requested by

GitHub

Duration

00:03:01

Build pipeline

Bot

regal archBOT
north knotBOT
ebon magnetBOT
#

Build 20200901.8 succeeded

Requested by

GitHub

Duration

00:04:37

Build pipeline

Bot

oak estuaryBOT
regal archBOT
ebon magnetBOT
#

Build 20200901.1 failed

Requested by

GitHub

Duration

00:02:01

Build pipeline

Site

ebon magnetBOT
#

Build 20200901.2 succeeded

Requested by

GitHub

Duration

00:02:42

Build pipeline

Site

regal archBOT
north knotBOT
regal archBOT
ebon magnetBOT
#

Build 20200901.3 succeeded

Requested by

Leon Sandรธy

Duration

00:03:59

Build pipeline

Site

ebon magnetBOT
#

Build 20200901.9 succeeded

Requested by

GitHub

Duration

00:03:03

Build pipeline

Bot

regal archBOT
north knotBOT
ebon magnetBOT
#

Build 20200901.10 succeeded

Requested by

GitHub

Duration

00:06:24

Build pipeline

Bot

oak estuaryBOT
north knotBOT
#

Postgres backup completed!

north knotBOT
#
Auto-deployed: metricity
north knotBOT
#
Auto-deployed: metricity
north knotBOT
#
Auto-deployed: metricity
regal archBOT
regal archBOT
regal archBOT
regal archBOT
#

!dormant or !close should also be declined in this case.
Maybe just add a check to dormant command.
Also when this command is cancelled it should mention the user who owns that help channel
in case he types !close and alt tab instantly without noticing the message that his !close request was declined
Mention will show a ping sign on the app icon grabbing the attention that something didn't went right.

regal archBOT
ebon magnetBOT
#

Build 20200902.1 succeeded

Requested by

GitHub

Duration

00:03:41

Build pipeline

Bot

regal archBOT
#
[python-discord/bot] branch deleted: remove\-wolfram
north knotBOT
ebon magnetBOT
#

Build 20200902.2 succeeded

Requested by

Leon Sandรธy

Duration

00:04:51

Build pipeline

Bot

oak estuaryBOT
regal archBOT
ebon magnetBOT
#

Build 20200902.3 succeeded

Requested by

GitHub

Duration

00:02:56

Build pipeline

Bot

regal archBOT
#

Yeah, that sounds okay. You could make it more clever by only using the proxy when it's beneficial (i.e. when it needs to fetch a deleted attachment). This will avoid always making two separate requests. Furthermore, it may not be worth requesting via the normal URL if the proxy fails for attachments specified as deleted by the caller (or maybe let the caller specify use_cached directly). The impression I get is that the success rate of the normal URL for deleted attachments would also be q...

regal archBOT
ebon magnetBOT
#

Build 20200902.1 succeeded

Requested by

GitHub

Duration

00:02:07

Build pipeline

Site

ebon magnetBOT
#

Build 20200902.2 failed

Requested by

Joseph Banks

Duration

00:04:38

Build pipeline

Site

#

Build 20200902.2 failed

Requested by

Joseph Banks

Duration

00:00:00

Build pipeline

Site

#

Build 20200902.2 failed

Requested by

Joseph Banks

Duration

00:00:00

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20200902.2 failed

Requested by

Joseph Banks

Duration

00:00:00

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20200902.2 failed

Requested by

Joseph Banks

Duration

00:00:00

Build pipeline

Site

ebon magnetBOT
#

Build 20200902.3 failed

Requested by

Joseph Banks

Duration

00:00:00

Build pipeline

Site

ebon magnetBOT
#

Build 20200902.4 failed

Requested by

Joseph Banks

Duration

00:00:00

Build pipeline

Site

north knotBOT
regal archBOT
ebon magnetBOT
#

Build 20200902.5 succeeded

Requested by

Joseph Banks

Duration

00:03:57

Build pipeline

Site

regal archBOT
oak estuaryBOT
night lilyBOT
#
SeasonalBot

Connected!

regal archBOT
native joltBOT
regal archBOT
native joltBOT