#dev-log

1 messages · Page 50 of 1

regal archBOT
#

Hi Lalla96. Unfortunately, we're unable to help you with this, as these Github issue tickets are for issues or suggestions regarding the respective project hosted here; in this case, the bot project, which is the code for our community discord bot that allows us to manage our discord server.

If you wish to ask for help on python code, you're welcome to ask in our discord server. If you're not already a member, you can join us here.

Kind regards.

regal archBOT
#
[python-discord/bot] branch deleted: fix/poll
ebon magnetBOT
#

Build 20200728.4 succeeded

Requested by

GitHub

Duration

00:04:50

Build pipeline

Bot

ebon magnetBOT
#

Build 20200728.5 succeeded

Requested by

GitHub

Duration

00:02:40

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200729.1 succeeded

Requested by

GitHub

Duration

00:02:31

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200729.2 succeeded

Requested by

GitHub

Duration

00:04:39

Build pipeline

Bot

oak estuaryBOT
ebon magnetBOT
#

Build 20200729.1 succeeded

Requested by

GitHub

Duration

00:01:16

Build pipeline

Seasonal Bot

north knotBOT
#

Postgres backup completed!

regal archBOT
#
[python-discord/bot] New branch created: no\_mod\_alert\_ping\_for\_dms
ebon magnetBOT
#

Build 20200729.3 succeeded

Requested by

GitHub

Duration

00:02:56

Build pipeline

Bot

ebon magnetBOT
#

Build 20200729.1 failed

Requested by

GitHub

Duration

00:01:58

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20200729.2 failed

Requested by

GitHub

Duration

00:01:39

Build pipeline

Site

ebon magnetBOT
#

Build 20200729.4 failed

Requested by

GitHub

Duration

00:01:52

Build pipeline

Bot

ebon magnetBOT
#

Build 20200729.5 failed

Requested by

GitHub

Duration

00:01:50

Build pipeline

Bot

ebon magnetBOT
#

Build 20200729.6 failed

Requested by

GitHub

Duration

00:01:41

Build pipeline

Bot

ebon magnetBOT
#

Build 20200729.7 failed

Requested by

GitHub

Duration

00:01:46

Build pipeline

Bot

ebon magnetBOT
#

Build 20200729.8 failed

Requested by

GitHub

Duration

00:01:53

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200729.9 failed

Requested by

GitHub

Duration

00:02:06

Build pipeline

Bot

#

Build 20200729.2 failed

Requested by

GitHub

Duration

00:01:46

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20200729.10 succeeded

Requested by

GitHub

Duration

00:03:49

Build pipeline

Bot

oak estuaryBOT
regal archBOT
ebon magnetBOT
#

Build 20200729.3 failed

Requested by

GitHub

Duration

00:01:46

Build pipeline

Site

regal archBOT
#
[python-discord/bot] branch deleted: no\_mod\_alert\_ping\_for\_dms
ebon magnetBOT
#

Build 20200729.11 succeeded

Requested by

GitHub

Duration

00:04:22

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200729.4 succeeded

Requested by

GitHub

Duration

00:02:25

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20200729.5 succeeded

Requested by

GitHub

Duration

00:02:13

Build pipeline

Site

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200729.12 failed

Requested by

GitHub

Duration

00:02:26

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200729.13 succeeded

Requested by

GitHub

Duration

00:02:54

Build pipeline

Bot

regal archBOT
#

This works really well. I really only have one requested change.

  • Do you think explicit feedback if a command fails would be useful? One can only assume if it lacks a reaction.
  • Having to include the dot for file extensions may trip people up, but I think changing the anti-malware code to support the lack of a dot would be annoying.
  • I wish there was a way to show which list types are supported in the help text for commands. Right now, the only way to see that is to put some bad list ...
regal archBOT
ebon magnetBOT
#

Build 20200729.14 succeeded

Requested by

GitHub

Duration

00:02:18

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200729.15 succeeded

Requested by

GitHub

Duration

00:02:17

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200729.16 succeeded

Requested by

GitHub

Duration

00:02:35

Build pipeline

Bot

oak estuaryBOT
regal archBOT
#

I think that this has less to do with DRF and more to do with Django: According to the documentation, auto_now and auto_now_add fields just ignore any value that you try to pass to it. This is what auto_now_add says:

Note that the current date is always used; it’s not just a default value that you can override. So even if you set a value for this field when creating the object, it will be ignored.

