#dev-log

1 messages ยท Page 48 of 1

regal archBOT
regal archBOT
north knotBOT
ebon magnetBOT
#

Build 20200616.1 succeeded

Requested by

GitHub

Duration

00:04:21

Build pipeline

Bot

oak estuaryBOT
regal archBOT
#
[python-discord/bot] New branch created: bug/mod/bot\-2a/webhook\-clyde
ebon magnetBOT
#

Build 20200616.2 succeeded

Requested by

GitHub

Duration

00:02:15

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200616.3 succeeded

Requested by

GitHub

Duration

00:02:27

Build pipeline

Bot

regal archBOT
#

Sentry Issue: BOT-37

RuntimeError: Session is closed
  File "bot/cogs/reddit.py", line 106, in revoke_access_token
    response = await self.bot.http_session.post(
  File "aiohttp/client.py", line 357, in _request
    raise RuntimeError('Session is closed')

Task exception was never retrieved
future: <Task finished name='Task-7817977' coro= exception=RuntimeError('Session is closed')>

`r...

north knotBOT
#

Postgres backup completed!

regal archBOT
ebon magnetBOT
#

Build 20200616.4 succeeded

Requested by

GitHub

Duration

00:02:15

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200616.5 succeeded

Requested by

GitHub

Duration

00:02:36

Build pipeline

Bot

regal archBOT
#

876b484 Add support for bool values in RedisCache - lemonsaurus
699760a Refactor help_channels.py to use RedisCache. - lemonsaurus
fc4eddc Store booleans as integers instead of strings. - lemonsaurus
94f096f Store epoch timestamps instead of strings. - lemonsaurus
40a774e Fix potential race condition. - lemonsaurus

#
[python-discord/bot] branch deleted: help\_channel\_rediscache
north knotBOT
ebon magnetBOT
#

Build 20200616.6 succeeded

Requested by

GitHub

Duration

00:04:13

Build pipeline

Bot

oak estuaryBOT
regal archBOT
ebon magnetBOT
#

Build 20200616.7 succeeded

Requested by

GitHub

Duration

00:02:23

Build pipeline

Bot

regal archBOT
#

I'm honestly not married on either (the Optional type hint) and/or the indentation we choose, but my personal preference is to use the Optional, but not add additional indentation.

If you feel like it greatly increases readability by leaving the Optional out, I'm fine by that as well; what's the general style throughout the bot? I personally probably always add the Optional explicitly.

#

I generally agree that it should be explicit. But I think it's also okay to break consistency to improve readability. Ultimately, these type annotations are supposed to help us, not hurt us. I honestly find most parameter splitting to be ugly, like in this case, so I'd rather avoid it. I also find long function signatures ugly, but what can we do ๐Ÿคท .

I'll leave the explicit type hints but remove the extra indentation since it's more consistent with other code. We should consider updating o...

ebon magnetBOT
#

Build 20200616.8 succeeded

Requested by

GitHub

Duration

00:02:28

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200616.9 succeeded

Requested by

GitHub

Duration

00:02:16

Build pipeline

Bot

regal archBOT
#

I believe the cyrillic ะต would be better here and seems to look the same as a normal e discord Es with the desktop client.
The e's case is now also "destroyed" when it goes through the sub, so I think it wouldn't hurt to find something that looks like an E, if there is something like that and is worth the effort.

Do we also need to sub the names in reddit/python_news? The consistency is nice but having clyde in those is extremely unlikely

regal archBOT
north knotBOT
#

Postgres backup completed!

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

Build 20200617.1 succeeded

Requested by

Joseph Banks

Duration

00:04:22

Build pipeline

Bot

oak estuaryBOT
regal archBOT
#

09f53ca Check infraction reason isn't None before short... - MarkKoz
08c96f9 Fix check for bot actor in infractions - MarkKoz
2426ea2 Revise inaccurate typehint for Optional reason - kosayoda
6fe0bc1 Add optional type annotations to reason in pard... - MarkKoz
20a8b6f Format parameters with a more consistent style - MarkKoz

#
[python-discord/bot] branch deleted: bug/mod/bot\-68/ban\-strips\-none
north knotBOT
ebon magnetBOT
#

Build 20200617.2 succeeded

Requested by

GitHub

Duration

00:03:56

Build pipeline

Bot

oak estuaryBOT
regal archBOT
#

I believe the cyrillic ะต would be better here and seems to look the same as a normal e

Good find. The website I used didn't show Cyrillic characters as characters based on "e" (probably only considered latin alphabet). Cyrillic also has an upper case E so I will use that too. I wonder if there's a good way to do a case sensitive substitution. May just be easiest to chain two substitutions.

Do we also need to sub the names in reddit/python_news? The consistency is nice but having cly...

north knotBOT
ebon magnetBOT
#

Build 20200617.3 succeeded

Requested by

GitHub

Duration

00:04:07

Build pipeline

Bot

oak estuaryBOT
ebon magnetBOT
#

Build 20200617.4 failed

Requested by

GitHub

Duration

00:00:47

Build pipeline

Bot

ebon magnetBOT
#

Build 20200617.5 succeeded

Requested by

GitHub

Duration

00:02:19

Build pipeline

Bot

regal archBOT
#

9b8d688 Autodelete offensive messages after one week. - Akarys42
59914bf Revert whitespace changes - Akarys42
9c78146 Move offensive message delete time to config file. - Akarys42
f67378c Remove the possibility that we send a message t... - Akarys42
1eb057b Rename offensive_msg flag to schedule_deletion. - Akarys42

north knotBOT
ebon magnetBOT
#

Build 20200617.6 succeeded

Requested by

Joseph Banks

Duration

00:03:52

Build pipeline

Bot

oak estuaryBOT
regal archBOT
#

When a message trips the filter on the bot it is removed after a period of time. During this period it is a record in the database.

When this deletion date is reached the bot will attempt to remove the message from Discord and remove the record from the offensive message table. We currently handle for the message being not found (deleted) but if another error occurs resulting in the message not being deleted we still continue to delete the database record, causing the message to be left ar...

#

Site issue: python-discord/site#364

The site issue contains most of the details here:

When a message trips the filter on the bot it is removed after a period of time. During this period it is a record in the database.

When this deletion date is reached the bot will attempt to remove the message from Discord and remove the record from the offensive message table. We currently handle for the message being not found (deleted) but if another error occurs resulting in the message not...

regal archBOT
ebon magnetBOT
#

Build 20200617.7 succeeded

Requested by

GitHub

Duration

00:02:28

Build pipeline

Bot

native joltBOT
regal archBOT
ebon magnetBOT
#

Build 20200618.1 succeeded

Requested by

GitHub

Duration

00:02:37

Build pipeline

Bot

regal archBOT
regal archBOT
#

Thought about the aliases/grouped signatures, we only fetch 3 to keep it short-er so which ones do you think should be included if more than 3 are present?
Going with the previous object.__lt__ example, we can't get them all because 6 separate codeblocks would be huge.
Collecting all the signatures under the fetched ones, and then searching up if there's still space left, or picking the fetched one and then going up from the bottom came to mind for how to do it

regal archBOT
#

Brings improvements that will get listed here as implemented into the Doc cog

  • relative urls are now resolved to absolute, allowing them to be used in discord
  • doc get is now greedy to allow a few symbols like not in to be fetched
  • fetching docs from classes now doesn't try to also include methods when they fit within the character limit

Looking at the module I believe a slight refactor is also in order so I'll also be doing that as it comes up

ebon magnetBOT
#

Build 20200618.2 succeeded

Requested by

GitHub

Duration

00:02:28

Build pipeline

Bot

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200618.3 succeeded

Requested by

GitHub

Duration

00:02:32

Build pipeline

Bot

regal archBOT
#

This only works for the tag paths. It will fail for everything else:

ValueError: '/home/mark/repos/python/bot-pydis/bot/cogs/source.py' does not start with '/bot'

For everything else, you have to use the following (note this won't work on the tag paths)

Path(filename).relative_to(Path.cwd()).as_posix()

The as_posix() is added to solve a separate issue - to force forward slashes even on Windows. However, this will still fail for tags cause they are already r...

north knotBOT
#

Postgres backup completed!

ebon magnetBOT
#

Build 20200618.4 succeeded

Requested by

GitHub

Duration

00:02:25

Build pipeline

Bot

ebon magnetBOT
#

Build 20200618.5 failed

Requested by

GitHub

Duration

00:00:48

Build pipeline

Bot

ebon magnetBOT
#

Build 20200618.6 succeeded

Requested by

GitHub

Duration

00:02:23

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200618.7 failed

Requested by

GitHub

Duration

00:02:11

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200618.8 failed

Requested by

GitHub

Duration

00:02:11

Build pipeline

Bot

regal archBOT
regal archBOT
#

Full traceback:

timeout: The read operation timed out
  File "urllib3/connectionpool.py", line 421, in _make_request
    six.raise_from(e, None)
  File "<string>", line 3, in raise_from
    # Permission is hereby granted, free of charge, to any person obtaining a copy
  File "urllib3/connectionpool.py", line 416, in _make_request
    httplib_response = conn.getresponse()
  File "http/client.py", line 1322, in getresponse
    response.begin()
  File "http/client.py", line 303, i...
ebon magnetBOT
#

Build 20200619.1 succeeded

Requested by

GitHub

Duration

00:02:55

Build pipeline

Bot

regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
ebon magnetBOT
#

Build 20200619.2 succeeded

Requested by

GitHub

Duration

00:02:40

Build pipeline

Bot

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200619.3 succeeded

Requested by

GitHub

Duration

00:02:45

Build pipeline

Bot

regal archBOT
#

9a58b45 Incidents tests: write tests for on_raw_reacti... - kwzrd [e760bd3](https://github.com/python-discord/bot/commit/e760bd38b5d625011318a9ddfc98bb52570d1c3a) Incidents: review log levels; use trace` where... - kwzrd

ebon magnetBOT
#

Build 20200619.4 succeeded

Requested by

GitHub

Duration

00:02:41

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200619.5 succeeded

Requested by

GitHub

Duration

00:02:16

Build pipeline

Bot

regal archBOT
#
[python-discord/bot] New branch created: kwzrd/pipenv\-html\-script
ebon magnetBOT
#

Build 20200619.6 succeeded

Requested by

GitHub

Duration

00:03:12

Build pipeline

Bot

regal archBOT
#

There's one small thing that I'd like to see adjusted, but otherwise I think this is a good fix.

My personal approach would have been turning it into something like clyd[e] (if that fixes the 400) just because I'd see that as more predictable w.r.t. various fonts and platforms. It'd also feel more "direct" to me, i.e. fixing the issue rather than "hiding" it, but I don't have a problem with this approach (the only change requested is the "" -> None issue).

ebon magnetBOT
#

Build 20200619.7 succeeded

Requested by

GitHub

Duration

00:02:31

Build pipeline

Bot

#

Build 20200619.3 succeeded

Requested by

GitHub

Duration

00:00:56

Build pipeline

Seasonal Bot

regal archBOT
#

c7373fa Token remover: ignore DMs - MarkKoz
2fa7429 Token remover: move bot check to on_message - MarkKoz
3aecf14 Token remover: exit early if message already de... - MarkKoz
0ad19a4 Webhook remover: ignore DMs and bot messages - MarkKoz
94a4f8e Webhook remover: exit early if message already ... - MarkKoz

#
[python-discord/bot] branch deleted: bug/filters/bot\-58/removers\-ignore\-dms
north knotBOT
ebon magnetBOT
#

Build 20200619.8 succeeded

Requested by

GitHub

Duration

00:03:43

Build pipeline

Bot

oak estuaryBOT
regal archBOT
#

These lines should be merged together.

Why? While set operations are neat, they can be difficult to read. I found the intermediate step fairly helpful: both the assignment and not missing_signals are quite expressive.

I'd find this a lot more difficult to digest:

return not ALLOWED_EMOJI - own_reactions(message)

I'm not saying you're wrong, I'm just wondering why you'd prefer this to be one-lined (especially if the comment won't fit).

ebon magnetBOT
#

Build 20200619.4 succeeded

Requested by

GitHub

Duration

00:00:57

Build pipeline

Seasonal Bot

regal archBOT
#

Because I want the delete listener running concurrently with the delete request.

We do:

  1. Launch delete listener task
  2. Delete message
  3. Await listener finishing (maybe it has received the delete event already)

If we skip step 1. and only begin listening after dispatching the delete event, I think we risk missing the event (because d.py may receive it before we register the listener). For what it's worth, I was not able to replicate that - in the testing server, I always cau...

#

Yeah, maybe, I'm not sure. I placed them here because I thought their purpose would be better understood when defined where they are used, especially since they are used in one place only, and because you don't really need to see these at the top of the module. In fact, the only reason why I defined them here rather than just passing them into history and sleep directly as literals is that I wanted to log them on line L131 before starting the loop.

I'm not opposed to putting them at ...

#

I generally prefer checking for None explicitly. I want to return if message is not None, not if message is truthy. I don't feel like "Message can never be falsey, so we can get away with this" is a good enough justification - explicit is better than implicit, after all - but yeah, I suppose it's more of a personal preference. If the check was implicit, and I were reviewing this and didn't know whether a Message can ever be falsey, I'd have to go searching for it. This way, I don't....

ebon magnetBOT
#

Build 20200619.9 succeeded

Requested by

GitHub

Duration

00:02:39

Build pipeline

Bot

regal archBOT
regal archBOT
#
[python-discord/site] New branch created: joseph/add\-form\-system
ebon magnetBOT
#

Build 20200619.1 failed

Requested by

GitHub

Duration

00:01:34

Build pipeline

Site

regal archBOT
#
[python-discord/bot] branch deleted: kwzrd/pipenv\-html\-script
north knotBOT
ebon magnetBOT
#

Build 20200619.10 succeeded

Requested by

GitHub

Duration

00:04:59

Build pipeline

Bot

oak estuaryBOT
regal archBOT
ebon magnetBOT
#

Build 20200619.11 succeeded

Requested by

GitHub

Duration

00:02:12

Build pipeline

Bot

regal archBOT
#

I don't think these are necessarily constants worthy, putting them at the top of the file seems fine IMO. Constants are useful for development when testing things like the offensive message remover (we don't want to sit waiting for a week to confirm it works) but I think there is little reason to change these and they are constant... constants. Putting them at the top of the file would be nicer though I think.

regal archBOT
ebon magnetBOT
#

Build 20200619.12 succeeded

Requested by

GitHub

Duration

00:02:12

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200619.13 succeeded

Requested by

GitHub

Duration

00:02:04

Build pipeline

Bot

regal archBOT
#

bcf6993 Fix 400 when "clyde" is in webhook username - MarkKoz
311326b Make sub_clyde case-sensitive and use Cyrillic e's - MarkKoz
55db81a Preserve empty string when substituting clyde - MarkKoz
581573f Write unit test for sub_clyde - kwzrd
28919b6 Merge branch 'master' into bug/mod/bot-2a/webho... - kwzrd

#
[python-discord/bot] branch deleted: bug/mod/bot\-2a/webhook\-clyde
north knotBOT
ebon magnetBOT
#

Build 20200619.14 succeeded

Requested by

GitHub

Duration

00:04:17

Build pipeline

Bot

oak estuaryBOT
regal archBOT
ebon magnetBOT
#

Build 20200620.1 failed

Requested by

GitHub

Duration

00:01:58

Build pipeline

Site

regal archBOT
ebon magnetBOT
#

Build 20200620.2 failed

Requested by

GitHub

Duration

00:01:58

Build pipeline

Site

regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
ebon magnetBOT
#

Build 20200620.1 succeeded

Requested by

GitHub

Duration

00:02:31

Build pipeline

Bot

regal archBOT
#

Yes, you're right, these should log the id. I reviewed my logs and added ids where I felt it was appropriate in 20b27f3.

It's an interesting problem because if you have a stream of trace/debug logs sprinkled throughout a function, you don't want to be logging the ids in each message. So I usually just log this information in the first one, and then it's clear that "message" refers to the same object. But if they are followed by an >= info log, it should probably log the id again, bec...

#

I tried it and ended up being very happy with it. The idea crossed my mind at one point but then I ended up not doing it, because I originally had both the role and emoji check as a single conditional - they both remove the react and abort. Eventually though I felt that it'd be nice to actually log why it was removed, and I ended up making them disjoint.

With this change, the ALLOWED_EMOJI variable is only used by has_signals so the name no longer makes much sense, and so I ended up ...

regal archBOT
ebon magnetBOT
#

Build 20200620.2 succeeded

Requested by

GitHub

Duration

00:02:27

Build pipeline

Bot

regal archBOT
#
  • b9d483c: Moved exception logging when cog is being unloaded and messages are still
    not consumed from cog_unload to consume_messages itself in
    try-except block to avoid the case when requesting result too early
    (before cancel finished). Resolves #1008
  • ac302d3: When user left from guild before bot can add Muted role, then catch this
    error and log. Resolves #1006. Also found the issue that when the user is muted and joins and quickly leave, then this fail too (tested in dev server)...
ebon magnetBOT
#

Build 20200620.3 succeeded

Requested by

GitHub

Duration

00:02:10

Build pipeline

Bot

regal archBOT
#

What should happen if an attempt is made to schedule using a taken ID (meaning another task is currently scheduled with that ID)? Currently, only a debug log is sent. The problem is that the coroutine given will never be awaited and will eventually cause a warning.

A boolean value could be returned to indicate success or failure, which will put the burden on the caller to close the coroutine and prevent the warning. However, this is cumbersome; pretty much every caller will want to ensure...

regal archBOT
ebon magnetBOT
#

Build 20200620.3 failed

Requested by

GitHub

Duration

00:01:43

Build pipeline

Site

regal archBOT
#
[python-discord/bot] New branch created: feat/backend/800/scheduler\-redesign
ebon magnetBOT
#

Build 20200621.1 succeeded

Requested by

GitHub

Duration

00:02:16

Build pipeline

Bot

ebon magnetBOT
#

Build 20200621.2 succeeded

Requested by

GitHub

Duration

00:02:24

Build pipeline

Bot

north knotBOT
#

Postgres backup completed!

ebon magnetBOT
#

Build 20200621.3 succeeded

Requested by

GitHub

Duration

00:02:33

Build pipeline

Bot

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200621.4 succeeded

Requested by

GitHub

Duration

00:02:24

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200621.5 succeeded

Requested by

GitHub

Duration

00:02:30

Build pipeline

Bot

regal archBOT
#

Stumbled upon a few more things.

Do we need the default listing of inventories behind get?
getlist
This is implemented as a check in the get subcommand when the symbol is empty, but to me the nicer behaviour would be that output only for me !doc and nothing for an empty get.

The set shadows the set symbol from the inventories, any opinions on handling it and other subcommands as symbols when the role check doesn't pass? Currently there's just ...

regal archBOT
#

The get_pep_embed coro does a lot of stuff and I think it should be separated in some way (for example as suggested in my last review comment).
Its docstring is indescriptive and doesn't mention that it's sending out error embeds to through the ctx.

In the current PEP format, the PEP number can only contain 4 digits so we can dismiss any input that's above that to avoid refreshing the loaded PEP cache needlessly

ebon magnetBOT
#

Build 20200622.1 succeeded

Requested by

GitHub

Duration

00:02:23

Build pipeline

Bot

regal archBOT
#

4890cc5 Created tests for bot.cogs.logging connected ... - ks129
63be23c Merge branch 'master' into logging-tests - ks129
ededd18 Logging Tests: Simplify DEBUG_MODE False test - ks129
3e7e66c Merge branch 'master' into logging-tests - kosayoda
03b6131 Merge pull request #950 from ks129/logging-tests - kosayoda

north knotBOT
ebon magnetBOT
#

Build 20200622.2 succeeded

Requested by

GitHub

Duration

00:04:09

Build pipeline

Bot

oak estuaryBOT
night lilyBOT
#
SeasonalBot

Connected!

regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
#

We seem to have multiple race conditions between our various message processing utilities and we've patched some of them already (e.g., the token removal and codeblock suggestion utilities).

There's also still the possibility that messages that get removed by one of our filtering tools (anti-spam, filtering, anti-malware) still trigger command responses from our bot, as both the on_message listeners as well as the command functions are obviously process asynchronously.

This makes me w...

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200622.3 succeeded

Requested by

GitHub

Duration

00:02:23

Build pipeline

Bot

regal archBOT
#
[python-discord/bot] branch deleted: bug/backend/bot\-50/sync\-ignore\-guilds
north knotBOT
ebon magnetBOT
#

Build 20200622.4 succeeded

Requested by

GitHub

Duration

00:04:09

Build pipeline

Bot

oak estuaryBOT
regal archBOT
ebon magnetBOT
#

Build 20200622.5 succeeded

Requested by

GitHub

Duration

00:02:24

Build pipeline

Bot

regal archBOT
regal archBOT
north knotBOT
regal archBOT
ebon magnetBOT
#

Build 20200622.1 succeeded

Requested by

GitHub

Duration

00:04:10

Build pipeline

Site

regal archBOT
#

Just from playing out with it for a bit on a server.

Leading indentation breaks ast.parse with unexpected indents, so the detection doesn't pass in some relatively common cases.
And would accounting for ipython's repl be worth it? the users are usually a bit more advanced and there aren't that many but I guess it still happens sometimes. If they were to be implemented, both of these are somewhere in ipython as they're properly interpreted when posted into it if that helps.

regal archBOT
#

@Numerlor Thanks for pointing out the indent issue. The original code did try to dedent, but I removed it because I thought it was only for making the output pretty.

Do you think textwrap.dedent is adequate, or should it try to keep the attempted fix of the original code? It tried to account for leading spaces of the first line of nested code not being copied. For example:

# wrong
def foo(self):
        return bar

# correct
    def foo(self):
        return bar

...

ebon magnetBOT
#

Build 20200623.1 succeeded

Requested by

GitHub

Duration

00:02:33

Build pipeline

Bot

north knotBOT
#

Postgres backup completed!

regal archBOT
#

... currently I just have the .caesarcipher command group display its help embed

Yeah, that should probably stay, as it's the standard behaviour. It may become messy to only auto-invoke encrypt if the group receives valid params for it. Just having encrypt as a subcommand that has to be invoked explicitly is probably perfectly fine - the convenience of not having to invoke it directly isn't worth messy code, in my opinion. It's up to you - just wanted to share a couple of ideas.

regal archBOT
regal archBOT
regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
ebon magnetBOT
#

Build 20200624.1 succeeded

Requested by

GitHub

Duration

00:02:28

Build pipeline

Bot

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200624.2 succeeded

Requested by

GitHub

Duration

00:02:22

Build pipeline

Bot

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200625.1 succeeded

Requested by

GitHub

Duration

00:02:37

Build pipeline

Bot

north knotBOT
#

Postgres backup completed!

ebon magnetBOT
#

Build 20200625.2 succeeded

Requested by

GitHub

Duration

00:02:43

Build pipeline

Bot

regal archBOT
#
[python-discord/bot] branch deleted: \#364\-offensive\-msg\-autodeletion
#
[python-discord/bot] branch deleted: bug/info/\_fuzzy\_search/wrong\_annotation
regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200625.1 succeeded

Requested by

GitHub

Duration

00:01:05

Build pipeline

Seasonal Bot

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200625.3 succeeded

Requested by

GitHub

Duration

00:02:25

Build pipeline

Bot

ebon magnetBOT
#

Build 20200626.1 succeeded

Requested by

GitHub

Duration

00:01:01

Build pipeline

Seasonal Bot

north knotBOT
#

Postgres backup completed!

ebon magnetBOT
#

Build 20200626.1 succeeded

Requested by

GitHub

Duration

00:02:20

Build pipeline

Bot

regal archBOT
#

@MarkKoz Would you mind taking a look over this again and testing it when you get the chance? I believe that I've addressed all of the critical issues. I also ended up having to make some fixes for the way new pages are created, as I found out that some of the existing parts of LinePaginator.add_line() were causing issues with the continuation pages.

Also, apologies for the late follow-up on this. I've been rather busy recently, and some of fixes weren't quite as straightforward as I was...

regal archBOT
ebon magnetBOT
#

Build 20200626.2 succeeded

Requested by

GitHub

Duration

00:02:37

Build pipeline

Bot

regal archBOT
#

I personally have no idea, but I can try to take a look at the current places where LinePaginator is used to see if there are any decent use cases for the prefix and suffix parameters. From looking at the git blame, it looks like it was all added at once a couple of years ago: https://github.com/python-discord/bot/pull/25. It could very well be a common case of feature bloat, but I'm not confident enough about the areas in which LinePaginator is used by the bot to know if those params are u...

ebon magnetBOT
#

Build 20200626.3 succeeded

Requested by

GitHub

Duration

00:02:38

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200626.4 succeeded

Requested by

GitHub

Duration

00:02:21

Build pipeline

Bot

regal archBOT
regal archBOT
regal archBOT
regal archBOT
#

In this case I don't think it makes much of a difference (please correct me if I'm wrong).

