#dev-log

1 messages ยท Page 59 of 1

regal archBOT
regal archBOT
regal archBOT
regal archBOT
#
[python-discord/bot] New branch created: cleanrework
regal archBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
#
[python-discord/bot] New branch created: mbaruh/commands\-del
regal archBOT
regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
#

Description

Adds voice channel muting functionality, similar to text channel muting.

  • Allows muting any channel from any other channel or itself
  • Allows unmuting any channel from any other channel or itself
  • Implements a more lenient channel converter, to accept both voice and text channels as arguments.
  • Relays mute confirmation/failure to both the invocation channel and the muted channel (in the case of VC, the muted channel is replaced with the text-channel with the same nam...
regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
regal archBOT
regal archBOT
#
[python-discord/branding] New branch created: x\-icon
regal archBOT
regal archBOT
#

After a discussion in the Admin meeting, we've decided to expand the Bounty Board and integrating a leader board into the whole process.

My thoughts are as follows:

  • The board should be linked to GitHub so that we can track the PRs (ideally completed) and code reviews.
  • The board should have 4 columns: Username (GitHub and/or Discord), number of PRs, number of code reviews, some sort of scoring combining the two.

Scoring is something I want input on. My current thinking is 2 points...

#

Requires #1298 to be completed before this can be tackled.

Since we're going to be creating the leader board, it would be nice for users to check their own individual rank or total PRs and reviews via the !user command. While they will be able to see a leaderboard, we may only have the top 10 or 20 listed, so in order for people to see where they stand, it may be good for people to see what they have.

As stated, this would require the leader board issue to be completed first. In the...

regal archBOT
#

What I was getting at was that the channel would still maintain its members, but revoke all speaking permissions (and move the members to sync the new permissions). This could be useful if the silencing is for a short period, or just to get an announcement out or something.

I am not fully aware of what exactly this will be used for, so if you think just removing all members is better, I'd be happy to rewrite it to that instead.

#

This breaks the help of multiple commands like tempban or doc.
Is this worth taking care of? I don't think there's a proper way for us to differentiate between newlines added for readability in the source and the ones that are also necessary in the help output. That'd mean we'd have to change the docstrings with some special syntax or using line continuation which imo is not worth the tradeoff of complicating how it looks in the source code for the small improvement to what's sent on discord

#

I have a few questions:

  • Would this be specifically for things on the bounty board or on the repos in general?
  • In what channel would this leaderboard be?

The reason I bring up the second question is that the Development category is getting quite large. If we want to add another channel, like #dev-leaderboard, we may want to consider splitting the category up into multiple parts. This would probably mean a Dev Info and Dev Discussion category, but the exact name is a later question...

regal archBOT
#

We should probably keep this quite simple, since the !user command isn't a fully fledged review checker command. Here's my view on this:

User command

We could add a contributions category in the embed, where we display very basic data, like total number of contributions and contribution rank in the leaderboard โ€” or we could make individual fields for it.

However, we must remember that most users checking the user command aren't looking for their full contributions history. Most people...

regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
#

I have the same concerns as Vest.

This might just turn into a perpetual Hacktoberfest 2019, with the flood of more or less polished PRs, where contribs will just want to see their name on the leaderboard, without especially looking to contribute in a meaningful way.
This is even scarier if we include reviews, as we would have people just looking to earn a point, but not actually review the code, or just leaving approvals without even knowing what the PR is about.
At the end of the day...

regal archBOT
regal archBOT
#

I agree with Akaryas42 and Vest here.
Instead of having a user based leaderboard, we could keep track of the number of PRs, code reviews, additions, and deletions(if possible) done per month, more like statistics keeping track of GitHub activity.
This will not highlight any user(s) and will not lead to competitiveness.
This data can be displayed every month in the #dev-announcements channel.

Note: We have already seen such a thing at the end of hacktoberfest when Joe posted October's Gi...

regal archBOT
regal archBOT
regal archBOT
#

The current idea we discussed in the admin meeting was indeed to go for a contributors+staff board.

I trust our staff members and contributors to not act to the detriment of our projects and, frankly, if they would do that, they should not have the contributors or staff position. In any case, if we do have concerns about the conduct of contributors/staff members in regards to the board, we can discuss it with them. It's not like we're working with a group of strangers.

regal archBOT
#
[python-discord/site] New branch created: ks123/dewikification/event\-pages
regal archBOT
#

@janine9vn I like the idea of incentivizing the reviews. The question is how that would look in practice.

Imagine that you get 1.5 points for a review and something requires 3 rounds of reviews. That would mean 4.5 points to the reviewer and 1 to the person who wrote the code.

Maybe keeping it 1:1 would work better, but that sends a signal that we care about them equally. Do we really, or maybe it's better to test this out with an even higher score for reviews, like you proposed. Either way...

regal archBOT
#

I agree about that in theory, but I'm not sure how that could be automated.

If we only count the fact that they've started a review, isn't that saying that we'd rather see you review a little bit on more things, instead of in-depth reviews on fewer things? What this boils down to is a question of quantity versus quality.

As we've talked about a lot, our contributors and staff members will probably be sound in the reviewing, but I think it's worth pointing out that there may be such drawback...

regal archBOT
#

I have been messing around with the GitHub API a bit and especially this endpoint:
https://docs.github.com/en/free-pro-team@latest/rest/reference/pulls#reviews

In the API response, the list of users along with the state of the review is mentioned. we can use the state of the review to determine whether the reviewer gets points or not.

The following are my opinions:

Condition to get points:
  • If state = APPROVED or state = CHANGES_REQUESTED.
    • I am considering both t...
regal archBOT
#

If we are intending for this leaderboard to be a separate channel, it'll get a bit messy in the dev category. This would be the layout (the exact order of channels isn't important, but I find this one to make the most sense โ€”ย alternatively moving #dev-log):
<img width="240" alt="Screenshot 2020-11-23 at 19 32 05" src="https://user-images.githubusercontent.com/65498475/100000909-93b5c280-2dc2-11eb-87e9-80ddd4782fe7.png">

Instead, I propose the following option, where we split it into two...

regal archBOT
regal archBOT
regal archBOT
regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
#

More Implementation Details

  • There will be 5 leaderboards that have to be combined and sorted into a custom PyDis community leaderboard that we share as an embed. We effectively need to re-implement AoC's scoring system. See below for more info on the specifics.
  • How do we distribute which join code gets sent to which user and track when a leaderboard is full? There's a cap of 200 people per leaderboard and I'd rather not run into an issue of a person trying to join a leaderboard that ...
regal archBOT
oak estuaryBOT
regal archBOT
#
[python-discord/site] New branch created: sebastiaan/backend/refactor\-deployment
#

I've restructured the build & deploy sequence in our GitHub Actions CI workflow:

  • There's now a separate workflow to deploy to our cluster

  • The Build workflow has an additional if check to ensure we're only starting the build & deploy sequences for pushes to master

  • We now checkout the python-discord/kubernetes repo to fetch the deployment.yaml file located in there

Note: This PR is stalled until python-discord/kubernetes#42 is merged.

regal archBOT
#
[python-discord/sir-lancebot] branch deleted: feature/wonder\-twins\-command
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
#

I tested this with all the commands I could find in help, and I got the following:

Broken:

  • tempban
  • tempmute
  • tempvoiceban
  • superstarify

Improved:

  • eval
  • close

I'm not actually seeing any difference in doc, so I won't address it. All the other broken commands have their doc syntax in common. I'm seeing a few possible solutions:

  1. Modify the doc of eval and close.
  2. Modify the docs of the broken commands.
  3. Add a check for the doc syntax of the broken commands.
  4. ...
regal archBOT
#

You can map the voice channel ID to the text channel ID rather than doing it by name. It will be more accurate and won't be susceptible to channels being renamed. At that point, this function would be redundant; it'd become equivalent to self.bot.get_channel(channels[channel.id]), which is short enough to not warrant a separate function. The redundancy would be especially true considering this function is currently only called in one place.

#

I don't think it should be a separate filter. It could be integrated into the existing one. The way I envision it is that simply specifying the domain will filter all its subdomains too. This would apply to any level. So b.a.com will filter itself and any further level subdomains of it like c.b.a.com but not a.com. Granted, it would then be impossible to filter only all subdomains and not the current level. However, I don't foresee that being required.

#

I'm not actually seeing any difference in doc, so I won't address it. All the other broken commands have their doc syntax in common. I'm seeing a few possible solutions:

  1. Modify the doc of eval and close.
  2. Modify the docs of the broken commands.
  3. Add a check for the doc syntax of the broken commands. (I've prepared an implementation for this if this approach is of interest.)
  4. Ignore and close the issue.

Sorry, it's the get subcommand of doc. Doing the checks at ru...

night lilyBOT
#
Sir Lancebot

Connected!

oak estuaryBOT
regal archBOT
#

I don't follow what you mean here. The function is only responsible for sending alerts to the source and target channel (replacing the target channel with a voice chat channel in case of VC). Choosing between the invocation channel and a channel argument was left up to the caller.

There is one check that is sort of related to that, the one that compares source to target channel to prevent duplicate messages.

regal archBOT
regal archBOT
#
[python-discord/sir-lancebot] New branch created: ks123/advent\-of\-code
regal archBOT
regal archBOT
#

How would you get the overwrite object in the if and else branches without calling the overwrites_for first? Since it's different for both branches, you'll need to have duplicate code inside the branches or have two checks (current implementation).

The code of the bottom branches (line 238-247) can be refactored into the top branches (226-233), but then the call on 235/236 has to be duplicated.

regal archBOT
regal archBOT
regal archBOT
regal archBOT
#

Closes #1304

Adds the following channels to default config:

  • Code/Help 1 (voice)
  • Code/Help 2 (voice)
  • General/Offtopic (voice)
  • code-help-voice-1 (text)
  • code-help-voice-2 (text)
  • staff-voice (text)
  • admin-voice (text)
    Note: admin-voice (text) is still missing an ID.

I tried sepearting out the two groups (text chat and voice chat), as it is confusing in the current form:
L200-L201: voice
...

regal archBOT
#

I don't understand how that issue differs from what you're already doing. It compares it to !shh, which is just an alias for the silence feature in this cog. The two issues look like duplicates. Muting individual users could be done through the Discord UI. If needed, a command could be added to keep track of user infractions like we do for bans and kicks, which could also be done through the UI. However, that is out of scope.

#

It's still incorrect. Every argument must be on a separate line You also inconsistently used 4 and 8 space indents. There is also some test code which has similar style issues. For long function calls, consider assigning an argument to a variable and then passing the variable to the function. This will avoid having to break up the function into multiple lines. For example,

            self.scheduler.schedule_later(
                30, 
                afk_channel.id, 
           ...
#

I didn't mean to completely get rid of the converter, just to change it's implementation to rely on the existing converters. When using a union, there isn't going to be an error for an ambiguous matches.

An alternative implementation is to create a subset of the text channel converter which does not support matching by plain text names. Such converter in a union with the regular voice channel converter would effectively funnel all plain text names to the voice converter. Of course the down...

night lilyBOT
#
Sir Lancebot

Connected!

oak estuaryBOT
regal archBOT
#

I think you misunderstood what I was aiming for. The problem is that there are if statements that are avoidable. The problem is not with calling isinstance twice. What you've done still keeps the avoidable if statements. I've corrected my original code suggestion for this (https://github.com/python-discord/bot/pull/1297#discussion_r529262670) and I still think you should implement it like that.

oak estuaryBOT
oak estuaryBOT
regal archBOT
#

I removed the original converter because I realized all that's lost would be the ability to mix case, and as you mentioned, the ambiguity warning.

It didn't seem like those were critical features, and the discord library just picked the first option when the argument was ambiguous. Regardless, I'll go ahead and reimplement it with the suggested changes as it doesn't complicate the code base much.

But on the note of mixing case, would it be better to not allow that? It can lead to ambigu...

north knotBOT
#

Postgres backup completed!

regal archBOT
regal archBOT
#

Yeah, I agree that those features aren't critical. I just figured that since you already did most the of the work, you may as well leave it in. However, since you've removed it again, I could live without it. I'll leave that decision up to you and other reviewers.

discord.py's converters are case sensitive so you don't need to worry about mixed case. I'm suggesting that you rely on them to do all the comparison work (i.e. by calling their convert() methods within your convert()) rather...

regal archBOT
regal archBOT
#
[python-discord/bot] New branch created: Stelercus/close\_command
regal archBOT
regal archBOT
#

It is not really wrong. I mainly found it unnecessary. The suggestion at the end is mainly because it'd make the code shorter:

if not await self.dormant_check(ctx):
    return

await self.move_to_dormant(ctx.channel, "command")
self.scheduler.cancel(ctx.channel.id)

versus

if await self.dormant_check(ctx):
    await self.move_to_dormant(ctx.channel, "command")
    self.scheduler.cancel(ctx.channel.id)

It also makes the control flow slightly easier to f...

regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
#

We could take this moment to remove the constants.Channels.how_to_get_help from the EXCLUDED_CHANNELS constant. The only non-"help channel" that's currently in a help channel category is the cooldown channel.

I kinda like the constant, as it labels the constant as an excluded channel, so we could do something like this (combined with the suggestion for line 57):

EXCLUDED_CHANNEL = constants.Channels.cooldown

Then again, keeping it as it is allows us the freedom ...

regal archBOT
regal archBOT
regal archBOT
regal archBOT
#
[python-discord/bot] New branch created: sebastiaan/bugs/add\-voiceban\-to\-scheduler\-types
regal archBOT
#
[python-discord/bot] branch deleted: sebastiaan/bugs/add\-voiceban\-to\-scheduler\-types
oak estuaryBOT
regal archBOT
#

Relevant Issues

Closes #522

Description

This makes difference between should this use staff leaderboard data or combined public data based on channels. When this is refreshing leaderboards, this is overwriting all current local data, because it is hard to keep track what is already cache. This sends different join codes for staff and normal users. Users will not notice big changes from last year, as UI is same. This links users with 1 leaderboard.

Additional Deta...

regal archBOT
regal archBOT
regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

oak estuaryBOT
regal archBOT
#

Automatic extension discovery has to import this subpackage to check if it's a valid extension. This is mainly to be able to list all extensions with the command that shows the loaded/unloaded status. Otherwise, it could have taken a more dynamic approach which attempts to load extensions as requested and considers them invalid if discord.py throws an error.

If this extension is not being loaded, then any code that gets executed upon importing the package is just a waste. Side effects coul...

#
[python-discord/bot] branch deleted: feat/help/refactor
#

ed68051 Help channels: move to a subpackage - MarkKoz
a1b2e8e Help channels: remove get_clean_channel_name - MarkKoz
abd6953 Help channels: move name and channel funcs to s... - MarkKoz
0cc221a Help channels: move validation code to init.py - MarkKoz
aa7eff2 Help channels: rename modules to use singular t... - MarkKoz

oak estuaryBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
regal archBOT
regal archBOT
regal archBOT
#

The file name would likely be fine as just deploy.yml unless you foresee additional workflows for other deployments. Even in that case, a name with "deploy" as the prefix would be better for sorting purposes, like deploy-kubernetes.yml or just deploy-k8s.yml.

Ah, yeah, I meant to change that back. Thanks for catching it.

PyCharm's validator picks ups deploy.yaml as a special kind of YAML file (haven't found out which one yet) and starts screaming that it doesn't follow the sch...

regal archBOT
oak estuaryBOT
regal archBOT
#
jb3
[python-discord/forms-frontend] New branch created: jb3\-patch\-1
#
[python-discord/sir-lancebot] New branch created: sebastiaan/ci/add\-core\-dev\-approval\-check
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
#

This commit adds a workflow that checks if a pull request has received at least one approval from a core developer. If not, the check will fail and block us from merging the Pull Request.

The reason we're adding this check is because we're moving away from making the entire Core Developers team a "code owner" of every line in every repository. This created a lot of "notification" spam, which drowned out the actually relevant notifications.

As we still want to make sure that there's at l...

#
jb3
[python-discord/forms-frontend] branch deleted: jb3\-patch\-1
night lilyBOT
#
Sir Lancebot

Connected!

oak estuaryBOT
regal archBOT
#
[python-discord/bot] branch deleted: mbaruh/commands\-del
#
[python-discord/bot] New branch created: mbaruh/infractions
regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
#

Adafruit are a wonderful company who helped sponsor one of our code jams some time back, but should probably not be listed alongside Linode, Notion, Sentry and these other companies who are ongoing sponsors that provide us with value month after month.

Let's remove Adafruit from that sponsor block on the front page.

Note: We should not remove them from the code jam info page where they were a sponsor, of course.

#
[python-discord/site] New branch created: ks129/frontpage\-adafruit\-remove
regal archBOT
#

Hi, thank you for contributing!
The thing with changes to moderation features, is that they need follow internal discussions to decide on whether we want it, and how we would use it - which in turn affects the implementation.

That is not to say that you can't PR such a feature, but rather that the right course of action here would be to open an issue first to allow us to discuss it properly, and to prevent a case where you would do a lot of work that would end up not being used.

I will...

regal archBOT
#
[python-discord/bot] New branch created: mbaruh\-codeowners
#
[python-discord/bot] branch deleted: mbaruh\-codeowners
oak estuaryBOT
regal archBOT
#
[python-discord/site] branch deleted: ks129/frontpage\-adafruit\-remove
#

ad84a56 Restructure Build & Deploy sequence in CI - SebastiaanZ
f795ec9 Rename kubernetes-deployment.yaml to deploy.yaml - SebastiaanZ
6e17536 Merge branch 'master' into sebastiaan/backend/r... - SebastiaanZ
582aa51 Merge branch 'master' into sebastiaan/backend/r... - Den4200
5ec3971 Merge branch 'master' into sebastiaan/backend/r... - Den4200

#
[python-discord/site] branch deleted: sebastiaan/backend/refactor\-deployment
regal archBOT
regal archBOT
#

As a bit of an update, there is no real good way to fix the output, without changing the docstrings. Paragraphs that pass the 80 character limit have to be spaced onto multiple lines for linting, but discord embeds can't really automatically handle that. There is no good way to stay under the limit, and present a good output.

This means we will have to shorten or break up the broken doc strings or implement a parsing solution.

regal archBOT
oak estuaryBOT
regal archBOT
regal archBOT
#

Symbols from the same page will expire at roughly the same time. If a page URL is used as the key and symbols are stored under it, then it'd be viable to use EXPIRE. The key can be prefixed with the package name to make it possible to search redis for all keys matching a pattern and delete them. This is slower than having a single key to delete like you currently do, but deleting packages won't be a common occurence.

There's processing time for the symbol queue as well as some symbols bein...

#

This doesn't follow the established format. In order for the license to be re-usable by other copyrights, the copyrights should be separate from the license content.

Applies to:
    - Copyright (c) 2007-2020 by the Sphinx team (see AUTHORS file). All rights reserved.
        - bot/cogs/doc/inventory_parser.py: _load_v1, _load_v2 and ZlibStreamReader.__aiter__.
---------------------------------------------------------------------------------------------------
regal archBOT
#

The code is being ran synchronously so nothing yields control to the event loop.

But I had a concern that I forgot about with the cancel here as I'm not sure how exactly it works. The docs mention that the exception will be raised at the next cycle of the event loop. Does that mean if this was getting executed while _parse_queue is suspended It'll be cancelled immediately when it gets control or on the next await inside of it?

regal archBOT
#

@Akarys42 That would mean that people are reminded to go back to the channel and engage on a message, which could be a good thing. It also gives them a place to see the conversations that were at least not totally ignored.

On the flip side, I think it's odd not giving the user a complete log of help channel activity in their DMs. What if they wanna find back to a question that wasn't answered? What if they wanna update their question but has left the channel?

Taking all of this into account...

regal archBOT
regal archBOT
#

Only user fetched symbols go to redis as pages may contain a lot of symbols (monolithic doc pages like discordpy's api reference may contain thousands behind a single url) that simply won't ever get fetched by user or very rarely, storing them feels like a waste when there's only a small cost to the fetching and in case it's a more used url it'll already be cached in CachedParser's internal dict as mentioned in https://github.com/python-discord/bot/pull/1014#discussion_r532129908

#

It'll just pass through

In [28]: from urllib.parse import urljoin

In [29]: urljoin("http://www.baseurl.com/path/to.ext#something", "txe#somethingelse")
Out[29]: 'http://www.baseurl.com/path/txe#somethingelse'

In [30]: urljoin("http://www.baseurl.com/path/to.ext#something", "http://www.anotherurl.com/path#id")
Out[30]: 'http://www.anotherurl.com/path#id'
regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
regal archBOT
#
[python-discord/bot] branch deleted: mbaruh/infractions
oak estuaryBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
#

I know the original specification for this task was to give points, decrementing from 100, but I did more research and found this on private leaderboards:

For N users, the first user to get each star gets N points, the second gets N-1, and the last gets 1.

This ultimately will not have a major effect on the final results, but if there is time, remove the list splicing on these two lines, and the points = 100 should just become the length of leaderboard_users.

I won't request this a...

regal archBOT
regal archBOT
regal archBOT
regal archBOT
#

I have a few changes in mind, but I wanted to verify that these are changes we'd want before I potentially clutter the commit history with them.

Generics

These two type aliases are currently defined as follows:

RedisKeyType = Union[str, int]
RedisValueType = Union[str, int, float, bool]

If we redefine them using TypeVar then we can have generics for RedisCache and RedisQueue, but that might count as a backwards-incompatible change depending on what the spec is inte...

regal archBOT
regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
#

Description

Instead of putting each line as a separate entry in the lines parameter, .extension list will create a line with newline characters in it, like so

https://github.com/python-discord/sir-lancebot/blob/b0bddb905b8b7e311aad103570c8245f7c0a0683/bot/exts/utils/extensions.py#L164-L168
While this can seem harmless, this will cause the line length check to fail, and raise a RuntimeError

https://github.com/python-discord/sir-lancebot/blob/b0bddb905b8b7e311aad103570c8245f7...

regal archBOT
regal archBOT
#

OS: Windows 10
Command: aoc leaderboard
Config:

  • Fake Redis is True
  • Last year's python discord private leaderboard

Exception:
https://paste.pythondiscord.com/alafejusus.rust

Some of the unicode characters that raise the error: \u2b50, \u0142

Resolving this, as it seems to be unrelated to this code specifically, but rather as Sebastiaan pointed out, a logging problem. I will investigate and open a seperate issue.

regal archBOT
regal archBOT
#
[python-discord/sir-lancebot] branch deleted: sebastiaan/ci/add\-core\-dev\-approval\-check
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
#
jb3
[python-discord/forms-backend] New branch created: add\-form\-schema
#
jb3
[python-discord/forms-backend] branch deleted: add\-form\-schema
#
[python-discord/sir-lancebot] branch deleted: ks123/advent\-of\-code
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
#
jb3

We should use pydantic to create models for our form structure.

This issue should purely implement the models, there is no reason to add any routes for this yet.

Where possible we should perform as much validation as possible to ease stray data entering the database.

We should sanitise all fields that are not in the SCHEMA.md file in the root of the repository to avoid having MongoDB control characters entering the fray.

#
jb3

Right now the authentication route will set an admin property to True in the token if a record exists in the admin collection that looks like:

{
  "_id": "112233445566778899"
}

Let's write a couple of decorators for use across the application:

  1. Validate that tokens provided in the Authorization header are legitimate (signed by us), else return an error.
  2. Validate that the authentic token has admin set to true, else return an unauthorized error.
#
jb3

Update the existing form submission code to store data tied to a form.

Right now the implementation has some code to perform anti-spam and Discord data collection, but there is no method for validating the submitted data matches the fields on the form.

The current implementation also does not record anything, just returns it to the user to show that the route is working.

night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
#

Description

Currently, the .aoc leaderboard command says "Here's our current top 9! :christmas_tree::christmas_tree::christmas_tree:". This is confusing because it is actually not the current top 9, because the leaderboard only updates every 30 minutes. This already led to a bit of confusion in the #advent-of-code channel. The leaderboard command should make it clear that it updates every 30 minutes so what it shows may not be accurate.

Reasoning

Less confusion over the lea...

#
jb3

We're Python programmers (surprise! :tada:). It would make sense to be able to validate form responses with Python snippets.

The way we should do this is write a standard interface for validating form responses.

Validation functions will look like:

def validate(value):
    if value == "correct":
        return True
    else:
        return False, "error message here"

We'll run this inside snekbox so need to decide on a serialisation method to bring data in and out of...

regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

#
Sir Lancebot

Connected!

#
Sir Lancebot

Connected!

regal archBOT
regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
#
[python-discord/forms-backend] New branch created: ks123/models
regal archBOT
regal archBOT
#

The code is being ran synchronously so nothing yields control to the event loop.

Each event is awaited. That provides many opportunities to yield control. It may also be an issue that the events dictionary could get updated during iteration.

Does that mean if this was getting executed while _parse_queue is suspended It'll be cancelled immediately when it gets control or on the next await inside of it?

Not sure. Probably the former.

#

Sentry would only create one issue for this and the Sentry webhook would only relay it once. It could be marked as resolved and later be automatically unresolved by Sentry as a regression. The raw logs are not looked at actively. They are looked at only rarely when something seems wrong and there's no other info. I'm not sure if this is adequate.

#
[python-discord/bot] branch deleted: pure/feature/infraction\-append
oak estuaryBOT
regal archBOT
#

Is it really a small cost? You'd end up fetching the page and parsing all its symbols, which is especially bad in monolithic pages as you mentioned. Every time the bot restarts, the dict is cleared. It's conceivable that for every restart, a different symbol from the same page would be requested. Though individual symbols may be rare, combined together, the chance of any "rare"/new symbol being request seems relatively high.

regal archBOT
#

An another problem with ast is that it destroy the information of how the initial source looked, but the custom parser just lets it through.
I don't think there are many cases where the current parser will fail after the string errors are handled, it won't be able to split conditionals because it can't tell apart an optional bracket or a list arg but should do fine in other cases as it only needs to keep count of the brackets

#

I don't think it'll be very big (maybe a dozen mb or so), just feels wasteful, but if we're updating with the set_if_exists then perhaps it's worth it as a redis op is taking place anyway. the current structure is ...Docs:<package>, should be fine if we create a key for every relative url path namespaced after the package and set expires on that as you mentioned. The differences between when the individual items inside were parsed and added to redis are negligible compared to the timeout they...

oak estuaryBOT
regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

north knotBOT
#

Postgres backup completed!

regal archBOT
regal archBOT
#
[python-discord/forms-backend] New branch created: ks123/admin\-authentication
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
#
jb3
[python-discord/forms-backend] branch deleted: ks123/admin\-authentication
#
jb3
[python-discord/forms-backend] branch deleted: ks123/models
regal archBOT
#
[python-discord/sir-lancebot] New branch created: sebastiaan/advent\-of\-code/refactor\-background\-tasks
regal archBOT
#

The Advent of Code extension runs two background tasks during the event:

  • countdown_day to announce the release of the next puzzle
  • countdown_status to update the bot's status with the time left until the next puzzle is released

However, both tasks were written with Season Manager in mind, meaning that they rely on the extension only being loaded in December. In addition, some changes in Discord's API flow mean that the countdown_status task has a high chance of failing during ...

regal archBOT
regal archBOT
north knotBOT
#

Postgres backup completed!

regal archBOT
#

Description

The logic for the custom Advent of Code leaderboards is unable to handle duplicate names, leading to instances where the score and the actual work done do not line up. Line 56 of This Public Leaderboard.

Steps to Reproduce

  1. Register two accounts with the same username on the AoC website.
  2. Submit with the first username only.
  3. Join one leaderboard, and set it in the environment variables.
  4. Call the `aoc lead...
regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
#
[python-discord/forms-backend] New branch created: ks123/forms\-routes
#
  • Migrated PyMongo to asynchronous Motor.
  • Made small fixes in models:
    • Removed circular import of Question
    • Use cls instead of self (Pydantic stuff)
    • Fix form features validation (plain __members__.values() don't work).
  • For listing views, move data to model before returning to:
    • catch broken data
    • return id instead _id
  • Locked all forms listing endpoint only to admins.
  • Created endpoint for creating new forms (/forms/new, POST).
  • Closes #6.
regal archBOT
#

Description

make a music bot that can play music from any website and any video

Reasoning

it would be a great addition to python discord server because i know many people that like to listen to msuic while coding

Proposed Implementation

i give code

Additional Details

Would you like to implement this yourself?

  • [ ] I'd like to implement this feature myself
  • [ ] Anyone can implement this feature
#

Hello @Dragon-Batch,

Thank you for your interest in contributing to one of our open source projects. Unfortunately, we don't want to add the proposed feature to one of our bots or have such a feature available in our community.

One of the reasons is that most music bots violate both copyright laws as well as the terms of service of the websites/service they use as the source for the music they play. Another reason is that we don't want to have such bots in our voice channels: Our voice ...

regal archBOT
#

Description

Currently, the way we check if an error is handled locally in the cog/command is different in both the bots.
@Sir-lancebot checks if the command has the attribute on_error whereas @Python checks if the error has the attribute handled

Proposed Implementation

Use @Python bot's way of checking if the error is handled locally, i.e, to check if the error has the attribute handled.

This is being done to keep the bots on the same page.

Would you like to i...

regal archBOT
#

When an user invokes a command in a channel seasonal bot doesn't have whitelisted, the bot will dump a list of all the channels the commands is allowed in as a part of the response; with the global whitelist most of those channels are not visible to regular users. The error embed gets deleted after a bit but is still quite large and pushes out the conversations in the channel

When constructing the channels string the bot can get the channels from its cache and check whether the user can se...

regal archBOT
regal archBOT
#

Description & Reasoning

Some of the advent of code commands can be rather "spammy" and clog up the primary channel when there's good discussion going on. This PR aims to limit some of the advent of code commands to #aoc-commands and only allow the shorter ones that are more likely to foster discussion in the primary channel.

Screenshots

Image of what happens if a user tries to use the .aoc stats command in the primary channel, followed by subscribe.
![image](https://user-im...

regal archBOT
#
[python-discord/bot] branch deleted: fix/tagp/graceful\-stasd\-connect
oak estuaryBOT
regal archBOT
regal archBOT
regal archBOT
#

A commonly asked question I see is something where someone has to add a directory to the Path environment variable, and I think it would be nice to add some command that shows some links or tutorials on how to add something to Path for Windows and Unix-Based operating systems. This way, it will be faster and easier to direct someone to the correct resources and help them out, rather than trying to talk them through it.

regal archBOT
regal archBOT
regal archBOT
#

That would be a handy resource, however, I think that there is a higher chance of things going wrong when you aren't guiding the person through it step by step. Messing up the PATH, and not knowing how the user got there would it make it difficult to correct, and can have a large impact on how they use their system.

In my opinion: when possible, try to get people to use the Add to PATH option from the installer, and if really necessary, then guide them through it yourself.

north knotBOT
#

Postgres backup completed!

regal archBOT
#

I only reason I could think of settings the value to false is when you want the local error handler and the global error handler to handle the error:

if isinstance(error, BadArgument):
    # Maybe user just wants to log some data in the local error handler
    error.handled = False  # default error handling by global error handler.

The only way it is kinda helping is readability by convaying the message that both the error handlers should be hit.
These situation are kinda...

regal archBOT
#

As you can see here, for some reason I am getting a flake8 error:

./bot/exts/halloween/spooknamerate.py:75:73: F821 undefined name 'EMOJIS_VAl'
./bot/exts/halloween/spooknamerate.py:82:44: F821 undefined name 'EMOJIS_VAl'
./bot/exts/halloween/spooknamerate.py:150:22: F821 undefined name 'EMOJIS_VAl'
./bot/exts/halloween/spooknamerate.py:161:34: F821 undefined name 'EMOJIS_VAl'
./bot/exts/halloween/spooknamerate.py:219:38: F821 undefined name 'EMOJIS_VAl'