The comment for auto_add is similar, but does not include the `creating the obj...

regal archBOT
north knotBOT
#

Postgres backup completed!

ebon magnetBOT
#

Build 20200730.1 succeeded

Requested by

GitHub

Duration

00:02:21

Build pipeline

Site

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200730.2 failed

Requested by

GitHub

Duration

00:02:10

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20200730.3 succeeded

Requested by

GitHub

Duration

00:01:57

Build pipeline

Site

ebon magnetBOT
#

Build 20200730.1 has been canceled

Requested by

GitHub

Duration

00:09:06

Build pipeline

Bot

#

Build 20200730.1 succeeded

Requested by

GitHub

Duration

00:04:14

Build pipeline

Bot

regal archBOT
#
[python-discord/bot] branch deleted: fix/message\_pin
ebon magnetBOT
#

Build 20200730.2 succeeded

Requested by

GitHub

Duration

00:06:28

Build pipeline

Bot

oak estuaryBOT
regal archBOT
regal archBOT
#
[python-discord/bot] New branch created: fix/webhook\_remover
ebon magnetBOT
#

Build 20200730.3 succeeded

Requested by

GitHub

Duration

00:02:53

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200730.5 succeeded

Requested by

GitHub

Duration

00:02:55

Build pipeline

Bot

ebon magnetBOT
#

Build 20200730.6 succeeded

Requested by

GitHub

Duration

00:02:58

Build pipeline

Bot

regal archBOT
#
[python-discord/bot] branch deleted: fix/webhook\_remover
ebon magnetBOT
#

Build 20200730.7 succeeded

Requested by

Leon Sandøy

Duration

00:04:47

Build pipeline

Bot

ebon magnetBOT
#

Build 20200730.8 succeeded

Requested by

GitHub

Duration

00:02:47

Build pipeline

Bot

regal archBOT
regal archBOT
#

Okay, I agree that the snippet stuff could be interesting, so thanks for writing that.

I have a few thoughts:

  • Maybe these messages should be sent using a webhook. The cog would probably have to create a webhook if one didn't readily exist, but we've done stuff like that before. The benefit of this would be that the github snippets then could be sent with a github avatar and the name GitHub and would look far more native that way.
  • I think it's a little simplistic to just bundle all th...
regal archBOT
regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200731.1 succeeded

Requested by

GitHub

Duration

00:02:39

Build pipeline

Bot

#

Build 20200731.2 succeeded

Requested by

GitHub

Duration

00:02:42

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200731.3 succeeded

Requested by

Leon Sandøy

Duration

00:04:56

Build pipeline

Bot

oak estuaryBOT
regal archBOT
#

on_message uses a lock to ensure messages sent in available channels are processed sequentially. After it acquires the lock, it checks if the channel has already been moved out of available. If it has, then it aborts further processing. The problem is that this relies on Discord moving the channel in a reasonable amount of time. If it happens slowly, then the next message that acquires the lock will still think the channel can be claimed.

This is because only the request to move the cha...

#

The current threshold is way too low, but some of us have doubts on its usefulness. The wait_until_guild_available solution should prevent the cache from ever being empty. It even explicitly checks that the cache isn't empty and avoids setting the event. That being said, there may be some strange situation in which the bot receives a partial cache from Discord.

If it's not removed, then the thresholds should at least be increased. I also had the idea of only applying the size check to th...

regal archBOT
#
[python-discord/snekbox] New branch created: python\-Levenshtein
regal archBOT
ebon magnetBOT
#

Build 20200731.1 succeeded

Requested by

GitHub

Duration

00:01:59

Build pipeline

Snekbox

oak estuaryBOT
regal archBOT
#
[python-discord/snekbox] branch deleted: python\-Levenshtein
ebon magnetBOT
#

Build 20200801.1 succeeded

Requested by

GitHub

Duration

00:03:43

Build pipeline

Snekbox

regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
ebon magnetBOT
#

Build 20200801.1 succeeded

Requested by

GitHub

Duration

00:02:47

Build pipeline

Bot

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200801.1 succeeded

Requested by

Leon Sandøy

Duration

00:01:08

Build pipeline

Django Simple Bulma

regal archBOT
#

I think that there is a potential race condition here, as acquiring the lock is a coroutine. In theory, that means that two competing tasks can make it beyond the not lock.locked(), with the first then acquiring the lock and the second one "waiting at the gates". That would negate the "only one simultaneous call should be allowed, the rest should be ignored" goal that is I think the main purpose of the decorator.

In fact, we don't really care about this being an asyncio.Lock at all: We...

regal archBOT
regal archBOT
#

A closer inspection of the source code suggests that the race condition may not occur, since the first point where the await chain will be suspended is after setting the sentinal self._locked to True. That said, I'm not entirely sure if my understanding of how scheduled tasks are suspended is good enough to figure this out. I think it would work like I think it does if it were yield from chains, which suspend at the inner yield subgenerator.

#
[python-discord/django-simple-bulma] New branch created: linting\_workflow\_test
#
[python-discord/django-simple-bulma] New tag created: v1\.3\.0
regal archBOT
regal archBOT
#
  File "C:\Users\maku\.virtualenvs\friendly-frogs-ICo_ojhS\lib\site-packages\django_simple_bulma\finders.py", line 17, in 
    class SimpleBulmaFinder(BaseFinder):
  File "C:\Users\maku\.virtualenvs\friendly-frogs-ICo_ojhS\lib\site-packages\django_simple_bulma\finders.py", line 171, in SimpleBulmaFinder
    def list(self, _: List[str]) -> Tuple(str, FileSystemStorage):
  File "c:\users\maku\appdata\local\programs\python\python38-32\lib\typing.py", line 724, in __call__
    raise Typ...
#
[python-discord/django-simple-bulma] New branch created: issues/51/fix\-incorrect\-type\-hint
#
[python-discord/django-simple-bulma] New tag created: v1\.3\.1
#
[python-discord/django-simple-bulma] tag deleted: v1\.3\.1
#
[python-discord/django-simple-bulma] New tag created: v1\.3\.1
#
[python-discord/django-simple-bulma] New tag created: v1\.3\.2
#

The decorator coroutine can't yield control on synchronous code. Once one decorator starts executing, any other decorator (actually, the entire program) will be completely blocked until the first decorator reaches an await somewhere, like in id_ = await id_ or when the lock is acquired. If there was an await between the if condition and the async with, then that could indeed cause a race condition. But this is not the case here since it immediately tries to enter the context manager.

#

The decorator coroutine can't yield control on synchronous code. Once one decorator starts executing, any other decorator (actually, the entire program) will be completely blocked until the first decorator reaches an await somewhere, like in id_ = await id_ or when the lock is acquired. If there was an await between the if condition and the async with, then that could indeed cause a race condition. But this is not the case here since it immediately tries to enter the context manager.

...

#

To make the implicit await in the context manager a bit more explicit, this is the equivalence code, according the docs:

await lock.acquire()  # <- this is where the await is hiding
try:
    return await func(example_id)
finally:
    lock.release()

With the context manager, there are two coroutines involved in the context manager: __aenter__, which then awaits Lock.acquire.

ebon magnetBOT
#

Build 20200801.2 succeeded

Requested by

GitHub

Duration

00:02:11

Build pipeline

Bot

regal archBOT
#

That's correct, but this works based on the assumption that the lock will be immediately acquired if it's available, which is correct:

    async def acquire(self):
        if (not self._locked and (self._waiters is None or
                all(w.cancelled() for w in self._waiters))):
            self._locked = True
            return True

I get your question now. I'm not sure, but I don't think that merely an await can yield control. I think the coroutine has to actuall...

#

I get your question now. I'm not sure, but I don't think that merely an await can yield control. I think the coroutine has to actually be doing something asynchronous, like using a future.

That's the main question I had, yes. If my generator-based analogy with yield from holds, scheduling a task would mean running it to the inner most await that is waiting for a future. If that's the case, our acquisition of the lock would happen synchronously, as we hit upon this if before any suc...

regal archBOT
regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
regal archBOT
regal archBOT
#
[python-discord/bot] New branch created: kwzrd/verification
regal archBOT
#

I looked into this and doing it would add a lot of irrelevant files. The Bulma repo also has the source for its documentation which accounts for 76MB of it's download size, while the files we would need are only 132KB of sass. On top of that, the documentation contains filenames with characters such as ú and í that cause pip to spit out UnicodeDecodeErrors.

If someone knows a way to do a partial git submodule (i.e. only include certain subdirectories of the repo) please let me know :)

#

hmm, 76MB of documentation sounds suboptimal, yeah.

I'm thinking that it's not a problem if there's 76MB in this repo as long as we don't include it in the PyPI releases, so perhaps it would be possible to solve this in the build? Like, we somehow build this package but exclude all the documentation in the build process? or delete it from the dist folder after the build is complete?

regal archBOT
regal archBOT
#

This is a draft PR to action https://github.com/python-discord/organisation/issues/276. If you cannot see this issue, a summary is below.

Increase verification rate

The aim is to reduce the amount of dormant users present in the guild without the @Developers role. This problem has become more pronounced after we allowed non-verified users to read all public channels (the justification is to allow users lurking from Discovery to see more than the verification channel). As an unfortun...

ebon magnetBOT
#

Build 20200802.1 succeeded

Requested by

GitHub

Duration

00:02:48

Build pipeline

Bot

regal archBOT
#

Our release workflow is here, if you're curious: https://github.com/python-discord/django-simple-bulma/blob/master/.github/workflows/release.yml

So building and publishing to PyPI is very easy, it just runs the setup.py to build a dist folder and then pushes that to PyPI. I suspect that there's some way to specify stuff we want to ignore inside the setup.py file itself, but I'm not well-versed enough with setuptools / distools to say exactly how that works.

If there isn't, we cou...

regal archBOT
ebon magnetBOT
#

Build 20200802.2 succeeded

Requested by

GitHub

Duration

00:02:54

Build pipeline

Bot

regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
regal archBOT
#
[python-discord/django-simple-bulma] branch deleted: linting\_workflow\_test
#
[python-discord/django-simple-bulma] branch deleted: issues/51/fix\-incorrect\-type\-hint
#
[python-discord/django-simple-bulma] New branch created: submodule\_refactor
#

I can change it - this was probably changed by my IDE, not a conscious choice - but I do think both approaches have clear advantages, and that there's no clear winner. This style makes a clearer visual separation between the paramters and the function body, and yeah, PEP8 does suggest it. On the other hand, PEP8 also says "adhere to prevailing style", so no clear winner.

ebon magnetBOT
#

Build 20200803.2 succeeded

Requested by

GitHub

Duration

00:04:53

Build pipeline

Bot

regal archBOT
#
[python-discord/site] branch deleted: whitelist\_system
ebon magnetBOT
#

Build 20200803.1 succeeded

Requested by

Leon Sandøy

Duration

00:04:01

Build pipeline

Site

regal archBOT
#

Sometimes when we run a deployment of a new version of the site, it is hard to know whether the deployment succeeded. Maybe we only changed minor things in an API endpoint, and it's hard to verify without making a bunch of API requests or SSHing into the server.

To remedy this, I'd like to make two minor changes:

  • Include a comment in the base template which has the current git hash. This will allow us to then go to https://pythondiscord.com and look at the source to determine precisely ...
#
[python-discord/bot] branch deleted: whitelist\_system
ebon magnetBOT
#

Build 20200803.3 succeeded

Requested by

Leon Sandøy

Duration

00:05:54

Build pipeline

Bot

regal archBOT
#

If we want the extensions to be submodules too, we probable have to do it like these people have https://github.com/Wikiki/bulma-extensions. It shouldn't be too much trouble, since all the extensions (afaik) have this structure "/src/sass/" and that would just have to be isolated.

About the PyPi builds, running python setup.py sdist bdist_wheel only includes the "/bulma/sass/" directory in the "build/" because I added these two lines to the MANIFEST.in

prune django_simple_bulma/bul...
oak estuaryBOT
regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200803.2 succeeded

Requested by

Leon Sandøy

Duration

00:03:53

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20200803.4 succeeded

Requested by

Leon Sandøy

Duration

00:05:44

Build pipeline

Bot

oak estuaryBOT
regal archBOT
ebon magnetBOT
#

Build 20200803.5 succeeded

Requested by

Leon Sandøy

Duration

00:04:56

Build pipeline

Bot

regal archBOT
oak estuaryBOT
regal archBOT
regal archBOT
#

This closes #45

I don't know how much of a difference preloading makes, browsers supposedly figure that kind of stuff themselves anyway.
I chose defer (over async) for the script tags because that doesn't block the HTML parser. Some of the extensions, like the accordion, also require that you attach them. If we use async, a user who has written a minimal script with only the attach command might get executed before the accordion, and it would fail.

I tested it in a Chromium base...

regal archBOT
#
[python-discord/bot] New branch created: support\_plural\_filterlist\_types
ebon magnetBOT
#

Build 20200803.6 succeeded

Requested by

GitHub

Duration

00:02:44

Build pipeline

Bot

regal archBOT
#
[python-discord/bot] branch deleted: support\_plural\_filterlist\_types
ebon magnetBOT
#

Build 20200803.7 succeeded

Requested by

GitHub

Duration

00:04:49

Build pipeline

Bot

regal archBOT
oak estuaryBOT
oak estuaryBOT
regal archBOT
#

Sentry Issue: BOT-7Q

The poll command puts the poll's question in the embed's title, which has a maximum character limit of 256. Instead of letting the exception for a 400 response status propagate, an error should be displayed to the user indicating the question given is too long. Automatic truncation is probably a bad idea in this context. The user should manually figure out a shorter phrasing.

#

Sentry Issue: BOT-7K

This happens if the target command is one which has been added via internal eval or some other dynamic method, so it's really low priority.

I think it'd be most convenient to let the error propagate a bit and handle it here https://github.com/python-discord/bot/blob/3649c2a03dc158a25f2c3be98db8691f903a1953/bot/cogs/source.py#L59

OSError: could not get source co...
regal archBOT
ebon magnetBOT
#

Build 20200803.3 succeeded

Requested by

GitHub

Duration

00:02:16

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20200803.8 succeeded

Requested by

GitHub

Duration

00:03:00

Build pipeline

Bot

north knotBOT
#

Postgres backup completed!

regal archBOT
ebon magnetBOT
#

Build 20200804.1 failed

Requested by

GitHub

Duration

00:01:40

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20200804.2 failed

Requested by

GitHub

Duration

00:02:05

Build pipeline

Site

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200804.3 succeeded

Requested by

GitHub

Duration

00:02:22

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20200804.4 succeeded

Requested by

GitHub

Duration

00:02:30

Build pipeline

Site

#

Build 20200804.1 succeeded

Requested by

Joseph Banks

Duration

00:05:24

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200804.2 succeeded

Requested by

GitHub

Duration

00:02:37

Build pipeline

Bot

regal archBOT
#
[python-discord/bot] New branch created: bug/filters/1027/ignore\-webhook\-names
ebon magnetBOT
#

Build 20200804.3 succeeded

Requested by

GitHub

Duration

00:02:42

Build pipeline

Bot

regal archBOT
#
[python-discord/bot] New branch created: bug/util/1079/long\-poll\-titles
ebon magnetBOT
#

Build 20200804.4 succeeded

Requested by

GitHub

Duration

00:02:35

Build pipeline

Bot

regal archBOT
#
[python-discord/bot] New branch created: bug/help/1082/unpin\-id\-none
#

Fixes #1082 - don't unpin message if the message ID is None. This only really happened when the pin feature was added and the cache was empty, but it doesn't hurt to check anyway.

The check for an empty channel was not accounting for the bot's pins_add message and therefore did not re-schedule the channel to be made dormant earlier when messages were deleted. It has been fixed by searching for the bot's available message embed within the last 100 messages and ensuring every message lea...

ebon magnetBOT
#

Build 20200804.5 succeeded

Requested by

GitHub

Duration

00:02:35

Build pipeline

Bot

regal archBOT
#

Further work on #42
Closes #7

I didn't include some extensions because they were extremely out of date or simple not worth the time. Most of the extensions are made by the same guy, so their directory structure all match up, but others have wildly differing setups. I tried my best to have it figure out what files are relevant, meaning adding new extensions should only be a matter of running:

git submodule add 
git mv ./[extension_name]/ ./django_simple_bulma/extensions/[extension...
regal archBOT
#
[python-discord/bot] New branch created: bug/backend/1080/cog\-reload\-cancel\-scheduler
ebon magnetBOT
#

Build 20200805.1 succeeded

Requested by

GitHub

Duration

00:02:44

Build pipeline

Bot

regal archBOT
#
[python-discord/bot] New branch created: bug/util/1083/source\-dynamic\-obj
ebon magnetBOT
#

Build 20200805.2 succeeded

Requested by

GitHub

Duration

00:02:32

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200805.3 succeeded

Requested by

GitHub

Duration

00:02:38

Build pipeline

Bot

regal archBOT
#
[python-discord/bot] New branch created: bug/help/1074/duplicate\-claim
#

Using the channel's category isn't reliable since it may take Discord a while to actually move the channel once it's received a request from the bot. I suppose using redis technically has the same problem, but it should be much faster and less susceptible to lag than Discord. If it's still a problem down the road, we can consider waiting for the channel update event from Discord. I didn't go for that solution right away since it's relatively more complicated and the gateway cannot exactly alw...

ebon magnetBOT
#

Build 20200805.4 succeeded

Requested by

GitHub

Duration

00:02:38

Build pipeline

Bot

night lilyBOT
#
SeasonalBot

Connected!

oak estuaryBOT
#

<@&267628507062992896> WARNING: Unable to get DEFCON settings!

regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
regal archBOT
#

The RedisCache wrapper currently suffers from a bug which can cause an AttributeError if a value is looked up before the bot's redis_session attribute is set.

Problem

Let's imagine that a cog using the RedisCache schedules a task which will perform a lookup. There is no guarantee that the cache is ready, and so the cache API methods always wait for the ready event to be set.

However, as soon as the cache attribute is accessed, the __get__ method assigns the `self._redis...

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