Just to explain what I meant: if we use invoke_without_command=False (default), and apply some kind of a check, such as with_role from our utils, this check will also apply to all subcommands, which is generally what we want. This means that if you lock the group to mods only, all subcommands will also prevent non-mod users from invoking them.

With invoke_without_command=True, the group ca...

regal archBOT
regal archBOT
#

Since this PR will allow the paginator to handle long lines, I think that nomination reasons should not be shortened when looking at someone's nomination history.

You would just have to get rid of the textwrap.shorten call in these places:
https://github.com/python-discord/bot/blob/232cc68b0a0ef210027beacb9b4f50ffeeaddd00/bot/cogs/watchchannels/talentpool.py#L227

https://github.com/python-discord/bot/blob/232cc68b0a0ef210027beacb9b4f50ffeeaddd00/bot/cogs/watchchannels/talentpool.py#L...

regal archBOT
regal archBOT
regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
ebon magnetBOT
#

Build 20200627.1 succeeded

Requested by

GitHub

Duration

00:01:06

Build pipeline

Seasonal Bot

#

Build 20200627.2 succeeded

Requested by

GitHub

Duration

00:01:00

Build pipeline

Seasonal Bot

regal archBOT
#

If the bot has a way of interacting with staff as a whole:

  • have a hardcoded retry limit bigger than 1 that will be decremented every time deleting the message is unsuccessful (not due to it being deleted)
  • once limit is at 1, send a notification to staff as an embed; the embed has an up arrow and down arrow emoji
  • if up arrow is selected, the retry limit is incremented
  • if down arrow is selected the limit is decremented (to 0) and the message is deleted
  • if nothing is selected, on ...