Build 20200805.5 succeeded

Requested by

GitHub

Duration

00:03:03

Build pipeline

Bot

regal archBOT
#
[python-discord/bot] branch deleted: bug/help/1074/duplicate\-claim
north knotBOT
ebon magnetBOT
#

Build 20200805.6 succeeded

Requested by

GitHub

Duration

00:04:57

Build pipeline

Bot

oak estuaryBOT
regal archBOT
north knotBOT
ebon magnetBOT
#

Build 20200805.7 succeeded

Requested by

GitHub

Duration

00:04:56

Build pipeline

Bot

oak estuaryBOT
regal archBOT
regal archBOT
#
[python-discord/bot] branch deleted: bug/util/1083/source\-dynamic\-obj
north knotBOT
ebon magnetBOT
#

Build 20200805.8 succeeded

Requested by

GitHub

Duration

00:04:42

Build pipeline

Bot

oak estuaryBOT
regal archBOT
#
[python-discord/bot] New branch created: bug/help/1074/duplicate\-claim
ebon magnetBOT
#

Build 20200805.9 succeeded

Requested by

GitHub

Duration

00:02:34

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200806.1 succeeded

Requested by

GitHub

Duration

00:02:51

Build pipeline

Bot

regal archBOT
#
[python-discord/bot] branch deleted: kwzrd/fix\-1090
north knotBOT
ebon magnetBOT
#