regal archBOT
regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200627.1 succeeded

Requested by

GitHub

Duration

00:02:32

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200627.2 succeeded

Requested by

GitHub

Duration

00:02:23

Build pipeline

Bot

regal archBOT
#

I think it helps in cases like here https://github.com/python-discord/bot/blob/201895180ffbe88c01e4dbc40dd9cd6c043e2be7/bot/cogs/codeblock/parsing.py#L86-L88 but imo a literal is better here and in _TICKS when it's already a string (or around other strings) and with the var name hinting on what it is if the small char is hard to read for some.

I see where you're coming from though so some other opinions would be beneficial

ebon magnetBOT
#

Build 20200628.1 succeeded

Requested by

GitHub

Duration

00:02:33

Build pipeline

Bot

regal archBOT
#

Would the indentation matter somewhere in the parsing step?

It matters when parsing it with ast. It will fail if the indentation of the first line isn't fixed. Maybe it can just run it twice. One without the fix and one with.

The cases where it malforms input will be fairly rare and I don't see the reason to keep the functionality around if it doesn't matter

This sounds contradictory. Yes, the examples with the dict are rare, but isn't that a reason to keep the functionality? I ...

regal archBOT
#

Would the indentation matter somewhere in the parsing step?

It matters when parsing it with ast. It will fail if the indentation of the first line isn't fixed. Maybe it can just run it twice. One without the fix and one with.