Build 20200806.2 succeeded

Requested by

GitHub

Duration

00:04:53

Build pipeline

Bot

oak estuaryBOT
regal archBOT
ebon magnetBOT
#

Build 20200806.3 succeeded

Requested by

GitHub

Duration

00:02:50

Build pipeline

Bot

north knotBOT
ebon magnetBOT
#

Build 20200806.4 succeeded

Requested by

GitHub

Duration

00:04:53

Build pipeline

Bot

oak estuaryBOT
regal archBOT
north knotBOT
ebon magnetBOT
#

Build 20200806.5 succeeded

Requested by

GitHub

Duration

00:05:06

Build pipeline

Bot

oak estuaryBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
#

This sounds pretty easy. It can generate a timeit() code snippet and insert the given code into the first argument. It'd need to have a way to escape quotes. That new code can then be sent to Snekbox.

Supporting multiple code snippets is possible, but adds complexity to the input parser. Furthermore, Snekbox still has a time limit which all snippets would share. I think it's best to not support that; it isn't much trouble for users to invoke a separate eval.

regal archBOT
#

This is actually tricky to implement since it's not possible to remove arbitrary items from the channel queue. It uses an asyncio.Queue so it can block and wait until a channel becomes dormant. I'm sure there are ways to accomplish that without the queue, but they probably aren't as elegant.