Sorry, meant the resulting fixed indentation after a dedent, and mixed up dedent and the fix of the current implementation when reading your reply before writing the comment.

If dedent can't mess up the parsing in any way when stripping out the common le...

#

The dedent doesn't mess up indentation. It's the user that messes up indentation. Dedent can fix all the code being indented too far, but it doesn't fix the user incorrectly copying their code such that the indentation of the first line is excluded. The latter is what all this code tried to fix (in addition to fixing indentation being too far):

def fix_indentation(msg: str) -> str:
    """Attempts to fix badly indented code."""
    def unindent(code: str, skip_spaces: int = 0) -> ...
regal archBOT
regal archBOT
regal archBOT
#

Does the url when adding an inventory through doc set need to be verified like here? https://github.com/python-discord/bot/blob/e37041622aebc8fef75d83fcd8970dc527c056bc/bot/cogs/doc.py#L126-L132 a mistake should be noticeable immediately after the command and while it's a fairly uncommon command to use it'll also reduce the needless requests.

I think this leads to worse ux or code; currently when the set_command is invoked it'll do 2 web requests out of 3 total before it sends out a t...

#

@lemonsaurus

From looking through all of the results in git grep "LinePaginator", I found just one actual usage for prefix in the bot repo:

https://github.com/python-discord/bot/blob/232cc68b0a0ef210027beacb9b4f50ffeeaddd00/bot/cogs/help.py#L296-L302