There would also be a race condition between re-opening a channel and the channel being moved to available, which seems especially troublesome if a coroutine is waiting for a channel to go dormant so...

regal archBOT
#
[python-discord/bot] New branch created: discord\.py\-1\.4
ebon magnetBOT
#

Build 20200806.6 succeeded

Requested by

GitHub

Duration

00:03:40

Build pipeline

Bot

regal archBOT
regal archBOT
regal archBOT
#
[python-discord/bot] branch deleted: discord\.py\-1\.4
north knotBOT
ebon magnetBOT
#

Build 20200806.7 succeeded

Requested by

GitHub

Duration

00:05:26

Build pipeline

Bot

oak estuaryBOT
regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200807.1 succeeded

Requested by

GitHub

Duration

00:02:52

Build pipeline

Bot

regal archBOT
#
[python-discord/bot] branch deleted: bug/help/1074/duplicate\-claim
north knotBOT
ebon magnetBOT
#

Build 20200807.2 succeeded

Requested by

GitHub

Duration

00:04:14

Build pipeline

Bot

oak estuaryBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
regal archBOT
#

There is a bug in the _to_typestring conversion method.

https://github.com/python-discord/bot/blob/02d1dd1b5034778f6bfc296317c9241e93395b2a/bot/utils/redis_cache.py#L108-L121

When converting values, the first tuple in prefixes is ("f|", float). The conditional on line 113 then triggers and returns f|0 or f|1. On the way out, the int get cast to float as per the typestring and so we get 1.0 or 0.0.

The test_set_get_item test function does not catch this because it comp...

regal archBOT
regal archBOT
regal archBOT
regal archBOT
#

I think this should be ready for review now. Decided to add a super simple command interface for the internal tasks, it offers the following commands:

!verification status: check whether internal tasks are running
!verification start: start both internal tasks, if not already running (no-op otherwise)
!verification stop: stop both tasks if running, no-op otherwise

I don't think we need granular, per-task control. It's mostly there so that we can turn off the tasks if...

ebon magnetBOT
#

Build 20200807.3 succeeded

Requested by

GitHub

Duration

00:02:39

Build pipeline

Bot

regal archBOT
#

Testing is a little bit tricky but you will want to manually change the values of:
UNVERIFIED_AFTER
KICKED_AFTER

And probably use an alt in the testing server to see how the bot reacts to it. I'm not sure how this could be tested at scale. Please pay special attention to the way members for kicking are chosen, and the authorization process in _verify_kick.

I could do some unit tests if reviewers consider it necessary but I'm still totally burnt out from the testing suite for #99...

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200807.4 succeeded

Requested by

GitHub

Duration

00:03:02

Build pipeline

Bot

regal archBOT
regal archBOT
#

One of the most common questions in #python-general is what project one should do. This could be answered with a simple tag called !projects, just like !resources is used when people need help with getting started and !tools for questions about which IDE or editor they should use.

Just like other tags, this one could return a link to an article on the website with all relevant information.

regal archBOT
#

f553785 HelpChannels: move unpinning to separate function - MarkKoz
9b9a439 HelpChannels: add more detail to unpin log mess... - MarkKoz
6f31a11 HelpChannels: don't unpin message if ID is None - MarkKoz
a58b4e1 HelpChannels: create a generic function to hand... - MarkKoz
4b7f192 HelpChannels: create separate function to pin a... - MarkKoz

#
[python-discord/bot] branch deleted: bug/help/1082/unpin\-id\-none
north knotBOT
ebon magnetBOT
#

Build 20200807.5 succeeded

Requested by

GitHub

Duration

00:04:58

Build pipeline

Bot

oak estuaryBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
#

I do usually colour embeds but in this case it wasn't clear to me exactly what would determine the colours. There's a lot that can happen, no members are found, some are found but some requests fail, all requests fail, request isn't authorized, etc. For this reason I decided to just colour it blurple so that it looks more appealing but doesn't mislead. Colouring the embed red if the request isn't authorized but the roles are still assigned feels off to me ~ technically nothing has gone wrong,...

ebon magnetBOT
#

Build 20200808.1 succeeded

Requested by

GitHub

Duration

00:03:05

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200808.2 succeeded

Requested by

GitHub

Duration

00:02:51

Build pipeline

Bot

regal archBOT
regal archBOT
#

There likely isn't much need to see the exact time, so "Actioned by x#1234 after 53 minutes · 2020-08-06" sounds like a good alternative.

This seems to be a good solution to the issue. Only think I’d say is perhaps using “6th August [2020]” rather than “2020-08-06” due to the American vs Non-American way of doing dates, although I suppose this isn’t a big deal as long as users are aware of the format being used.

regal archBOT
north knotBOT
ebon magnetBOT
#

Build 20200808.3 succeeded

Requested by

Joseph Banks

Duration

00:04:24

Build pipeline

Bot

oak estuaryBOT
regal archBOT
regal archBOT
north knotBOT
regal archBOT
ebon magnetBOT
#

Build 20200808.1 succeeded

Requested by

GitHub

Duration

00:03:36

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20200808.4 succeeded

Requested by

GitHub

Duration

00:02:29

Build pipeline

Bot

north knotBOT
#

Postgres backup completed!

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200809.1 succeeded

Requested by

GitHub

Duration

00:02:58

Build pipeline

Bot

regal archBOT
#
[python-discord/bot] branch deleted: bug/util/1079/long\-poll\-titles
#
[python-discord/bot] branch deleted: bug/filters/1027/ignore\-webhook\-names
ebon magnetBOT
#

Build 20200809.3 succeeded

Requested by

GitHub

Duration

00:02:44

Build pipeline

Bot

north knotBOT
ebon magnetBOT
#

Build 20200809.2 succeeded

Requested by

GitHub

Duration

00:04:32

Build pipeline

Bot

oak estuaryBOT
north knotBOT
ebon magnetBOT
#

Build 20200809.4 succeeded

Requested by

GitHub

Duration

00:04:32

Build pipeline

Bot

oak estuaryBOT
regal archBOT
regal archBOT
#

Description

#python-general and other python-related channels sometimes go offtopic. Implementation of this issue will add topics for specific python channels, so there aren't generic topics. If no topics can be found, the user will know because the bot will tell them.

Reasoning

It could be hard to come up with a topic on the spot to continue the conversation, or maybe people just can't come up with one to discuss. This issue will solve that problem.

Proposed Implemen...

#

Here's another draft. Opinions?