Since this would require some additional investigation to see if the same functionality could be easily implemented without it, I think we should probably consider removal of prefix and suffix in a separate issue and PR (if at al...

#

Do we need the default listing of inventories behind get? ... the nicer behaviour would be that output only for me !doc and nothing for an empty get.

I kind of like it. I don't think it should be empty; it should at least show the help command, but showing the available inventories feels more useful since the get command is not complex enough for people to really need to see the help.

The set shadows the set symbol from the inventories, any opinions on handling it and other subcomman...

ebon magnetBOT
#

Build 20200628.2 succeeded

Requested by

GitHub

Duration

00:02:31

Build pipeline

Bot

regal archBOT
regal archBOT
regal archBOT
#

Good catch @MarkKoz.

Is it better to require it to be explicitly set it to 2040 or should it automatically set it equal to max_size if unspecified and greater than the default value?

I'm not 100% certain on this. I think for most cases setting scale_to_size to max_size if it's unspecified and greater than the default of 2,000 would be fine, but it does result in an extra bit of added complexity to the constructor.

On a related note though, I discovered that there's a maximum (...

ebon magnetBOT
#

Build 20200628.3 succeeded

Requested by

GitHub

Duration

00:03:03

Build pipeline

Bot

regal archBOT
#

I just saw another location that exceeds max_size of 2,000 (also in help.py), I'll fix that real quick:

bot/cogs/doc.py:371:                await LinePaginator.paginate(lines, ctx, inventory_embed, max_size=400, empty=False)
bot/cogs/extensions.py:162:        await LinePaginator.paginate(lines, ctx, embed, max_size=300, empty=False)
bot/cogs/help.py:302:            max_size=2000,
bot/cogs/help.py:349:        await LinePaginator.paginate(pages, self.context, embed=embed, max_lines...
ebon magnetBOT
#

Build 20200628.4 succeeded

Requested by

GitHub

Duration

00:02:34

Build pipeline

Bot

ebon magnetBOT
#

Build 20200628.5 succeeded

Requested by

GitHub

Duration

00:02:34

Build pipeline

Bot

#

Build 20200628.6 succeeded

Requested by

GitHub

Duration

00:02:46

Build pipeline

Bot

regal archBOT
#

5f5a51b Improve LinePaginator to support long lines - aeros
a465a1e Fix docstring for _split_remaing_words() - aeros
974bf0f Fix _split_remaining_words() docstring summary - aeros
7264da7 Merge branch 'master' into issue926-paginate-lo... - aeros
98bbae2 Account for spaces in LinePaginator._split_rema... - aeros

ebon magnetBOT
#

Build 20200628.7 succeeded

Requested by

GitHub

Duration

00:04:30

Build pipeline

Bot

north knotBOT
#

Postgres backup completed!

oak estuaryBOT
regal archBOT
#

The set shadows the set symbol from the inventories, any opinions on handling it and other subcommands as symbols when the role check doesn't pass? Currently there's just no output from the bot.

Putting it in quotes works, so I'm not concerned about it: !d "set"

There haven't been that many, but searching through the history there were a few instances where people seemingly though it just didn't work after a !doc set, !doc get set is usually the next step but I doubt someo...

regal archBOT
#

I doubt someone would try the quotes

Fair enough

get set works perfectly fine so this would be just a small QoL improvement

Isn't get shadowed too? Would you propose renaming both commands? And to what? I don't really mind them being renamed since set is seldom used and non-public and get is usually used as !d g or just !d.

Do we care more about the response time and doing additional requests or the RAM space (or drive if it's stored there)?

I think response ti...

regal archBOT
#

Isn't get shadowed too? Would you propose renaming both commands? And to what? I don't really mind them being renamed since set is seldom used and non-public and get is usually used as !d g or just !d.

get would be shadowed but the symbol doesn't exist in the current inventories. There shouldn't be many problems if it assumes the command was intended to be executed when the permissions are there; but renaming doesn't sound like a bad idea, although I don't know what to.

regal archBOT
ebon magnetBOT
#

Build 20200629.1 succeeded

Requested by

GitHub

Duration

00:02:25

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200629.2 succeeded

Requested by

GitHub

Duration

00:02:45

Build pipeline

Bot

regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200629.1 succeeded

Requested by

GitHub

Duration

00:01:04

Build pipeline

Seasonal Bot

ocean rock
#

fr

regal archBOT
regal archBOT
regal archBOT
regal archBOT
#

Description

Steps to Reproduce

Expected Behaviour

Actual Behaviour

Known Impacted Platforms

  • [ ] Web
  • [ ] Desktop
  • [ ] Android App
  • [x] iOS App

Possible Solutions

Additional Details

Would you like to implement a fix?

Note: For high-priority or critical bugs, fixes may be implemented by staff.

  • [ ] I'd like to implement the bug fix
  • [x] Anyone can implement the bug fix

![C60A348A-EAA7-48B7-9DD1...

regal archBOT
regal archBOT
#

Unicode emoji are being used. It's a bug with the iOS app. Unicode flags are comprised of the regional indicators but the app doesn't realise displaying flags was not intended here. There seems to be no solution on our end. A workaround is to flip the top and side rows so that the letters are on the side.

I lost on my first move, which doesnโ€™t happen in normal Minesweeper.

I don't necessarily consider this a bug. This behaviour depends on the version of the game being played. It's not...

regal archBOT
ebon magnetBOT
#

Build 20200630.1 succeeded

Requested by

GitHub

Duration

00:02:29

Build pipeline

Bot

#

Build 20200630.2 succeeded

Requested by

GitHub

Duration

00:02:43

Build pipeline

Bot

regal archBOT
regal archBOT
#

It's pretty awesome to see that the results of our earlier experiment in #async proved to be of use for the scheduler. :-)

I would consider having an else block though to log if the coroutine is in another state other than CORO_CREATED and couldn't be closed. Might not be necessary, but I personally can't vouch for the reliability of using inspect.getcoroutinestate(coroutine) since I haven't seen it used in a production environment or used it myself extensively.

#

I'm not certain about the usage of coroutine.close() here, particularly without the inspect.getcoroutinestate() guarding it. If this will only be used internally with coroutines that haven't started running yet and won't be awaited later, it's okay, but if you somehow manage to close a running coroutine it will likely hang indefinitely or if it gets awaited later, a RuntimeError.

To be clear, I think it's safe to use with schedule_at() and schedule_later(), I'm more concerned abo...

north knotBOT
#

Postgres backup completed!

regal archBOT
regal archBOT
regal archBOT
#

Following the discussion that happened in meta today I would like to suggest a new feature to the bot: make it pin the first message sent in the newly opened help session, and, of course, un-pin it when the help channel is closed.
Reasoning: some help session tend to drag out for longer time and thus to have lots of messages. This makes it very hard for anyone who's willing to to help but has not ...

regal archBOT
regal archBOT
#
[python-discord/bot] New branch created: feat/util/1019/slowmode
regal archBOT
#

Description

This new command will allow moderators+ to get and set the slowmode delay for a given text channel. Currently, only admins can control the slowmode delay, but only through int eval when we need more granular control. This command will make it much more convenient for the admins, and will actually allow the mods to control slowmode.

Closes #1019.

Command Showcase

![image](https://user-images.githubusercontent.com/52584399/86191231-88f94900-bb14-11ea-95d6-f50244939db5....

ebon magnetBOT
#

Build 20200701.1 failed

Requested by

GitHub

Duration

00:00:55

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200701.2 succeeded

Requested by

GitHub

Duration

00:02:38

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200701.3 succeeded

Requested by

GitHub

Duration

00:02:24

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200701.4 succeeded

Requested by

GitHub

Duration

00:02:31

Build pipeline

Bot

regal archBOT
#

@j03b

This may be out of scope but could we integrate with the scheduler to allow slow modes that last a certain amount of time?

I don't particularly mind implementing this, but it will quickly become fairly complex.

Using your example, !slowmode #python-general 6h 5s, what would the slowmode delay be after the 6 hours are up? Would the user need to specify another delay, which kicks in after the duration? Or would it reset to some default delay set for the specific channel?

Th...

north knotBOT
#

Postgres backup completed!

regal archBOT
#

Yes, but I was under the impression that with the contextlib.suppress(asyncio.CancelledError):, it would instead return the CancelledError from exception = done_task.exception() if the task was cancelled instead of raising like it normally would. I just confirmed that was not the case, I forgot that it if the exception occurs under contextlib.suppress(), it continues after the block (rather than at the point the exception occurred). So, feel free to disregard the above suggestion.
...

#

I don't want to make it private in case someone wants to schedule a coroutine immediately and still take advantage of the scheduler keeping track of it.

That's definitely fair enough, but in that case, you probably want to at least leave a block comment above the coroutine.close(). I could see it being rather difficult to debug if someone mistakenly passes a coroutine that has started running or might be awaited later.

And maybe an `assert inspect.getcoroutinestate(coroutine) == "CO...

regal archBOT
ebon magnetBOT
#

Build 20200701.5 succeeded

Requested by

GitHub

Duration

00:02:46

Build pipeline

Bot

regal archBOT
regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200701.6 failed

Requested by

GitHub

Duration

00:02:08

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200701.7 succeeded

Requested by

GitHub

Duration

00:02:09

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200701.8 succeeded

Requested by

GitHub

Duration

00:02:24

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200701.9 succeeded

Requested by

GitHub

Duration

00:02:20

Build pipeline

Bot

regal archBOT
regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
#

Proposal

Eval command should support passing message or nothing instead code. When you pass the message, this should try parse code block from this message. This should be implemented that way that in the message, there can be text to before and after message: this should ignore it. When passing nothing, then this should try to get the last message and parse this code block.

Additional ideas

Also, maybe when a message has multiple Python code block, this should ask from the user wi...

regal archBOT
ebon magnetBOT
#

Build 20200702.1 succeeded

Requested by

GitHub

Duration

00:00:58

Build pipeline

Seasonal Bot

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200702.1 succeeded

Requested by

GitHub

Duration

00:02:15

Build pipeline

Bot

regal archBOT
regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
ebon magnetBOT
#

Build 20200703.1 succeeded

Requested by

GitHub

Duration

00:02:30

Build pipeline

Bot

regal archBOT
#

Not clean, but as clean as I could get it. There's something oddly difficult here because we make the embed in make_embed, but there also has to be some branching here to determine whether a file should be passed to the send.

So if make_embed also looks at incident.attachments to determine whether set_image should be called, and this looks at incident.attachments to see whether a file should be passed, we're checking the same thing in two places and it feels ugly & fragile sinc...

regal archBOT
#

Looking over the humanize_delta source, it wants a string for precision.

It will be matched against these:

units = (
    ("years", delta.years),
    ("months", delta.months),
    ("days", delta.days),
    ("hours", delta.hours),
    ("minutes", delta.minutes),
    ("seconds", delta.seconds),
)

The TypeError comes from here and is a result of an incorrect type being passed in:

https://github.com/python-discord/bot/blob/74de316657d5fed9d5474fa23d05cbe09d...

regal archBOT
#

It is needed, yes.

While the UI does present this it only allows it to be locked to the increments permitted through the UI, not what we want.

For example, consider I put a channel on a 2 second slowmode:
<img width="592" alt="image" src="https://user-images.githubusercontent.com/20439493/86467887-2f6c6680-bd2e-11ea-8e0d-01852b677f2f.png">

We can verify slowmode is enabled by looking at the bottom right of the client:
<img width="370" alt="Screenshot 2020-07-03 at 13 08 03" src="ht...

regal archBOT
#

Problem:
Currently the purge/clean command takes the number of messages to clean as the only way of specifying how far to clean, this can cause some difficulties when trying to clean lots of messages as you either have to guess roughly how many messages were sent or count them manually, and also makes it easy to go too far and delete messages you didn't want to.

Proposed Solution:
We could allow a message ID or link to be given as an argument instead of the number of messages. Th...

regal archBOT
north knotBOT
ebon magnetBOT
#

Build 20200703.1 succeeded

Requested by

Joseph Banks

Duration

00:02:10

Build pipeline

Seasonal Bot

night lilyBOT
#
SeasonalBot

Connected!

north knotBOT
ebon magnetBOT
#

Build 20200703.2 succeeded

Requested by

Joseph Banks

Duration

00:04:00

Build pipeline

Bot

oak estuaryBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200703.3 succeeded

Requested by

GitHub

Duration

00:02:23

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200703.4 succeeded

Requested by

GitHub

Duration

00:02:19

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200703.5 succeeded

Requested by

GitHub

Duration

00:02:23

Build pipeline

Bot

regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
#

We currently have a feature !remind which will send the caller a reminder after a certain amount of time has passed.

But sometimes, a moderator or admin will want to create a reminder for his whole team. For example, maybe something needs to be followed up in 7 hours but the moderator or admin will not be available at that time.

It should also be possible to create a reminder for another user than yourself.

New command syntax

!remind .

For example, `!remind @Admins 7H23...

regal archBOT
regal archBOT
#

I'm not quite sure I understand the -4 but this doesn't fix the indentation if it's not copied on the first line for compound statements with multiple clauses like

if ...:
        ...
    elif ...:
        ...
    else:
        ...

If we do not care about those but only for definitions (since it's unlikely to happen and probably complex to account for) and it's for decreasing the indent, is it necessary? Python won't care about the width of indentation under one clause.

...

#

I'm not sure on the license stuff and haven't read BSD 3-clause, but could the license be placed in the codeblock directory? When I was doing something similar the main requirement seemed to be that it's clear on what's what.
With it being "hidden" in the directory it's clearer where it applies and doesn't add additional things to the root, maybe with a small notice in the module itself too

regal archBOT
regal archBOT
regal archBOT
#

I'm not sure on the license stuff and haven't read BSD 3-clause, but could the license be placed in the codeblock directory?

Yeah it absolutely can be, but I decided to put it in the root instead. I feel it'd be more manageable to have all third party licenses in a single file. We could re-use licenses for unrelated pieces of code if they fall under a license already in the file. I was also concerned that putting the license inside the subpackage may mislead some into thinking all code i...

north knotBOT
#

Postgres backup completed!

regal archBOT
#

Each sub-package could be treated as an extension, but this limits control over which cogs are loaded.

I just had this thought earlier today and wanted to comment here, but I see you've already been thinking about this. I've been finding it a little awkward to not be able to reload a specific cog in the moderation package, for example, and wanted to propose that each cog is its own extension to alleviate this. The inability to unload a specific cog while keeping others intact seems like ...

regal archBOT
ebon magnetBOT
#

Build 20200705.1 succeeded

Requested by

GitHub

Duration

00:01:06

Build pipeline

Seasonal Bot

regal archBOT
regal archBOT
#

Using the function __name__ in the cache is still not safe because the functions don't necessarily have unique names and the user then needs to be aware of that functionality to clear the cache. Using a proper class without a shared state and exposing the clear etc. through methods would probably be most suited now.

Why would we not want to split up the get embed method for readability? I don't think moving the sending into a separate method particularly helped the fact that it does too ...

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200705.1 failed

Requested by

GitHub

Duration

00:00:52

Build pipeline

Bot

#

Build 20200705.2 failed

Requested by

GitHub

Duration

00:00:48

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200705.3 failed

Requested by

GitHub

Duration

00:00:48

Build pipeline

Bot

#

Build 20200705.4 succeeded

Requested by

GitHub

Duration

00:01:56

Build pipeline

Bot

regal archBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200706.1 succeeded

Requested by

GitHub

Duration

00:02:28

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200706.2 succeeded

Requested by

GitHub

Duration

00:02:25

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200706.3 succeeded

Requested by

GitHub

Duration

00:02:16

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200706.4 succeeded

Requested by

GitHub

Duration

00:02:38

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200706.5 succeeded

Requested by

GitHub

Duration

00:02:12

Build pipeline

Bot

north knotBOT
#

Postgres backup completed!

regal archBOT
ebon magnetBOT
#

Build 20200706.6 succeeded

Requested by

GitHub

Duration

00:02:40

Build pipeline

Bot

regal archBOT
regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200706.7 succeeded

Requested by

GitHub

Duration

00:02:30

Build pipeline

Bot

regal archBOT
regal archBOT
#

@dolphingarlic I don't think that this should good feature. Sending something every time when someone posts GitHub link is not a good idea. And all PRs have to have approved the linked issue, what this PR definitely don't have. Make issue first, then staff/core devs will discuss it and then decide will this come to bot or not.

I think this was discussed in the #meta channel over at PyDis and there was some merit in the linked idea. Personally I think it is useful, especially when getti...

regal archBOT
#

Sorry, I didn't know that I should've created an issue first. (I don't think CONTRIBUTING.md mentioned that).

It's not mentioned because it's only a hard requirement for Seasonalbot. It's generally a good idea to make an issue first so you don't "waste" your time working on something that might not be merged, but since this seems to be something you've made for other reasons already it's a bit of a moo point.

I'm a bit meh on the repo link prettification, but the snippet formatting is...

ebon magnetBOT
#

Build 20200706.8 succeeded

Requested by

GitHub

Duration

00:02:34

Build pipeline

Bot

regal archBOT
#

As Discord already embeds a link preview by default for GitHub-links, I'm not sure if I'm in favor of having the bot respond with a second embed containing some details about the repository. If we were to have "repository information" feature, I think it would be better as an explicitly invoked command. I'm just not sure whether or not such a command fits the scope of our community utility bot. (I really mean: "not sure"; it's not a euphemism for "I don't think it fits".)

I do like the sni...

regal archBOT
#

If this were to be included, I'd prefer it to be a command or limited to maybe 3 lines without directly invoking it instead of looking up links in messages. Most github permalinks that I've seen get posted in discussion channels like python-language where this behavior wouldn't be as desired
While the repo information is nice I don't think the additional info like stars is particularly useful in most situations

#

I don't particularly think this fits in the moderation subpackage. The cogs should really be all organized into separate subpackages, similar to as stated here: #160 (comment).

Why do you feel like it wouldn't fit there? The slow mode is a moderation tool and the cog is restricted to moderators only. Maybe some others could weigh in here?
I agree that #160 needs to be realized in some way to declutter the cogs bu...

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200706.9 succeeded

Requested by

GitHub

Duration

00:02:32

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200706.10 failed

Requested by

GitHub

Duration

00:02:02

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200706.11 succeeded

Requested by

GitHub

Duration

00:02:38

Build pipeline

Bot

regal archBOT
#
[python-discord/bot] branch deleted: feat/util/1019/slowmode
north knotBOT
ebon magnetBOT
#

Build 20200706.12 succeeded

Requested by

GitHub

Duration

00:04:02

Build pipeline

Bot

oak estuaryBOT
native joltBOT
regal archBOT
#

How do we feel about removing the link from read more in truncated doc responses?
The link is already the embed's url, although it does not highlight on mobile so I've thought about removing the inline codeblocks from the title, which I think also ends up looking a bit more pleasing.
embed permalink

I'm rewriting the module and abstracting some things, so this would prove useful as one less thing to need to pass around.

regal archBOT
#

LGTM. I didn't get the chance to feature test this to ensure the scheduler still works 100% correctly after the changes (such as for help channels, mod tools, and reminders), but all of the main async logic looks correct. Nicely done, Mark.

The only additional thing I could think of would be some unit tests for the scheduler (I didn't see any in tests/bot/utils/, but I'm assuming some of the existing tests might use it). Without dedicated unit tests, a complete feature test would be part...

#

Not at all necessary and functionally equivalent, but this would be a good reason to use the walrus operator:

        if (delay := (time - datetime.utcnow()).total_seconds()) > 0:
            coroutine = self._await_later(delay, task_id, coroutine)

I find that it's a minor improvement to readability by clearly communicating to the reader that the variable is only used within the scope of a statement, and makes the code a bit less repetitive.

north knotBOT
#

Postgres backup completed!

regal archBOT
regal archBOT
#

PR looks solid to me. However the lines 560-569 could be simplified, discord.py has a HTTPClient.unpin_method method seen here which is exposed under bot.http which we could use instead, as that will directly be making call to API without needing to try and find the message in either cache or via fetch_message API call and will only need to handle HTTPException error, which will be just raised when message wasn't...

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200707.1 succeeded

Requested by

GitHub

Duration

00:02:28

Build pipeline

Bot

regal archBOT
#
[python-discord/bot] branch deleted: bug/mod/bot\-4r/modlog\-member\-update
north knotBOT
ebon magnetBOT
#

Build 20200707.2 succeeded

Requested by

GitHub

Duration

00:04:09

Build pipeline

Bot

oak estuaryBOT
regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200707.3 succeeded

Requested by

GitHub

Duration

00:02:51

Build pipeline

Bot

oak estuaryBOT
regal archBOT
ebon magnetBOT
#

Build 20200707.4 failed

Requested by

GitHub

Duration

00:04:44

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200707.5 failed

Requested by

GitHub

Duration

00:01:05

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200707.6 failed

Requested by

Joseph Banks

Duration

00:00:44

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200707.7 failed

Requested by

Joseph Banks

Duration

00:00:51

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200707.8 failed

Requested by

GitHub

Duration

00:00:33

Build pipeline

Bot

regal archBOT
north knotBOT
ebon magnetBOT
#

Build 20200707.9 succeeded

Requested by

GitHub

Duration

00:05:43

Build pipeline

Bot

oak estuaryBOT
regal archBOT
regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
regal archBOT
#

@Senjan21

... if moderator actions an incident while the bot is offline, bot won't take any actions (archive) on the message ...

The cog is designed to react to events just like any other listener the bot may have, and so it's limited in the same ways: you cannot distribute infractions while the bot is offline, you cannot schedule reminders, the paginator stops working, etc. You don't normally expect the bot to catch up with paginator reaction clicks after it connects; neither does it ...

ebon magnetBOT
#

Build 20200708.1 succeeded

Requested by

GitHub

Duration

00:02:39

Build pipeline

Bot

regal archBOT
#

@ks129

Maybe should bot notice in #incidents channel that currently, this is not working (before shutdown)/that this is working again (on startup)?

I don't feel like there's anything inherently special about this cog that would require such a thing. The bot does not normally announce that it's going to restart, even if it makes much more critical features unavailable for the time being. In #mod-log, we can see new commits on master, which indicate a restart, and we can also see when ...

regal archBOT
#

The problem

Right now, it is possible to exploit certain parts of the bot in order to make the bot post things a regular member would normally not be allowed to post.

These techniques can be used to circumvent our filters, which is somewhat problematic.

For example, by using eval to build a string containing a discord guild invite, you can circumvent our guild invite filter.
![image](https://user-images.githubusercontent.com/2098517/86953460-c2edcf00-c154-11ea-8091-402a41b24e7b.png...

regal archBOT
#

Then it would probably be better to make the Doc cog raise BadArguments.

The problem with running all bot messages through filters is that this would need a bunch of exceptions, like our infraction search command, mod-log and mod-alerts embeds, and so on. I think it's better if we just try to generalize exceptions around the BadArguments approach.

ebon magnetBOT
#

Build 20200708.2 succeeded

Requested by

GitHub

Duration

00:02:31

Build pipeline

Bot

regal archBOT
#

Then it would probably be better to make the Doc cog raise BadArguments.

This is obviously one of the solutions, but I'm not sure if it's the best one considering the error handler output.
As an example, the user supplies a (valid) symbol to the cog, which fails to be found in the inventories or fails to be parsed by the cog; if this is handled with BadArgument then a mostly unhelpful and irrelevant command help is sent alongside the message passed to BadArgument, while the user did inv...

#

We're going too far into the weeds. There is an immediate need to go through all instances where the bot directly pipes the user's input back out and make this not happen.

If for some reason we have so many cogs doing their own thing with error embeds then we can investigate some utility, monkeypatch, or whatever in another PR. Let's get the immediate problem fixed ASAP.

#

@sco1 is right that we need to get this solved ASAP. Also, I've tested the !doc command now, but it doesn't seem like this command can be used to circumvent the filters very effectively. It does include the input, but it includes that input inside a code block in an embed, so for instance:

image

A user who attempts this will trigger the filters with their initial message, and the bo...

regal archBOT
#
[python-discord/bot] New branch created: range\-len\-message
#

Here's my implement:

  1. Convert code parameter to an instance of int (if while the process is running ValueError is raised then it's actual code) [Go to 4]
  2. Crawl on all channels using a for loop to be able to fetch the message. (https://discordpy.readthedocs.io/en/latest/api.html#discord.abc.Messageable.fetch_message)
  3. If the message is found, strip the prefix and convert it to a proper format. Else, display some fancy error message and return. (sanitize it eeeh)
  4. Execute ...
#

I tried to keep the message brief at the cost of things I'd like to say about iterating over collections that don't implement __getitem__ or which are unordered by design. I included the final section because potential applications of zip and enumerate are where I most often see people use range(len(...)) even when they know how standard iteration works, though that section might not be necessary given that messages for those two builtins exist.

regal archBOT
ebon magnetBOT
#

Build 20200708.3 failed

Requested by

GitHub

Duration

00:02:28

Build pipeline

Bot

regal archBOT
native joltBOT
#

Using Python ^3.7 or ^3.8 in your pyproject.toml file prevents adding this package via poetry add:

[SolverProblemError]
The current project's Python requirement (^3.8) is not compatible with some of the required packages Python requirement:
  - flake8-annotations requires Python >=3.6.1,<3.9

Because no versions of flake8-annotations match >2.2.0,<3.0.0
 and flake8-annotations (2.2.0) requires Python >=3.6.1,<3.9, flake8-annotations is forbidden.
So, because tool-belt de...
regal archBOT
regal archBOT
native joltBOT
regal archBOT
#

We effectively manually maintain a list of extensions when we load them in __main__. I haven't heard any complaints and I like the explicitness of it. We can turn this into an actual list that the extension management cog can use to know which modules are valid extensions to load/unload. It's based on the assumption that we want to load all extensions by default. If not, separate lists would be required.

This avoids any complicated extension detection code at the cost of being vulnerable...

regal archBOT
#

it is believed the user-sent messages can only contain one attachment at maximum.

This is true on Desktop, but not on mobile. It's been almost 2 years since I tested it though (was relevant for Big Brother). That being said, the implementation is fine the way it is; there's no way to include multiple images in a single embed, and many images would be noisy anyway.

Other thoughts:

  • The webhook doesn't use the nickname. Should it?
  • The "actioned"/"rejected" in the footer is a bit ...
regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
#

Crawl on all channels using a for loop to be able to fetch the message. (https://discordpy.readthedocs.io/en/latest/api.html#discord.abc.Messageable.fetch_message)

Ignoring the rest of the implementation details for now, in what kind of situation do you expect this command to be executed? I think we'd need a very good reason to try and fetch a message on every channel in our guild and I'm not sure this command is enough reason for such an API call heavy implementation. Wouldn't the comma...

regal archBOT
regal archBOT
#

Sentry Issue: BOT-6S

In the case below, I believe they left the guild after the muted role was added but before it could attempt to kick them from a voice channel.

NotFound: 404 Not Found (error code: 10007): Unknown Member
  File "bot/cogs/moderation/scheduler.py", line 155, in apply_infraction
    await action_coro
  File "bot/cogs/moderation/infractions.py", line 229, in action
 ...
regal archBOT
regal archBOT
#

@MarkKoz

[re: only 1 user-sent attachment] This is true on Desktop, but not on mobile.

Thanks for mentioning this, I didn't think to test on mobile.

The webhook doesn't use the nickname. Should it?

Good question, I don't know. I think I went with name because we don't otherwise store the incident author identity (only avatar and name at the time or archivation<sup>sorry</sup>), and I figured if someone changes their nickname to something memey temporarily it may end up being di...

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200709.1 succeeded

Requested by

GitHub

Duration

00:02:28

Build pipeline

Bot

regal archBOT
regal archBOT
ebon magnetBOT
#

Build 20200709.2 succeeded

Requested by

GitHub

Duration

00:02:28

Build pipeline

Bot

regal archBOT
regal archBOT
native joltBOT
#

Describe the bug

Using Python ^3.7 or ^3.8 in your pyproject.toml file (i.e. the default values that Poetry generates) prevents adding this package via poetry add:

[SolverProblemError]
The current project's Python requirement (^3.8) is not compatible with some of the required packages Python requirement:
  - flake8-annotations requires Python >=3.6.1,2.2.0,=3.6.1,<3.9, flake8-annotations is forbidden.
So, because tool-belt depends on flake8-annotations (^2.2.0), vers...
ebon magnetBOT
#

Build 20200709.3 failed

Requested by

GitHub

Duration

00:02:12

Build pipeline

Bot

#

Build 20200709.4 failed

Requested by

GitHub

Duration

00:02:03

Build pipeline

Bot

regal archBOT
#

About

Have notification/video link+details posted in discord when a YouTuber uploads a video. Here the YouTubers can be those that make content related to python, a specific field(web dev), etc. A few notable examples are Corey MS, Traversy Media, FreeCodeCamp, JustDjango, CodingEntrepreneurs, etc.

Implementation

This can be achieved using YouTube Data API (v3) which supports push notifications via PubSubHubbub.
(**[Link](https://developers.google.com/youtube/v3/guides/push_noti...

regal archBOT
#

This would be a message we could whip out when we see range(len(...)) for loops during help sessions. I intentionally left out a lot of interesting details to keep the message concise.

I recall there being a RealPython article about "pythonic loops" and was hoping to link to it, but it looks like it's now paid content. I saw that our guides are under construction and I'd be happy to write a guide on loops with an emphasis on pythonicness.

I don't know that linking to the official Pyth...

ebon magnetBOT
#

Build 20200709.5 succeeded

Requested by

GitHub

Duration

00:02:43

Build pipeline

Bot

regal archBOT
ebon magnetBOT
#

Build 20200709.6 succeeded

Requested by

GitHub

Duration

00:02:14

Build pipeline

Bot

native joltBOT
#

Thanks for the ping

Looks like this has also been asked upstream: https://github.com/python-poetry/poetry/issues/2646
And answered: https://github.com/python-poetry/poetry/issues/1930#issuecomment-653906544

The default caret requirement of, say ^3.8 tells Poetry that your project is compatible with [3.8, 4.0), but we currently do not guarantee compatibility with >=3.9 so this is technically an incompatibility. This can be solved with a tilde requirement, ~3.8, which would descr...

regal archBOT
native joltBOT
#
[python-discord/flake8-annotations] New branch created: fix\-python\-pin
regal archBOT
regal archBOT
#
[python-discord/bot] branch deleted: feat/test/765/command\-shadowing\-simple
#

@kwzrd I see what you're saying about displaying the REPL output. I think people who use range(len(...)) are familiar with iteration in general (and probably use it that way in a C-style language); if the concept of iteration itself is where they're struggling, they probably don't know why they have range(len(...)) in their code, and a tailored approach would be needed to teach them that concept. If we find that the current message isn't effective, we could see if a REPL display is what w...

#
[python-discord/bot] branch deleted: free\-tag
#
[python-discord/bot] branch deleted: unittest\-utils
#
[python-discord/bot] branch deleted: Hemlock/newline\_alternative
#
[python-discord/bot] branch deleted: autoconfig
north knotBOT
ebon magnetBOT
#

Build 20200709.7 succeeded

Requested by

GitHub

Duration

00:05:35

Build pipeline

Bot

oak estuaryBOT
regal archBOT
regal archBOT
regal archBOT
#
[python-discord/bot] branch deleted: sauce
north knotBOT
#

Postgres backup completed!

regal archBOT
regal archBOT
native joltBOT
#
[python-discord/flake8-annotations] branch deleted: fix\-python\-pin
#
[python-discord/flake8-annotations] New tag created: v2\.2\.1
#
[python-discord/flake8-annotations] New branch created: dev\-next
#

Changelog

[v2.3.0]

Added

  • #87 Add --mypy-style-init-return to allow omission of a return type hint for __init__ if at least one argument is annotated.

Additional Details

To help provide compatibility with Mypy for maintainers that wish to do so, the --mypy-init-return flag has been introduced to mimic Mypy's allowance for the omission of return type hints for __init__ methods that are not dynamically typed (at least one argument is annotated).

For example, from...

native joltBOT
regal archBOT
ebon magnetBOT
#

Build 20200710.1 succeeded

Requested by

GitHub

Duration

00:02:30

Build pipeline

Bot

regal archBOT
#
[python-discord/bot] branch deleted: range\-len\-message
north knotBOT
ebon magnetBOT
#

Build 20200710.2 succeeded

Requested by

GitHub

Duration

00:04:56

Build pipeline

Bot

oak estuaryBOT
regal archBOT
regal archBOT
#

While there was not much use for the link itself, I think the highlight showed a bit better that it wasn't a part of the text. I think just the text read more blends in a bit too much, but haven't found an alternative I was entirely satisfied with
doc readmore
Do you think it's fine as it - but without the link, or some of the alternatives I fit into the image?

north knotBOT
#

Postgres backup completed!

regal archBOT
regal archBOT