{
    "default": [
        "What's your favorite PEP?",
        "What's your current text editor/IDE, and what functionality do you like about it the most when programming in Python?",
        "What functionality is your text editor/IDE missing for programming Python?",
        "What parts of your life has Python automated, if any?"
    ],
    "channels": {
        "1234": ["One topic", "A second topic!"],
        "5678": ["A third topic.", ...
regal archBOT
#
[python-discord/seasonalbot] New branch created: python\-topics
regal archBOT
regal archBOT
#

Relevant Issues

Opens up topic suggestions within #426 at the same time putting the base in so topics can be inserted.

Description

Channels that are Python-related have now been overridden with the override_in_channel decorator so Seasonalbot is able to talk in them. The command will try to find a topic while in this channel by searching a JSON file py_topics.json with the channel ID. If one is found, it will be sent. If one cannot be found, then the bot will link to #42...

ebon magnetBOT
#

Build 20200809.1 succeeded

Requested by

GitHub

Duration

00:01:22

Build pipeline

Seasonal Bot

regal archBOT
#

When the infraction search command is invoked directly through the search group, a discord api request is made to search for an User matching it in the InfractionSearchQuery converter, with the only use of that User object being the api query id and the embed title for the infraction list.

Is the search command used commonly with non id arguments when the user is not present in the server?
This fetching behavior seems inconsistent with the reliance on the cache in other non critical pl...

regal archBOT
ebon magnetBOT
#

Build 20200810.1 succeeded

Requested by

GitHub

Duration

00:03:04

Build pipeline

Bot

regal archBOT
north knotBOT
ebon magnetBOT
#

Build 20200810.2 succeeded

Requested by

GitHub

Duration

00:04:32

Build pipeline

Bot

oak estuaryBOT
regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200810.3 succeeded

Requested by

GitHub

Duration

00:02:39

Build pipeline

Bot

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200810.1 failed

Requested by

GitHub

Duration

00:01:02

Build pipeline

Seasonal Bot

regal archBOT
#

@Numerlor I believe a fetch is done to have a clear distinction between users and reasons. Keep in mind, sometimes queries are done on users that are not in the guild. In such cases, relying on the cache will not work.

Only case I can think of where there would be a difference between fetching from the api and trying to validate a provided ID is where a valid user ID is provided, but the user doesn't exist. Is such an edge case worth it when all the user infraction data is fetched from t...

ebon magnetBOT
#

Build 20200810.2 succeeded

Requested by

GitHub

Duration

00:00:55

Build pipeline

Seasonal Bot

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200810.3 failed

Requested by

GitHub

Duration

00:00:58

Build pipeline

Seasonal Bot

regal archBOT
ebon magnetBOT
#

Build 20200810.4 succeeded

Requested by

GitHub

Duration

00:01:13

Build pipeline

Seasonal Bot

regal archBOT
regal archBOT
#

When !docs print is run, python returns the documentation for the print function.

Often times, the docs returned may not be what was expected or the user simply wanted to do a quick check and then get rid of the large embed. In both of those cases, the option to delete the response would be perfect.

This is already implemented for commands such as !eval, where a 🗑 reaction can be clicked to delete the response. The logic could simply be carried over.

ebon magnetBOT
#

Build 20200810.5 succeeded

Requested by

GitHub

Duration

00:01:11

Build pipeline

Seasonal Bot

ebon magnetBOT
#

Build 20200810.6 succeeded

Requested by

GitHub

Duration

00:00:59

Build pipeline

Seasonal Bot

regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
regal archBOT
#
[python-discord/bot] New branch created: kwzrd/verification\-2
regal archBOT
regal archBOT
oak estuaryBOT
regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200812.1 succeeded

Requested by

GitHub

Duration

00:02:52

Build pipeline

Bot

regal archBOT
north knotBOT
ebon magnetBOT
#

Build 20200812.2 succeeded

Requested by

GitHub

Duration

00:04:36

Build pipeline

Bot

oak estuaryBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
regal archBOT
#

I didn't include some extensions because they were extremely out of date or simple not worth the time
Which ones?

this is definitely not backwards compatible, because of this I suggest that when this branch is merged we release it as v2
I agree. That was going to be my suggestion, too.

I also haven't tested the custom variables some of the extensions use.
That's okay, this was never tested before the initial v1.0 release either. If someone runs into a problem with them, they c...

#

I'm wondering if we should just remove this bit. It seems like a lot of people are probably going to be loading all the extensions when in fact they're not using any of them, just because they didn't read the readme carefully enough. In fact, I think even the Python Discord website was doing that earlier - it might even still be doing that, maybe I just made an issue to fix it and never actually fixed it.

I'm not sure why I did this in the first place, but it seems silly to default to load...

regal archBOT
#

Wouldn't you also have to change the MANIFEST.in file? I'm wondering if maybe we should document how to add these additional submodules in the wiki or something.

That depends on the extension. Out of 19 extensions I only needed a special case for two in the MANIFEST.in.

Which ones?

Some where duplicates (like steps and tags-input), another is the iconpicker that doesn't even work on the website. The dashboard and blocklist ones are also excluded, I think i had some trouble makin...

regal archBOT
regal archBOT
#
[python-discord/bot] New branch created: bug/filters/1099/dupe\-offensive\-msg
ebon magnetBOT
#

Build 20200812.3 succeeded

Requested by

GitHub

Duration

00:02:46

Build pipeline

Bot

regal archBOT
regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
regal archBOT
#

If we want this to be a setting that can be toggled on and off, we may need to bundle https://github.com/jazzband/django-pipeline with this app and then process the files through that.

Otherwise, if we were okay with just sticking minified JS right into our PyPI package, we could use something like https://github.com/evanw/esbuild and just minify when we build for release.

The first approach makes this package a little fatter by adding another dependency, while the second is lean but do...

regal archBOT
regal archBOT
#

We're probably getting close to being ready for a v2.0 release. Since this will include major changes, we're bumping the major version for this release.

What's left to do?

We should solve the following issues before v2.0 release:

Because why not, they're all very quick and easy.

We ...

#
[python-discord/django-simple-bulma] New branch created: version\-2\-0\-0
#

It would be nice to get this solved before we release v2.0.0.

I'm a little bit on the fence about it. On one hand, this has been convenient in other projects where it has been added. On the other hand, it's a little less applicable to this project (for example, we don't have any yaml files). More importantly, this PR was written before we switched to GitHub Actions, and has to be completely rewritten.

I guess I'd be open to a rewrite, but I don't really want to spend time on doing o...

regal archBOT
ebon magnetBOT
#

Build 20200813.1 succeeded

Requested by

GitHub

Duration

00:03:09

Build pipeline

Bot

regal archBOT
#
[python-discord/bot] branch deleted: kwzrd/verification\-2
regal archBOT
#

I added a generic executor in 1958978 and then adjusted the two methods to use it in dc70a01. The idea is similar to what I was showing to you earlier, but that solution was flawed due to the fact the the built coros weren't able to communicate whether they aborted due to is_verified(member) giving True. This should no longer be a problem with this new approach, as I was able to move the check outside of the coro.

ebon magnetBOT
#

Build 20200813.2 succeeded

Requested by

GitHub

Duration

00:02:36

Build pipeline

Bot

regal archBOT
north knotBOT
ebon magnetBOT
#

Build 20200813.3 succeeded

Requested by

GitHub

Duration

00:04:36

Build pipeline

Bot

oak estuaryBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
north knotBOT
regal archBOT
ebon magnetBOT
#

Build 20200813.1 succeeded

Requested by

GitHub

Duration

00:03:49

Build pipeline

Site

regal archBOT
#
[python-discord/bot] New branch created: feat/backend/160/cog\-subdirs
regal archBOT
regal archBOT
regal archBOT
regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
#

Resolves #160

Restructure

This restructure helps with organisation and declutters the cogs directory. The subdirectories roughly correspond to how issues and PRs were being labelled here on GitHub. Tests have been restructured to mirror this. Several extensions were left uncategorised in the main directory, though I did briefly consider a fun subdirectory for dm_relay, duck_pond, and off_topic_names.

.
├── backend
│   ├── sync
│   │   ├── __init__.py
│   │   ├...
ebon magnetBOT
#

Build 20200814.1 failed

Requested by

GitHub

Duration

00:01:52

Build pipeline

Bot

regal archBOT
regal archBOT
regal archBOT
#

Rationale

During an eval demonstration, it'd be nice to be able to insert text before and after the codeblock to comment it, instead of putting actual comments in the code, or sending two messages.

Specifications

Here is the current regex used to extract the code of a message is this one :

https://github.com/python-discord/bot/blob/b27c286f2ce648d021eed0c8e07476066b86dd98/bot/cogs/snekbox.py#L22-L32

We could simply insert a .* before and after to make it work, as in [t...

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200814.2 failed

Requested by

GitHub

Duration

00:02:54

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200814.3 succeeded

Requested by

GitHub

Duration

00:03:06

Build pipeline

Bot

#

Build 20200814.4 succeeded

Requested by

GitHub

Duration

00:02:22

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200814.5 succeeded

Requested by

GitHub

Duration

00:02:41

Build pipeline

Bot

regal archBOT
#

689e520 is an attempt at throttling the requests so that the bot doesn't drown in ratelimits.

The chosen values are mostly semi-educated guesses based on the following:

REST:
        POST Message |  5/5s    | per-channel
      DELETE Message |  5/1s    | per-channel
 PUT/DELETE Reaction |  1/0.25s | per-channel
        PATCH Member |  10/10s  | per-guild
   PATCH Member Nick |  1/1s    | per-guild
      PATCH Username |  2/3600s | per-account
      |All Requests| |  50/1s   | ...
ebon magnetBOT
#

Build 20200814.6 succeeded

Requested by

GitHub

Duration

00:02:32

Build pipeline

Bot

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

Build 20200814.7 succeeded

Requested by

GitHub

Duration

00:02:33

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200814.8 succeeded

Requested by

GitHub

Duration

00:03:34

Build pipeline

Bot

regal archBOT
#

I'm not sure, I think I just felt like both ints configure one thing, so it made sense to me to group them together. It also keeps the function signature a little bit cleaner & shorter. Instead of documenting them in the _send_request docstring I can explain what the composition is, and then just refer to the type. They can be separate if you prefer.

I had originally created this:

ThrottledRequest = t.Tuple[Request, Limit]

... but eventually abandoned the idea.

regal archBOT
regal archBOT
#

We concluded a gather doesn't make sense due to rate limits. It probably isn't smart enough to know a separate request has triggered a rate limit, so it'll keep spamming the rest of the requests and rate limit the bot even harder. However, I haven't confirmed that. Regardless, we're going to be waiting a long time to finish all the requests so it doesn't make a difference if they are all scheduled at the start of an interval or spread out over the interval.

north knotBOT
#

Postgres backup completed!

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200815.1 failed

Requested by

GitHub

Duration

00:00:52

Build pipeline

Bot

ebon magnetBOT
#

Build 20200815.2 succeeded

Requested by

GitHub

Duration

00:02:42

Build pipeline

Bot

regal archBOT
#

This specific snippet comes from python-discord/site#202, where dropdowns were implemented using JQuery (if I remember correctly) - this issue was just to remind people that this should be ported over to this repo for everyone to use.

The specific solution doesn't need to use JQuery though, and I agree on principle with not requiring it unnecessarily.

regal archBOT
regal archBOT
regal archBOT
#
[python-discord/bot] New branch created: bug/filters/1005/antispam\-ctx\-patch
#

The modification propagated across all code that is using the same Message object, including all other on_message listeners. This caused weird bugs e.g. the filtering cog thinking the bot authored a message that triggered a filter.

Patching only ctx.author means the implementation is more fragile. Infraction code must ensure it only retrieves the author via ctx.author and not through ctx.message.

How to reproduce the bug:

  1. Put 3 second sleep before this line https://githu...
ebon magnetBOT
#

Build 20200815.3 succeeded

Requested by

GitHub

Duration

00:02:32

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200815.4 succeeded

Requested by

GitHub

Duration

00:02:44

Build pipeline

Bot

regal archBOT
#
[python-discord/bot] New branch created: bug/frontend/1030/reddit\-title\-escape
#

Most escaping is done with discord.utils.escape_markdown. However, that doesn't cover Markdown URLs. Instead, that is covered by replacing square brackets with look-alike Unicode characters. For the replacement characters, I chose (Left Square Bracket with Underbar) and (Right Square Bracket with Underbar). They seemed to be the most readable options, despite still not lining up well with neighbouring text.

![bild](https://user-images.githubusercontent.com/1515135/90320600-8356978...

ebon magnetBOT
#

Build 20200815.5 succeeded

Requested by

GitHub

Duration

00:02:54

Build pipeline

Bot

regal archBOT
#

I had this open in my IDE and was gonna rewrite it myself, but then got interrupted yesterday by something that turned out to be more urgent. Glad you picked it up instead. This solution is nearly identical to the one I was working on myself - I absolutely agree that we should solve this without jQuery, and your rewrite to vanilla JS looks good.

I do wish this solution was a bit easier to read, though. With the closures in the loop, it feels like scopes are sort of bleeding into each other...

#
[python-discord/django-simple-bulma] branch deleted: submodule\_refactor
#
[python-discord/django-simple-bulma] branch deleted: version\-2\-0\-0
#
[python-discord/django-simple-bulma] branch deleted: feat/deps/o138/pre\-commit\-hooks