GitHub Actions run 3078597716 succeeded.
#dev-log
1 messages ยท Page 3 of 1
GitHub Actions run 3078621793 succeeded.
2ee5d24 fix: subcommands inherit their parent's whitelist - onerandomusername
fb5f3f7 minor: remove print debugging statement - onerandomusername
065624e Apply suggestions from code review - onerandomusername
d8fe28e Split comment over lines evenly - wookie184
6199fd9 Remove unnecessary hasattr check - wookie184
GitHub Actions run 3078624822 succeeded.
[python-discord/site] New review comment on pull request #770: Add a collection of keywords per rule
You're correct, thank you !
GitHub Actions run 3078663579 failed.
In the giphy api docs The url key on the original object isn't documented.
I am not sure if this is a documentation mistake on giphy's part, or if we're using an undocumented key that's likely to cause issues again in future.
To avoid all doubt, it might be better if we use data["data"]["images"]["downsized"]["url"], as that's documented and also has the benefit of guaranteeing that the image is <2MB.
This doesn't raise an error, so if this block was hit, code execution would continue and try to access result further down.
To aid with this, you could raise a bot.utils.exceptions.APIError with this message, and the bot's error handler will handle the sending of the error for you.
See the wikipedia cog for how this is used if needed.
Also, we should move this error handling into get_movies_data function, as this removes both code duplication and the need to pass around the sta...
async def get_movies_data(
self,
client: ClientSession,
genre_id: str,
page: int
) -> tuple[list[dict[str, Any]], int]:
To follow the style guide
This whitespace is what's making CI sad
Does this need to be across multiple lines?
Does this need to be across multiple lines?
If you're running black to do your formatting, you may want to change your line-length configuration to 120, which this project uses.
I also highly recommend installing pre-commit hooks using poetry run precommit to catch linting issues before commiting.
Hey, I forgot about this PR. Sorry it took me so long to take notice again. Just have some small suggestions.
This code is very similar to is_on_cooldown. Thoughts on refactoring this into a search function that returns the item?
This name is misleading because it implies this contains all arguments when it's actually only the unhashable ones.
If you make the default an empty list, then the if statement below will not be needed.
You forgot this.
for rule_number in sorted(final_rule_numbers):
How would this look? setdefault could be used in both paths to make them the same there, but then set_cooldown also needs the list of cooldowns (which is half of the code) to set its own item if it's new
You're right. I glanced over the last line that does an append. I suppose it wouldn't really work out nicely.
I'm out of my depth with the sphinx changes you've made, so I'll defer reviews of that to someone more experienced.
I can give this a go, if nobody minds.
This function returns None on failure and success.
return
b6c2054 Return None instead of False in try_get_tag - wookie184
GitHub Actions run 3080848056 succeeded.
thank you, thank you. This important change greatly reduces code size, causing code to be up to 100% of previous speed!
ab22385 Change f-string to normal string - wookie184
Yeah that would be nice
8c46657 Incident archive improvements - TizzySaurus
1e0c0cf Fix tests - TizzySaurus
b7e0361 Address Reviews - TizzySaurus
40ab60f Allow referencing message as argument to !remi... - TizzySaurus [0be3332](https://github.com/python-discord/bot/commit/0be3332904690730589113b99198f2f3fc2f1091) Added DurationOrExpiry` type union - ionite34
GitHub Actions run 3082060101 succeeded.
GitHub Actions run 3082121970 succeeded.
Marking this as an enhancement as the current behaviour is intended, as there can be multiple possible anagrams. Two improvements would be:
- React with a green tick on messages that correctly guess an anagram.
- Finish early if all possible anagrams have been guessed.
Are you still interested in doing this?
Hey Can I work on it?
Are you still interested in working on this? Did you get anywhere with identifying the cause of the error?
hello can i fix this issue? that is if it has not already been fixed yet
If you're still interested in fixing this feel free to open a PR
GitHub Actions run 3082237926 succeeded.
I've started having a look into whether this would be an improvement. So far it's seeming pretty good IMO. Some things I've looked into:
Custom converters
Custom converters don't represent the actual type passed to the function
async def my_command(self, ctx: Context, argument: URLConverter) -> None:
reveal_type(argument) # URLConverter. uh oh
We can fix these using typing.Annotated
async def my_command(self, ctx: Context, argument: Annotated[str, ...
GitHub Actions run 3083764903 succeeded.
Is there a reason this name is duplicated?
GitHub Actions run 3085052149 succeeded.
Am I correct that Annotated in this case isn't actually "type safe"? As in, I can just do Annotated[int, URLConverter]
Or is that going to be mostly solved with defining type aliases for Annotated in one place?
This PR: Add support to fetch rules via keywords allows us now to invoke particular rules based on keywords that map to that rule.
The problem is that there is currently no way to discover what these keywords are other than looking at the source code to look for these keywords.
So I think having a new comm...
Am I correct that
Annotatedin this case isn't actually "type safe"? As in, I can just doAnnotated[int, URLConverter]
Or is that going to be mostly solved with defining type aliases forAnnotatedin one place?
Yeah.
I just realised we currently use the hacky solution of redefining the converters as the types they convert to under a TYPE_CHECKING condition. Pyright doesn't seem to like that (keeps using the original class type), not sure about mypy.
Define a constant instead and share that with the test. This avoids duplication.
When there are multiple test cases, use the subTest context manager to isolate the asserts.
Sounds logical. Change made.
I don't feel like this feature is necessary. If it were to be added, the simplest way would be to have the same behaviour as the normal rules command, but with the added keywords in the embed. Maximise code re-use.
Sorry for the back-and-forth and not being clearer about this. The constant should be defined in information.py. The bot/constants.py file is meant for global constants i.e. constants shared by many modules. Tests don't really fit the criteria of "shared by many modules".
Is there any accepted workaround for when annotations are used for something other than annotating types (such as for us with converters)? Or do type checkers work on the assumption that annotations always correspond to types?
I have successfully tested running the image on my system, and I observe builds in CI are indeed passing. There should be discussion on whether Poetry's virtual environment should be cached. However, thanks to the forethought and ingenuity of the brilliant engineers at Python Discord DevOps, the caching is centralised at HassanAbouelela/actions, and we can have the discussion there.
I would like to extend my gratitude to @ChrisLovering and his ...
[python-discord/site] branch deleted: poetry\-1\.2
GitHub Actions run 3086905039 succeeded.
Connected!
GitHub Actions run 3087369628 succeeded.
Is there any accepted workaround for when annotations are used for something other than annotating types (such as for us with converters)? Or do type checkers work on the assumption that annotations always correspond to types?
That's what typing.Annotated is for.
There is also the typing.no_type_check decorator, but that would ignore all annotations on the function. (in practice, it seems mypy ignores the whole function, contrary to the typing docs? Pyright also doesn't seem to suppo...
GitHub Actions run 3088264460 succeeded.
I just remembered, we don't usually put mentions in embeds as they often don't resolve (just show the ID in the mention rather than the name), so I'm not sure about this change.
Looks good to me. Once sphinx-autodoc-typehints makes a release with your change we can get this updated and merged!
6fd9bae Display mention & str of the mentionable object... - TizzySaurus
Fixed, as per my comment on Discord :+1:
GitHub Actions run 3093692661 succeeded.
Is this still necessary? I think the issue was fixed in 2b2dc95
Without actually testing anything, it does indeed look like this issue has been fixed (which would mean this can be closed).
c082323 add collection of keywords per rule - Amrou Bellalouna
a75ba77 add docstrings explaining the values that the R... - Amrou Bellalouna
672ba65 add suggested keywords - Amrou Bellalouna
f07f03a make docstring more explicit about the returned... - Amrou Bellalouna
c5fe65c Merge branch 'main' into map-rules-to-keywords - Amrou Bellalouna
GitHub Actions run 3094479923 succeeded.
79ee2b0 fix "isistance" typo - Amrou Bellalouna
ddd829f add support for keywords when using the "rules"... - Amrou Bellalouna
357ed80 send the list of pre-defined keywords along wit... - Amrou Bellalouna
f924dd2 send the "no-match" error message in pure text ... - Amrou Bellalouna
c1ce683 accept keywords and rule numbers in any order - Amrou Bellalouna
Connected!
GitHub Actions run 3094504397 succeeded.
Is this outdated ? Because when I run the command, I see no reference to no channel

Since we have a Who are we section in the landing page, why not have a Join us one as well ?
That's pretty straightforward IMO, if someone likes who we are, then they'd want to join us for sure ( because we're the hottest python community, of course ), so I think it makes sense to have it as a "follow-up" link.
This section would then where people can find and join us pretty easily.
@MarkKoz How do you think people should discover keywords then ?
And I don't know if you remember, but in bot pr that adds the support for keywords, the first implementation did include the keywords in each rule invocation, but we said that it'd add too much clutter so it got removed.
8c46657 Incident archive improvements - TizzySaurus
1e0c0cf Fix tests - TizzySaurus
b7e0361 Address Reviews - TizzySaurus
40ab60f Allow referencing message as argument to !remi... - TizzySaurus [0be3332](https://github.com/python-discord/bot/commit/0be3332904690730589113b99198f2f3fc2f1091) Added DurationOrExpiry` type union - ionite34
[python-discord/bot] branch deleted: bot\-2231\-enhancements
a6ae842 Add ability to delete multiple reminders - TizzySaurus
f7bff3d Display mentions instead of name attribute in ... - TizzySaurus [1a9e4c0](https://github.com/python-discord/bot/commit/1a9e4c0c2a840635475ee0481b0d59528eeb9982) Merge branch 'main' into bot-2231-enhancements - TizzySaurus [11f3693](https://github.com/python-discord/bot/commit/11f369307cf4423458c7ce60aeda7637f35bef8e) Address Review - TizzySaurus [2930799`](https://github.com/python-discord/bot/commit/2930799460d8bc65c242b2f06426453304b6ed82) Merge remote-tracking branch 'origin/bot-2231-e... - TizzySaurus
GitHub Actions run 3100918056 succeeded.
Connected!
GitHub Actions run 3100951960 succeeded.
Since it's a bit more robust to have the check in the same place that the role is applied I think we could do this anyway.
I'll take this over and finish it off.
This has been inactive for a while so I'll put it up for grabs.
[sir-lancebot] Branch bot\-core\-migration was force-pushed to `3578e97`
Rebased onto main. Only commit added was https://github.com/python-discord/sir-lancebot/commit/aaa96359448a39a5bbb9a0fd403f23b59b5df860 which doesn't conflict with any of these changes.
GitHub Actions run 3101411232 succeeded.
Nit: I think all these sentences should begin with a capital letter
Nit: The best way to install Docker*
Some very small nit changes.
Other than that, great work !
GitHub Actions run 3104504456 succeeded.
Alright. But I think as you suggested, I'll have to see the wikipedia cog to move forward.
(I'll try to do this in a couple of weeks as I have my exams from next week)
No problem, real life come first as always!
Take your time and let us know if #dev-contrib if you need help!
Thanks for this suggestion, but I consider them kind of continuations of the sentence started in the header, not the standalone sentences. Not sure if this is proper, but I am going to leave it as it is for now, except I am going to bring "how to" to the header because it is in every item.
Yeah, you are right, thanks for this correction!
Sorry for this mess, for some reason github only allows to request only one review now.
The comments I left are mostly nit changes.
Nice work !
Nit: I believe resumation is not an English word, resumption should be the one you're looking for.
Nit: Install the latest version of discord.py
It's a small nuance, but i think "of" is more suitable
Nit: You've been capitalizing "Slash Commands" from the start, so I think it's better to stay consistent. ( There are a couple of them, so a small CTRL + F will let you know which ones to change)
[python-discord/quackstack] New branch created: allow\-request\-bodies
This is mostly needed so that we do not have request bodies being used in GET requests, as this isn't supported in many HTTP client libraries (such as HTTPX).
This PR also bumps deps to latest, uses Pytohn 3.10 and updates the Dockerfile to use our new base image.
4f7c937 Update quackstack integration - ChrisLovering
[python-discord/sir-lancebot] New branch created: update\-quackstack\-integration
Description
With https://github.com/python-discord/quackstack/pull/74 the location for the generated duck as been moved to the Location header, as a full URL.
This should be merged at the same time, or shortly after the above PR.
Did you:
- [ ] Join the Python Discord Community?
- [ ] Read all the comments in this template?
- [ ] Ensure there is an issue open, or link relevant discord discussions?
- [ ] Read and agree to the [contrib...
5ad7d4b Update import order for isort configuration - ChrisLovering
GitHub Actions run 3115464611 succeeded.
[sir-lancebot] Branch update\-quackstack\-integration was force-pushed to `f3e140c`
GitHub Actions run 3115490996 succeeded.
[sir-lancebot] Branch update\-quackstack\-integration was force-pushed to `9e561ae`
GitHub Actions run 3115570971 succeeded.
9461db3 Hard rewrite check_rerun_job util to remove a... - TizzySaurus
3efbae7 Add metricity to docker-compose so web doesn't ... - ChrisLovering
0f12f00 Update poetry to use 1.2.0 - ChrisLovering
ed2639b Don't mount project root in docker-compose - ChrisLovering
ce894c0 Use BOT_TOKEN in example project - ChrisLovering
6436908 Use Poetry Base In Docker Image - HassanAbouelela
GitHub Actions run 3115674529 succeeded.
This was a big PR. Some would say it was too big. Others are simply wrong.
[python-discord/sir-lancebot] branch deleted: bot\-core\-migration
[sir-lancebot] Branch update\-quackstack\-integration was force-pushed to `0f47b5a`
GitHub Actions run 3115895789 succeeded.
Connected!
GitHub Actions run 3115893733 succeeded.
GitHub Actions run 3115910899 succeeded.
GitHub Actions run 3115916284 succeeded.
Looks good, and thanks for the fix
[python-discord/quackstack] branch deleted: allow\-request\-bodies
[python-discord/sir-lancebot] branch deleted: update\-quackstack\-integration
Connected!
GitHub Actions run 3116095294 succeeded.
Quite a common (https://github.com/python-discord/bot/search?q=create_task) code pattern is to create a task with scheduling.create_task and not assign the returned task to anything.
The documentation for create_task (used under the hood by scheduling) warns against this:
**...
GitHub Actions run 3119432201 succeeded.
Connected!
Connected!
GitHub Actions run 3119459688 succeeded.
[python-discord/bot-core] New branch created: add\-message\-utils
0b0e5d2 Migrate all message utils from bot and sir-lanc... - TizzySaurus
As the title says, with approval from @ChrisLovering in dev-contrib.
This migration does contain a few changes, as per the following:
Constants
Since some of bot's message utils used constants, which don't exist on botcore, these had to be changed as follows:
NEGATIVE_REPLIES- defined as a constant at top of file- [
Emojis.trashcan](https://github.com/python-discord/bot/blob/main/config-de...
[python-discord/sir-lancebot] New comment on issue #1079: Port GitHub code display embed from Python
NB: This is now waiting on python-discord/bot-core#141, as lancebot is missing certain util functions.
Updating this to stalled since it's waiting on python-discord/bot-core#137.
I donโt think we should implement constants this way. How would someone test bot features which rely on these constants? To be clear, this is not your fault, nor something that can be fixed in this PR, as it requires serious work on how we approach constants in bot-core in general. Work that we have so far failed to do.
When bot-core was first starting, this topic came up, and I fought to try and get what I think is the best compromise implemented, however I met great resistance. Iโll star...
I agree that hardcoding these constants is the least preferable way to handle it. I still don't like the suggestion though.
If we pass constants to functions, we'd still have to change them in whichever project uses them
Yes, once. In this PR there is only one usage for these constants, and they could be easily passed as a bypass_roles argument or any other name you want.
I'd prefer bot-core to stay a generic library for bots. If we start tying it to specific projects I can onl...
It is only one PR in some scenarios, but from my experience trying to migrate some of the utils, you'll still end up in a scenario having to change both. One example from here would be modifying the moderator role ID, and modifying the list of roles considered "mod roles" (like we did when we split the mod role in two).
In the provided example, you can work around that by passing the set of IDs directly, and despite being a cumbersome and repetitive API, will work. This is not true for all t...
I like Hassan's suggestion here.
My understanding on roughly how it could work:
- The project using bot-core defines the constants needed (e.g. with a pydantic config class). These would be based on it's own constants
- This constants object is passed to the botcore Bot class on initialisation somehow.
- The botcore Bot object sets these as global variables on a constants.py in bot-core (would need to be careful in exactly how this is done).
- These constants can now be imported an...
@HassanAbouelela
It is only one PR in some scenarios, but from my experience trying to migrate some of the utils, you'll still end up in a scenario having to change both. One example from here would be modifying the moderator role ID, and modifying the list of roles considered "mod roles" (like we did when we split the mod role in two).
I said in the previous comment I agree hardocoding is not a good solution, so I'm not sure what this is aimed at.
In the provided example, you can...
0129205 Add initial guide for errors with Python on Win... - wookie184
[python-discord/site] New branch created: add\-windows\-guide
This is an incomplete draft.
Not sure whether this would be better split up into different pages.
GitHub Actions run 3122790282 succeeded.
GitHub Actions run 3123431332 succeeded.
GitHub Actions run 3123584076 succeeded.
Discussed in [discord](#dev-contrib message) with @mbaruh.
I'll reproduce the issue, and when I understand that, I'll drop the proposition here and we can discuss it.
GitHub Actions run 3123781129 succeeded.
@bast0006 Can you please provide the examples you've tried ?
Because I'm not sure I understand correctly here since you said
and thus a message with mobile.twitter.com in it is falsely detected as a rich embed for the watchlist.
When I use this link https://twitter.com/Nadallica86/status/1574145915048398854 or https://mobile.twitter.com/nedbat/status/1504062673809338370, _has_rich_embed works just fine.
But as soon as I use twitter's Lite version (with the 'mobile' prefix),...
GitHub Actions run 3123894793 succeeded.
I don't think discoverability is too important because the primary way to use the command is
with rule numbers, which are already discoverable. The keyword support is there for those that happen to remember them or pick them up from seeing other users invoking the command. Furthermore, the keywords are intuitive enough that one is likely to correctly guess a keyword.
Having that info in a new command would not help discoverability much โ it seems unlikely someone would figure out that co...
GitHub Actions run 3126833578 succeeded.
Connected!
GitHub Actions run 3128775492 succeeded.
Good stuff.
And we also gotta remember to update the config file for the staff test server (I don't mind doing it).
if allow_type is "Allow list", why would we autoban based on it? This question is probably not even related to the PR, it's just that I feel like I'm missing something :sweat_smile: .
This docstring is technically inaccurate since it can send the report in any channel (you probably pasted this over from another method).
Also. we should probably add a check to ensure that the command cannot be run in public channels.
Okay, I see your point.
Then I don't quite get the whole point of adding the feature in the first place if the rules are always discoverable and displayed in !help rules.
Can you explain more what you mean by
However, I don't think it currently supports dynamically generated descriptions.
GitHub Actions run 3131060283 succeeded.
Then I don't quite get the whole point of adding the feature in the first place if the rules are always discoverable and displayed in !help rules.
Numbers are more difficult to remember than keywords. For example, I remember there is an "ad" keyword just from my quick testing session, but I still have no idea what the rule number for that is off the top of my head.
Can you explain more what you mean by
The help command displays what's in a command's docstring. If the keywords wer...
https://mobile.twitter.com/nedbat/status/1504062673809338370 is rendered as the following:
== Raw embeds (1/1) ==
{'author': {'icon_url': 'https://pbs.twimg.com/profile_images/1559004270170628096/AaSLxb_F_400x400.jpg',
'name': 'Ned Batchelder (@nedbat)',
'proxy_icon_url': 'https://images-ext-1.discordapp.net/external/KcDnbosWojYPkPQ4Ummp1Ad-f2wJ8Ukq3PXnU7IK-ZU/https/pbs.twimg.com/profile_images/1559004270170628096/AaSLxb_F_400x400.jpg',
...
There are three twitter embed cases here.
The first is https://twitter.com/nedbat/status/1504062673809338370, which embeds as type: rich with a 'url' of https://twitter.com/nedbat/status/1504062673809338370, which works as expected.
The second is https://m.twitter.com/nedbat/status/1504062673809338370, which embeds as type: link and thus is ignored appropriately.
The third is https://mobile.twitter.com/nedbat/status/1504062673809338370, which does embed as type: rich, but...
Thanks for the explanation, I turned out that I understood something else before, but I do see what you meant now.
I was thinking maybe we can eliminate the subdomain and only keep the 2nd level domain & TLD along with the same path & query parameters of course for comparison, but I'm wondering what could the edge cases be here.
The path would be the same and the domain as well (eventually), what's making me wonder if whether query parameters can be altered upon rendering that URL. ( on...
GitHub Actions run 3134700041 succeeded.
Connected!
GitHub Actions run 3137019542 succeeded.
Looks like a remnant of the move to discord.py 2.0.
I'm not sure awaiting it works. iirc raising an error will cause it to unload. Worth checking.
@mbaruh do you mean the fact that it isn't awaited will throw and thus would still unload the cog?
I noticed it upon unloading a cog actually, and I thought it was ugly to have that exception in our logs.
BTW, couldn't this have been avoided if we used something like mypy? Why don't we actually have that in our project?
Sentry Issue: BOT-38K
Summary
Discord must have recently added a new feature which rejects channel names if they contain certain words they don't like. This is a problem for our automated renaming of off-topic channels, which has some names with words that are no longer allowed. The first event of the Sentry issue above was caused by the name "ot0-welcome-and-fuck-you", for example.
#...
If option 3 isn't possible, option 1.b is a good compromise (get notified so that we can either change or delete the ot name).
closes #1379
The current implementation allows to collect the URLs from the sent messages and then apply a transformation on them.
The transformation here is basically a removal of the subdomain (if it exists) because of the way Discord renders some URLs (Twitter's in particular)
@bast0006, @scragly The floor is yours.
GitHub Actions run 3141703917 succeeded.
You've created a variable final_urls and are adding urls to it, but then the check is still if ... embed.url not in urls, so does this even do anything?
Also, we have the tldextract lib installed in the project, which is better at separating subddomains from urls than urllib and then assuming the first 2 parts are the subdomain (which isn't always the case)/.
Shoot. The first implementation wasn't in a set and I was adding them in the original list, but I wanted to remove dups.
My bad, I'll fix that.
As for the tldextract one, i'll have a look at it right away
GitHub Actions run 3142080916 succeeded.
GitHub Actions run 3142615808 succeeded.
GitHub Actions run 3143604790 succeeded.
Connected!
GitHub Actions run 3143684920 succeeded.
GitHub Actions run 3144946865 succeeded.
I would think just going through and curating the list we have now and just clean them up. Probably not a great look for us to have fuck as one of our channel names anyway. Then I guess from there just have a regular filter on new additions.
A low tech solution makes more sense to me for something like this.
@MrHemlock We don't know which words are disallowed. Thus, we cannot prevent new invalid names from being added.
Fair. Just feels like more maintenance to have to have to add and potentially remove in future. Out of the three, 1 sounds the better solution given the current circumstances.
I do also think we should go through and curate the list again anyway. Couldn't hurt.
Just feels like more maintenance to have to have to add and potentially remove in future.
Being concerned about complexity is valid. With that in mind, we could do one of the following (assuming we go with solution 1):
- Only retry. Don't delete invalid names and don't notify about invalid names.
- Just catch the error and do nothing. Downside: one of the channel names won't change.
In both cases, there is the additional downside of not knowing that some names are never being us...
Something like a message in Mod alerts or Dev alerts would probably be sufficient for 2. Handle that case (delete, modify, etc.) and either trigger the try again or just let it sit until the next go.
It is with absolute honor that I accept ducky_sphere into the fold of great duckies.
[python-discord/branding] branch deleted: ducky\-sphere
GitHub Actions run 3146825082 succeeded.
That's the whole suggestion though, storing the common constants in bot-core.
Isn't this the whole purpose of bot-core (to remove duplicate code between the bots)?
I personally would be for a constants.py file on bot-core, that has all the constants that are required on both bot and lancebot. Other constants can stay within their respective repo (as they already are).
Yes, this means 2 PRs when moving constants to bot-core (1 on bot-core and one on the repo it used to be on for mig...
Wasn't able to test the role assignments on real users, but seem to work fine in manual testing.
c082323 add collection of keywords per rule - Amrou Bellalouna
b8f6416 Fix Poetry 1.2 Support - HassanAbouelela
a75ba77 add docstrings explaining the values that the R... - Amrou Bellalouna
672ba65 add suggested keywords - Amrou Bellalouna
f07f03a make docstring more explicit about the returned... - Amrou Bellalouna
cb40bab Fix Django Deprecation Warnings - HassanAbouelela
4998984 Fix Unittest Deprecation Warnings - HassanAbouelela
a2beb05 Enable Python Warnings In Tests - HassanAbouelela
7432612 Ignore Whitenoise's Static Directory Warning - HassanAbouelela
42b9f8d Merge branch 'main' into fix-warnings - HassanAbouelela
[python-discord/site] branch deleted: fix\-warnings
GitHub Actions run 3159600634 succeeded.
GitHub Actions run 3159612077 succeeded.
GitHub Actions run 3159626912 succeeded.
I've gone ahead and cleaned history, merged the main branch, and updated all dependencies again (including both dependencies which were waiting on fixes upstream).
This also means @jchristgit review should count since I snapped your changes out of existence ๐, or you can review again if you like
I've noticed that flake is failing locally when run through pre-commit (something we wouldn't see in CI), so I'm working on finding a fix for that now
GitHub Actions run 3159693609 failed.
GitHub Actions run 3159831627 succeeded.
I've narrowed down the test slowness to the redirects tests, specifically on resource redirects which take 15 seconds per redirect in the django render function (only if running through the django test runner).
Downgrading sentry from 1.9.9 to 1.9.8 fixes the issue. Based on their issue tracker, 1.9.9 is broken big time.
802d85c Downgrade sentry-sdk To 1.9.8 - HassanAbouelela
GitHub Actions run 3160690061 succeeded.
GitHub Actions run 3160800882 succeeded.
[python-discord/site] branch deleted: bump\-dependencies
As mentioned in #769, sentry 1.9.9 seems to be broken and should not be merged
You could do this in one go without sorting with tuples.
It's not a mistake or anything but I think now - inserted_at > min_time is easier to read. Ignore if you want.
A few comments, looks great otherwise.
I wonder how good this is, since there's a potential starvation here for nominees with only one nomination. What I would do is take both parameters and give each of them a weight to create a total score. It would then review the nominee with the highest score.
Just off the top of my head, we could do something like:
number_of_nominations / number_for_currently_most_nominated + age / age_of_currently_oldest
This could be weighted for example to give the number of nominations more impo...
I'm struggling to picture how such a weighting would act in practice.
If the talentpool is constantly growing, then so will the age of the oldest nomination in it. If the weighting of the next user picked is dependant on the age and number of nomination, then I don't know how you'd avoid the number of nominations required to be picked would also constantly growing.
I'd sort of accepted the starvation as a trade of between having a system that whilst isn't perfect, at least isn't broken....
I picked that off the top of my head thinking something like "3 for people to vote on, and 1 waiting to be actioned", and wanted to avoid slower reviews holding others up, but i'm happy to change it to 3. Can always increase depending on how it works out.
Yeah just worried the earliest review will get buried or that the team will get saturated with reviews. Thinking about it I would maybe add a cooldown time after resolving a vote too (whether there's helpering or not), so that we don't get pinged right after resolving a vote.
If the talentpool is constantly growing, then so will the age of the oldest nomination in it. If the weighting of the next user picked is dependant on the age and number of nomination, then I don't know how you'd avoid the number of nominations required to be picked would also constantly growing
That's why I normalized the age by the age of the oldest vote. The contribution is capped at 1, and the older the oldest vote, the less of an effect its aging will have on the score.
Meaning, ...
And, if a nomination is so old it still dominates the score, then maybe it's time we took a look at it?
ff25bd0 Fix patching removed override - mbaruh
37bab91 Fix channel_scope checking IDs and names separa... - mbaruh
fb1af00 Stress that a filter was triggered in DM - mbaruh
fbe3a2e Bring back enabled categories, remove redundant... - mbaruh
39d3a77 Add a warning if an added filter has content id... - mbaruh
The bottom line is, instead of using the age as a tie breaker, you can use it as a regularization parameter, and strike a balance between popularity and age.
One more thing to consider if we're going to allow automatically starting votes again: We could query metricity to check when is the last message sent by the user. If it's too old the vote won't fare well.
GitHub Actions run 3166383038 succeeded.
GitHub Actions run 3166411110 succeeded.
GitHub Actions run 3166411864 succeeded.
Sentry Issue: SIR-LANCEBOT-8M
TypeError: Client.wait_for() got some positional-only arguments passed as keyword arguments: 'event'
File "discord/ext/commands/core.py", line 190, in wrapped
ret = await coro(*args, **kwargs)
File "bot/exts/fun/hangman.py", line 112, in hangman
message = await self.bot.wait_for(
Unhandled command error: Client.wait_for() got some positional-only arg...
Sentry Issue: SIR-LANCEBOT-8Q
TypeError: object of type 'NoneType' has no len()
File "discord/ext/commands/core.py", line 190, in wrapped
ret = await coro(*args, **kwargs)
File "bot/exts/events/hacktoberfest/hacktober-issue-finder.py", line 49, in hacktoberissues
embed = self.format_embed(issue)
File "bot/exts/events/hacktoberfest/hacktober-issue-finder.py", line 108, in format_...
Sentry Issue: SIR-LANCEBOT-8P
AttributeError: 'Select' object has no attribute 'data'
File "discord/ui/view.py", line 425, in _scheduled_task
await item.callback(interaction)
File "bot/exts/utilities/epoch.py", line 124, in select_format
selected = interaction.data["values"][0]
Ignoring exception in view "" for item "<Select placeholder='Select the format of your timestamp' min_v...
Sentry Issue: SIR-LANCEBOT-8K
HTTPException: 400 Bad Request (error code: 50035): Invalid Form Body
In embeds: Embed size exceeds maximum size of 6000
(1 additional frame(s) were not displayed)
...
File "bot/exts/utilities/wolfram.py", line 288, in wolfram_short_command
await send_embed(ctx, message, color)
File "bot/exts/utilities/wolfram.py", line 54, in send_embed
await ctx.sen...
Fixed Many Spelling and Grammar mistakes
GitHub Actions run 3168619167 succeeded.
Does this have a corresponding issue and/or approval?
Also, a fair amount of these changes seem incorrect. E.g. "a permission" was in fact correct, as was "staff" since it doesn't have a plural.
8deea42 Fix position-only arg. - TizzySaurus
[python-discord/sir-lancebot] New branch created: fix\-issue\-1106
[python-discord/sir-lancebot] Pull request opened: #1110 Fix position\-only arg in hangman command\.
Relevant Issues
<!-- Link the issue by typing: "Closes #" (Closes #0 to close issue 0 for example). -->
Closes #1106.
Description
As the title says. Client.wait_for is now a positional-only arg, so adjusted as such to fix the game (tested and it does now work).

Did you:
- [x] Join the Python Discord Community?
-...
Also, a fair amount of these changes seem incorrect. E.g. "a permission" was in fact correct, as was "staff" since it doesn't have a plural.
Should I revert it back? I don't think there are a lot of incorrect changes
GitHub Actions run 3168709351 succeeded.
This appears to be a duplicate of #907, which was fixed in #908. When exactly was this traceback created?
Hello @Rohith0009, thanks for your PR!
Unfortunately, we do not accept pull requests not accompanied by issues, as outlined in our contribution guides. We also do not usually accept grammar fix PRs like this since they create a lot of conflicts propagated throughout our entire project, with usually minimal benefit.
If you'd like to have a go at one of our other issues, check out the issues tab for issues without the Planning or WIP ta...
This appears to be due to the change dpy made during 2.0 development where the Interaction and Select argument swapped positions. All 3 uses of this decorator need to be updated.
f2de807 Fix order of function parameters on @discord.ui... - TizzySaurus
[python-discord/sir-lancebot] New branch created: fix\-GH\-1108
Relevant Issues
<!-- Link the issue by typing: "Closes #" (Closes #0 to close issue 0 for example). -->
Closes #1108.
Description
During development of dpy 2.0, the order of the interaction and select swapped, but this wasn't updated in the codebase. This PR fixes that in the 3 use-cases of the @discord.ui.select decorator.
Did you:
- [x] Join the Python Discord Community?
- [x] Read all the comments in this template?
- [...
GitHub Actions run 3168810823 succeeded.
One more thing to consider if we're going to allow automatically starting votes again: We could query metricity to check when the last message sent by the user is. If it's too old the vote won't fare well.
Yeah, that was part of the original specification in the issue. I still plan on adding that at some point, but I wanted to try and limit the scope for this PR so didn't do it here.
Alright, I'm still not convinced that it's really necessary, but i'll try something.
It's a new(ly found?) problem. The issue is that the body is null in the JSON, rather than not existing at all.
Example that caused the error: https://api.github.com/repos/Ank221199/WorkoutGenerator/issues/14
It's a new(ly found?) problem. The issue is that the
bodyisnullin the JSON, rather than not existing at all.Example that caused the error: https://api.github.com/repos/Ank221199/WorkoutGenerator/issues/14
I see. So dict.get("body") or "" should work?
[python-discord/sir-lancebot] branch deleted: fix\-issue\-1106
a617f5c Fix position-only arg in hangman.py - TizzySaurus
c27763e Fix position-only arg in madlibs.py - TizzySaurus
4a13e3a Merge pull request #1110 from python-discord/fi... - wookie184
Connected!
GitHub Actions run 3168935560 succeeded.
Is Button still meant to come before Interaction?
5f5523f Correct logic in format_embed. - TizzySaurus
[python-discord/sir-lancebot] New branch created: fix\-issue\-1107
Relevant Issues
<!-- Link the issue by typing: "Closes #" (Closes #0 to close issue 0 for example). -->
Closes #1107.
Description
As described in the issue, the value of the body key returned by the API can be a literal null value, meaning dict.get("body", "") won't substitute as the key does exist. Instead, we now use dict.get("body") or "".
Did you:
- [x] Join the Python Discord Community?
- [x] Read all the comments...
GitHub Actions run 3168969152 succeeded.
Good catch. This needs to be swapped, alongside the other uses of @discord.ui.button.
3943d27 Fix order of function parameters on @discord.ui... - TizzySaurus
GitHub Actions run 3169005313 succeeded.
GitHub Actions run 3169025598 succeeded.
a617f5c Fix position-only arg in hangman.py - TizzySaurus
c27763e Fix position-only arg in madlibs.py - TizzySaurus
4a13e3a Merge pull request #1110 from python-discord/fi... - wookie184
0b240f2 Merge branch 'main' into fix-GH-1108 - wookie184
[python-discord/sir-lancebot] branch deleted: fix\-GH\-1108
f2de807 Fix order of function parameters on @discord.ui... - TizzySaurus
3943d27 Fix order of function parameters on @discord.ui... - TizzySaurus
f72b949 Remove extra space. - TizzySaurus
0b240f2 Merge branch 'main' into fix-GH-1108 - wookie184
143bea4 Merge pull request #1111 from python-discord/fi... - wookie184
GitHub Actions run 3169031706 succeeded.
Connected!
GitHub Actions run 3169038408 succeeded.
GitHub Actions run 3169253171 succeeded.
Connected!
GitHub Actions run 3169257519 succeeded.
Updated the docstring in f2d05d5 (#2267). There is a cog wide check which ensures commands are only ran in mod channel (which is why we can't modify filters elsewhere)
Hah, technically autobans can be added to allow lists, which in itself seems wrong.
Rebased onto main (hence the forcepush)
GitHub Actions run 3169465894 succeeded.
The check only prevents non-mods from running the command as far as I can see, it doesn't impose any channel restriction.
2142d82 Make autoban report silently fail if output wil... - ChrisLovering
GitHub Actions run 3169786165 succeeded.
Approving as my only comment won't affect us atm, so I'll leave it to you to decide whether to action it before merging.
If this list is empty, imo the embed should contain something like "No patrons in this tier" as opposed to being something like this:

True.
But you know what, we can leave this part as it is so that we can identify if an autoban is added to an allow-list.
It might be better to add a check to not allow autoban to be added to an allow-list in the first place but after a quick glance I don't think the bot will autoban based on allow list.
It is possible that a mod might accidentally add a filter to the allow list instead of blacklist and the report will help identify such cases (assuming we miss the original plain message...
[python-discord/bot] branch deleted: move\-filter\-alerts
4697076 Send filter alerts to #filter-log instead of #m... - ChrisLovering
fe86fb9 Namespace discord import in filter_lists - ChrisLovering
4f56106 Report on all autoban filters added in the last... - ChrisLovering
f2d05d5 Send weekly_autoban_report to ctx channel when ... - ChrisLovering
2142d82 Make autoban report silently fail if output wil... - ChrisLovering
Connected!
GitHub Actions run 3172685880 succeeded.
GitHub Actions run 3173269627 succeeded.
closes #2281
We currently have some instances of the bot.remove_cog async function that is not awaited.
This PR updates all those calls to be awaited
GitHub Actions run 3175527516 succeeded.
GitHub Actions run 3177537390 succeeded.
GitHub Actions run 3179539043 succeeded.
This file adds a tag with an explanation on sequence slicing.
GitHub Actions run 3184258896 succeeded.
Hello, thanks for writing this up! Is there an issue for this tag?
I wrote this because after I helped a person in a help channel, I thought that it would be useful to write a slice syntax tag, even if there is no such issue about it in python-discord/meta.
The conversation:

The message where I mentioned the slice syntax (link):
#help-lemon message
Alright, for now you can keep this PR open, but please open an issue on the meta repository detailing what it is you think should be added and why. Linking to this PR is a good idea to explain the what.
i can fix this, assign me to it if this is still relevant
GitHub Actions run 3187470177 succeeded.
i can fix this, assign me to it if this is still relevant
Hi, I've assigned you ๐
GitHub Actions run 3191431407 succeeded.
Connected!
GitHub Actions run 3191434163 succeeded.
Connected!
GitHub Actions run 3191460340 succeeded.
GitHub Actions run 3191525595 succeeded.
Connected!
GitHub Actions run 3191573813 succeeded.
GitHub Actions run 3191679604 succeeded.
That makes sense, done ๐
I've also taken the liberty of adding the 3 patreon roles to the test server and updating the config.yml in notion.
Thanks, I definitely did not forget those were things that would need to be done :P
GitHub Actions run 3191709667 succeeded.
6ca77ac Add patreon role configuration - mathstrains21
a44e798 Create patreon.py and add setup - mathstrains21
526ce5f Merge branch 'python-discord:main' into patreon - mathstrains21
380dd5c Add patron message when someone gains a patron ... - mathstrains21
b38ec72 Merge branch 'patreon' of https://github.com/ma... - mathstrains21
Connected!
GitHub Actions run 3191758727 succeeded.
trimmed title in send_error_message. the title will be 256 characters at most now.
GitHub Actions run 3197543337 succeeded.
Perhaps there is a better way to format this instead of just completely cutting off anything after 256 characters. Does anyone have any ideas?
embed = Embed(colour=Colour.red(), title=str(error)[:256])
Do you mean this? Otherwise its going to cut off the first 256 characters and include whatever is after that
textwrap.shorten(error, width=100, placeholder="...")
GitHub Actions run 3198525810 succeeded.
GitHub Actions run 3199185194 succeeded.
Thanks @wookie184 for finishing this off for me!
Description
Proposing to add a spooky reaction with the bat emoji to any message that has bat in it.
Reasoning
It's October, and currently there are only 4 emojis that are the result of a few key words. Maybe it's time to add a little more?
Proposed Implementation
Add a new entry to the SPOOKY_TRIGGERS dictionary in bot/exts/holidays/halloween/spookyreact.py. Unicode for bat emoji is \U0001F987.
Would you like to implement this yourself?
- [x] I'd li...
GitHub Actions run 3202425845 succeeded.
This is required with the new modmail release. You may want to double-check check it is compatible with the version of the bot you are currently running, and if not wait to merge it.
2e2049b Switch To HassanAbouelela/setup-python Action - HassanAbouelela
[python-discord/modmail-plugins] New branch created: poetry\-1\.2
[python-discord/modmail-plugins] branch deleted: poetry\-1\.2
The current system already filters subdomains, might be a by-product of one of the PRs. Going to close this for now.
GitHub Actions run 3206349441 succeeded.
39b141e Add swoopy logo to standard rotation - gustavwilliam
[python-discord/branding] New branch created: swoopy\-logo
Adds the "swoopy logo" to the evergreen logo rotation. The logo has been in the branding repo for a long time, but wasn't available after a new branding manager was implemented.

GitHub Actions run 3206965832 succeeded.
GitHub Actions run 3207034002 succeeded.
GitHub Actions run 3207286391 succeeded.
Let's skip this is the token isn't set. To support that, you'd need to give the token a default sentinel value in constants such as None.
GitHub Actions run 3207336717 succeeded.
GitHub Actions run 3207396579 was cancelled.
It works well, and the implementation is really clean. This is nice. If you want to fix invalid indices before merging, feel free to.
68ec38d Return error if no devops rule match searched i... - ChrisLovering
[python-discord/king-arthur] branch deleted: devops\-rukes
GitHub Actions run 3207782726 succeeded.
[site] Branch snekbox\-311\-and\-metricity was force-pushed to `5377fc1`
GitHub Actions run 3207794823 succeeded.
GitHub Actions run 3207825544 succeeded.
This has been inactive for a while so I'll put it up for grabs.
What's left to do? Addressing your comment and fixing the merge conflict?
This has been inactive for a while so I'll put it up for grabs.
What's left to do? Addressing your comment and fixing the merge conflict?
Yeah, merge main, match the output embed to the existing one, and fix the bug
As far as I can tell the mfa code is no longer necessary as discord doesn't have mfa tokens like that now.
Seems like this no longer exists. Users with MFA have the same style tokens as any other.
There's also a bit of the matter that this regex is now out of date.
GitHub Actions run 3212996146 was cancelled.
GitHub Actions run 3212996458 was cancelled.
GitHub Actions run 3213002119 was cancelled.
GitHub Actions run 3213003326 was cancelled.
GitHub Actions run 3213008009 succeeded.
There's also a bit of the matter that this regex is now out of date. I don't know what the current token length is.
I can't recall any problems with false positives, even with the current regex, so we can afford to be very general with what we match. Could just check that the first and last parts are >= 10 and middle is >= 5 characters in length or something.
GitHub Actions run 3214849562 succeeded.
I agree with wookie, I think having extensive matching for the sake of even future-proofing is okay, considering additional checks are being performed
The only inaccurate part is the last section is too short as it is, but because of how the parsing works, that isn't an issue, i suppose
GitHub Actions run 3216982411 succeeded.
GitHub Actions run 3218459304 succeeded.
The only inaccurate part is the last section is too short as it is, but because of how the parsing works, that isn't an issue, i suppose
If that's the case I think we should just have no upper limit on the length of the last section. Otherwise the code is somewhat misleading in how it works.
GitHub Actions run 3221215011 succeeded.
[python-discord/bot] New branch created: bump\-bot\-core
From the release notes on d.py [here](#381965829857738772 message) and [here](#381965829857738772 message) none of the breaking changes for the commit we were on to 2.0.1 affect us.
Breaking change in the major version bump was to remove support multiprocessing, which we don't use.
https://pypi.org/project/pytest-cov/
Breaking changes in this major version bump don't affect us
Breaking change in the major version bump was to remove support for Python 3.6.
https://pypi.org/project/flake8-isort/5.0.0/
GitHub Actions run 3222132812 succeeded.
No, and I completely ignored the commit directly above, which I left ๐ .
Fixed in a forcepush.
GitHub Actions run 3222306985 succeeded.
I think this is a fun standalone project to implement if you're interested in the algorithm, but honestly I don't think it fits the bot. It's not informational or interactive, and I don't see people using it.
Relevant Issues
<!-- Link the issue by typing: "Closes #" (Closes #0 to close issue 0 for example). -->
Closes #1116
Description
Added new entry in SPOOKY_TRIGGERS. Use a bit more regex to match all the words specified in the issue.
Did you:
- [x] Join the Python Discord Community?
- [x] Read all the comments in this template?
- [x] Ensure there is an issue open, or link relevant discord discussions?
- [x] Read and agree t...
GitHub Actions run 3226381961 was cancelled.
GitHub Actions run 3226386847 succeeded.
Hey @ChrisLovering ๐๐ป. I've implemented this, please review whenever possible.
ok, thanks for reviewing it @mbaruh
This is required with the new modmail release. You may want to double-check check it is compatible with the version of the bot you are currently running, and if not wait to merge it.
This is just #26 but from a different branch.
Closed in favor of #26. My fault for making a PR from main.
GitHub Actions run 3229956535 succeeded.
Connected!
GitHub Actions run 3229989678 succeeded.
is there any chance eval output could be allowed in pygen? or at least stop the bot from deleting the message?
itโs really annoying trying to give examples or test something when the bot is deleting the message and/or you have to go to another channel to see the output
if spam is your worry it shouldnโt be all that hard to have a cooldown and line limit right?
63e95eb Delete roles we won't use with self-hosted k8s - ChrisLovering
[python-discord/infra] New branch created: remove\-unused\-roles
This deletes the following:
- auditbeat
- certbot
- elasticsearch
- filebeat
- jumpcloud
- kibana (+kibana-nginx)
- nginx (+nginx-cloudflare-mtls, nginx-geoip, nginx-ufw)
- packetbeat
- wireguard
4499cc0 Add bat spooky reaction (#1118) - thatbirdguythatuknownot
GitHub Actions run 3237340202 succeeded.
@Diabolical5777 What's your status on this PR?
Thanks!
Connected!
GitHub Actions run 3237359962 succeeded.
GitHub Actions run 3237364364 succeeded.
GitHub Actions run 3237412757 succeeded.
GitHub Actions run 3237358475 succeeded.
GitHub Actions run 3237387109 succeeded.
@Shom770 Greetings. What's your status on this PR?
Thanks!
Joe has concluded his research and after a lengthy research paper was published
and after even receiving a $250,000 grant from Leon "Lemon" Sandรธy himself, his
research concluded that whilst driving a Ferrari is truly enjoyable, the
correct way to solve this matter of allocating IP addresses is to self-host the
most complicated cluster scheduling software known to man, Kubernetes. We are
excited to announce that as a result to this research, the general public had
the ability to for onc...
I am thrilled to announce that we have solved the issue of having to configure
a container engine on our hosts ourselves by deciding to configure a container
cluster management orchestration solution instead.
cea130f REPO_TOKEN env var obliterated - Xithrius
[python-discord/bot] New branch created: repo\-token\-remove
b1f0aa4 REPO_TOKEN env var obliterated - Xithrius
[python-discord/site] New branch created: repo\-token\-remove
[python-discord/quackstack] New branch created: repo\-token\-remove
[python-discord/patsy] New branch created: repo\-token\-remove
GitHub Actions run 3238247779 succeeded.
Solves part of https://github.com/python-discord/kubernetes/issues/140, since the repository is now public.
๐
Solves part of https://github.com/python-discord/kubernetes/issues/140, since the repository is now public.
Solves part of https://github.com/python-discord/kubernetes/issues/140, since the repository is now public.
GitHub Actions run 3238278945 failed.
GitHub Actions run 3238278802 succeeded.
GitHub Actions run 3238279274 succeeded.
GitHub Actions run 3238278758 succeeded.
[python-discord/quackstack] branch deleted: repo\-token\-remove
[python-discord/sir-robin] branch deleted: repo\-token\-remove
[python-discord/sir-lancebot] branch deleted: repo\-token\-remove
[python-discord/site] branch deleted: repo\-token\-remove
[python-discord/bot] branch deleted: repo\-token\-remove
GitHub Actions run 3242221740 succeeded.
Connected!
GitHub Actions run 3242233050 succeeded.
Connected!
GitHub Actions run 3242252660 succeeded.
Connected!
GitHub Actions run 3242259902 succeeded.
GitHub Actions run 3242330969 failed.
96beee5 Bump Python version and deps - ChrisLovering
[python-discord/patsy] branch deleted: repo\-token\-remove
GitHub Actions run 3242613694 succeeded.
[python-discord/branding] New branch created: lemoji/partying
Adds :lemoji_partying:.

GitHub Actions run 3243115765 succeeded.
GitHub Actions run 3245522862 was cancelled.
GitHub Actions run 3245561129 succeeded.
GitHub Actions run 3245596264 succeeded.
PR Author
Workflow Run
Source Branch
update-patsy-ports
Solves part of https://github.com/python-discord/kubernetes/issues/140, since the repository is now public.
@ChrisLovering since I can't request your review I'm pinging you directly instead.
GitHub Actions run 3245698324 succeeded.
GitHub Actions run 3248554152 succeeded.
GitHub Actions run 3249849093 succeeded.
GitHub Actions run 3249866654 was cancelled.
GitHub Actions run 3249872159 succeeded.
GitHub Actions run 3249891382 succeeded.
Hey @onerandomusername, thanks for your work so far. We needed to get this merged so went ahead and implemented the comments. Sorry the MFA part didn't end up being used ๐
Just a couple things, could you also make the message match the other token message a bit closer, particularly:
- having the user as a clickable mention and the ID in a codeblock afterwards
- having the channel as a clickable mention
- putting the censored token in a codeblock
- adding the pfp of the user that send the message as a thumbnail
cdb9183 enhancement(filters): use a stricter bot token ... - onerandomusername
Connected!
GitHub Actions run 3250006672 succeeded.
way too lenient, this makes impossible tokens match.
Way too lenient is not defined by what it can match, but what it will match in practice, which so far has not been an issue. This PR made the regex a little more flexible in terms of false-positives, without increasing the possibility of false-negatives or creating something that has to be modified in the future.
Connected!
GitHub Actions run 3257562489 succeeded.
Sentry Issue: SIR-LANCEBOT-8S
AttributeError: 'async_generator' object has no attribute 'flatten'
File "discord/client.py", line 409, in _run_event
await coro(*args, **kwargs)
File "bot/utils/decorators.py", line 81, in guarded_listener
return await listener(*args, **kwargs)
File "bot/exts/holidays/halloween/candy_collection.py", line 93, in on_reaction_add
await self.hackto...
Sentry Issue: SIR-LANCEBOT-8R
TypeError: object of type 'NoneType' has no len()
File "discord/ext/commands/core.py", line 190, in wrapped
ret = await coro(*args, **kwargs)
File "bot/exts/holidays/halloween/scarymovie.py", line 23, in random_movie
selection = await self.select_movie()
File "bot/exts/holidays/halloween/scarymovie.py", line 50, in select_movie
selection_id = ra...
Do we just want to change selection_id = random.choice(data.get("results")).get("id") to selection_id = random.choice(data.get("results", [])).get("id") here?
It seems there no validation afterwards to see whether selection_id is None before doing a GET request to the api, so I suppose this should be added too.
I believe await self.hacktober_channel.history(limit=10).flatten() should instead be (await self.hacktober_channel.history(limit=10)).flatten(). Can I please be assigned to this?
I believe .flatten() was removed in 2.0, the way to do this now would be
[message async for message in self.hacktober_channel.history(limit=10)]
Sentry Issue: SIR-LANCEBOT-8T
AttributeError: 'NoneType' object has no attribute 'id'
File "discord/client.py", line 409, in _run_event
await coro(*args, **kwargs)
File "bot/exts/core/help.py", line 191, in on_reaction_add
if reaction.message.id != self.message.id:
Ignoring exception in on_reaction_add
Description
blurple is not a recognized color for the color command
Steps to Reproduce
Run .color name blurple
Expected Behaviour
A color embed showing the color blurple (hex code #5865F2)

Actual Behaviour

Possible Solutio...
0567cf9 Created new branch and script for Real Python s... - brad90four
11de6a3 Updated script to include ERR_EMBED - brad90four
617a64b Updated import statements for "from discord.ext... - brad90four
ea02a5f Updated line 30 to include "commands.cooldowns"... - brad90four
e528332 Updated JSON headers for "results" and "url" - brad90four
[python-discord/sir-lancebot] New branch created: blurple\_color\_fix
Relevant Issues
<!-- Link the issue by typing: "Closes #" (Closes #0 to close issue 0 for example). -->
Closes #1123
Description
Added an entry for blurple.
Did you:
- [X] Join the Python Discord Community?
- [X] Read all the comments in this template?
- [X] Ensure there is an issue open, or link relevant discord discussions?
- [X] Read and agree to the [contributing guidelines](https://pythondiscord.com/pages/contributing...
Irrelevant files included in PR
GitHub Actions run 3260336085 succeeded.
21eeb70 Added blurple color - brad90four
[python-discord/sir-lancebot] New branch created: brad90four\-patch\-1
Relevant Issues
<!-- Link the issue by typing: "Closes #" (Closes #0 to close issue 0 for example). -->
Closes #1123
Description
Added an entry for blurple.
Did you:
- [X] Join the Python Discord Community?
- [X] Read all the comments in this template?
- [X] Ensure there is an issue open, or link relevant discord discussions?
- [X] Read and agree to the [contributing guidelines](https://pythondiscord.com/pages/contributing/...
[python-discord/sir-lancebot] branch deleted: blurple\_color\_fix
GitHub Actions run 3260347070 succeeded.
Hey! Would you mind working on @vivekashok1221's review? I think we can get it merged once that's done ๐
GitHub Actions run 3260819296 succeeded.
[python-discord/site] New comment on pull request #738: Add a basic guide for Hikari in the Guides\.
Hello, thank you so much for the PR. Unfortunately, we don't have much experience in Hikari to be able to provide any meaningful feedback on the PR. As such, I think I'll be closing this. However, thanks for the PR though!
Hi! What's your status on the PR? If you could fix up the linting issues and look over @shtlrs review, I think we'll be ready to merge!
As per my message on Discord (sending here for posterity sake), would be nice to also add og_blurple (#7289DA) as that's what the pydis branding uses.
GitHub Actions run 3261419145 succeeded.
I have already implemented what they requested, they just haven't reviewed it yet.
Sentry Issue: BOT-398
TypeError: unsupported operand type(s) for +: 'SequenceProxy' and 'SequenceProxy'
File "discord/ext/commands/core.py", line 190, in wrapped
ret = await coro(*args, **kwargs)
File "bot/exts/moderation/clean.py", line 514, in clean_users
await self._clean_messages(ctx, users=users, channels=channels, first_limit=message_or_time)
File "bot/exts/moderation/clea...
[python-discord/bot] New branch created: fix\-sequency\-proxy\-breaking\-change
This type is usd for a few attributes, including Guild.threads and guild.Channels. This type does not implement any of the add dunder methods, so we use itertools.chain to get a single iterator for both sequences.
Fixes BOT-398 Fixees #2292
GitHub Actions run 3265720669 succeeded.
GitHub Actions run 3268611994 succeeded.
43ea3c3 Remove calls to the deprecated .flatten() method - TizzySaurus
[python-discord/sir-lancebot] New branch created: fix\-issue\-1120
Relevant Issues
<!-- Link the issue by typing: "Closes #" (Closes #0 to close issue 0 for example). -->
Closes #1120.
Description
Replaces .flatten() calls with an async for loop (the easterquiz ones had to be expanded due to a constraint with having an async comprehension within a non-async comprehension).
Did you:
- [x] Join the Python Discord Community?
- [x] Read all the comments in this template?
- [x] Ensure there is ...
GitHub Actions run 3268997633 succeeded.
Connected!
GitHub Actions run 3269797040 succeeded.
[python-discord/bot] Issue opened: #2294 Zen command not using integer line when followed by words\.
Proposed fix
Parse string for potential integer before using word search.
The other option here it to make the sig something like async def zen(self, ctx: Context, search_index: int | None, *, search_string: str | None) which I think would have a similar affect and wouldn't require parsing inside the command handler.
The current egghead_quiz logic seems a bit dodgy, it's not obvious that the logic considers users making multiple votes, or adding extra reactions that aren't votes. Anyway, that's out of scope for here.
I wonder if using reaction.count could make some of the cases here cleaner.
Shouldn't need the map any more, just get the id in the comprehension.
I don't think these changes should be here?
Putting a break here like on the last one would make the behaviour more obvious.
6bbb12e Added Blurple and ` OG Blurple colours (#1125) - brad90four
[python-discord/sir-lancebot] branch deleted: brad90four\-patch\-1
Connected!
GitHub Actions run 3273496233 succeeded.
I assume it's self.message that is None, as reaction.message should never be None. It seems like this is a race condition, a reaction is added (probably to a different message) before self.message is set.
I believe this should be fixed by moving the listener adding to after update_message is called: https://github.com/python-discord/sir-lancebot/blob/f9cc77f55a7bac9cff1f5674b36b3f17560f6bfe/bot/exts/core/help.py#L220-L228
Do we just want to change
selection_id = random.choice(data.get("results")).get("id")toselection_id = random.choice(data.get("results", [])).get("id")here?
random.choice will error on an empty sequence, so we should handle it being None/an empty array before trying to do that.
Issues are for feature requests/bugs/questions relating to our bot. Please don't open an issue with no description
b7a468d add remove_subdomain_from_url in bot util helpers - Amrou Bellalouna
6a0da9a transform urls matched in messages - Amrou Bellalouna
ce16838 collect all urls in a set to avoid duplicates - Amrou Bellalouna
caa2698 check for the url existence in the final_urls set - Amrou Bellalouna
0bf93eb use tldextract for a correct url decomposition - Amrou Bellalouna
GitHub Actions run 3275281554 succeeded.
Connected!
GitHub Actions run 3275319024 succeeded.
It's not critical in practice, because of the speed of evaluation and the difference between nomination dates, but now should be constant across the nominations for correct behavior.
I'm not really sure on this one. I don't see any immediate downsides if someone were to try to eval someone else's code. The result would be ephemeral, and no damage is done.
What do you mean by "the result would be ephemeral"? Anyone can see the output right?
6ca77ac Add patreon role configuration - mathstrains21
a44e798 Create patreon.py and add setup - mathstrains21
526ce5f Merge branch 'python-discord:main' into patreon - mathstrains21
380dd5c Add patron message when someone gains a patron ... - mathstrains21
b38ec72 Merge branch 'patreon' of https://github.com/ma... - mathstrains21
[python-discord/bot] branch deleted: fix\-silence\-and\-tags\-when\-unloaded
GitHub Actions run 3275500558 succeeded.
Connected!
GitHub Actions run 3275542257 succeeded.
d8fd77b Resolve a serious grammatical problem in a comment - lemonsaurus
[python-discord/bot] New branch created: lemon/resolve\-serious\-grammatical\-problem
This has been a controversial comment, to be sure, but I have found the solution. Here is a compromise I know deep in my heart that we can all agree on.

GitHub Actions run 3275684464 succeeded.
Yeah, we're Python programmers, we already have enough whitespace!!
That's very true @wookie184 thank you for that comment
This is a good change.
As part of my effort to review this pull request, I'm also signing Presidential Bill ยง142.4 into effect, making "fuckaroundery" a word of the English language.
[python-discord/bot] branch deleted: lemon/resolve\-serious\-grammatical\-problem
Connected!
GitHub Actions run 3275833506 succeeded.
GitHub Actions run 3276953788 succeeded.
1295dd8 Delete roles we won't use with self-hosted k8s - ChrisLovering
[python-discord/infra] branch deleted: remove\-unused\-roles
@MarkKoz
I personally don't know if it's possible to dynamically generate doc strings, but a quick search will help me find out.
So if it's indeed possible, should we try going in that direction ?
I see that @minalike is working on a fix for this, maybe assign the issue then to let people know that it's being worked on ?
I see that @minalike is working on a fix for this, maybe assign the issue then to let people know that it's being worked on ?
Where do you see that?
[python-discord/bot] branch deleted: parallel\-fetch\-user\-bb
[python-discord/bot] branch deleted: single\-quotes
[python-discord/bot] branch deleted: see\-what\-black\-would\-change
[python-discord/bot] branch deleted: ChrisLovering\-patch\-2

Doesn't that mean that there's a dev branch for this bug ?
Also, looking at the name, I thought it made sense, unless there's something I'm missing
Interesting, I don't see that.

@minalike could you self assign if you're working on this
This looks good, but I think we should be using four-space indents here, shouldn't we?
6ca77ac Add patreon role configuration - mathstrains21
a44e798 Create patreon.py and add setup - mathstrains21
526ce5f Merge branch 'python-discord:main' into patreon - mathstrains21
380dd5c Add patron message when someone gains a patron ... - mathstrains21
b38ec72 Merge branch 'patreon' of https://github.com/ma... - mathstrains21
GitHub Actions run 3280801839 succeeded.
8fe3e9d Calculate 'now' once to ensure it is constant f... - wookie184
whoops, didn't mean to commit those constants changes ๐
GitHub Actions run 3280915929 succeeded.
GitHub Actions run 3280936136 succeeded.
1d6d21d Implement new autoreview system. - wookie184
5047667 Remove now unused scheduler from talentpool - wookie184
4e59178 Make handling of reviews over multiple messages... - wookie184
eaecf34 Dont await tasks.loop methods - wookie184
52757d2 Fix message detection and remove unused parameter - wookie184
[python-discord/bot] branch deleted: update\-autoreview\-system
Connected!
GitHub Actions run 3280987147 succeeded.
# Embed titles have a length limits, so we trim here.
having a number out of context in a comment isn't very useful.
I know it links to the issue you are fixing, but in 2 months when someone looks at this code, they won't.
Linking the comment to the issue doesn't really add anything, since we already explain why we need to do this.
a title of 256 characters is far too long. I know discord allows it to be this long, but that doesn't mean it would be a good title.
embed = Embed(
colour=Colour.red(),
title=textwrap.shorten(error, width=150, placeholder="โฆ"),
)
Doing something like this, where we limit to 150 characters, and also append an ellipses would be better IMO.
This suggestion will also require an import textwrap at the top of the file.
Dude! I totally missed out on this PR. This was a very nice birthday gift, and of course, it's an excellent emoji as always. I need this in my life.
Thank you @gustavwilliam. ๐ฅ ๐ถ ๐ฅ
[python-discord/branding] branch deleted: lemoji/partying
GitHub Actions run 3281061830 succeeded.
also, this emoji could have had a disasterous name, but you have tactically dodged this bullet, for which I applaud you. Nuff said.
Hm? No I am not working on this issue.
Alright cool, your creation of this branch made it seem like you were https://github.com/python-discord/bot/tree/zen-args-fix
@ChrisLovering I can take this if you'll assign it to me
People tend to just send in help channels or similar such messages
Hey, can you help me? My code doesn't work.
Although we may have a code snippet from them, which may not be the source of the issue, there is a lot of valuable information that is lost. Useful information would contain things like
- What is the user's end goal?
- What is the current behaviour of the code? Is it working until some point or not starting at all?
- What are some solutions the user has tried?
- What is th...
I personally don't know if it's possible to dynamically generate doc strings, but a quick search will help me find out.
I am not certain, but you can look into appending to the function's __doc__ attribute.
So if it's indeed possible, should we try going in that direction ?
I'm fine with it. Does anyone else have objections?
GitHub Actions run 3257549005 succeeded.
I don't think a break works here, since we do want to iterate over all the reactions in this case.
What I will do though, is make users a set, since we don't the same user showing up twice.
GitHub Actions run 3285190713 succeeded.
GitHub Actions run 3285225947 succeeded.
random.choicewill error on an empty sequence, so we should handle it beingNone/an empty array before trying to do that.
Right, that makes sense. What do we actually want to do in the event that.get("results")orselection_idends up beingNone?
In fact, reading through the code and [API documentation](https://developers.themoviedb...
I believe this should be fixed by moving the listener adding to after
update_pageis called.
Looking through the code I don't see an issue with moving the listeners to below the update_page, and update_page defines self.message if it's not already defined meaning it'd no longer be None.
TL;DR; I agree with your assessment.
If no one else picks this up in the next fews days then I will.
[python-discord/bot] Pull request opened: #2298 change the signature to include a "zen\_rule\_index"
closes #2294
The change here was as simple as applying the signature that @ChrisLovering has suggested, which is quite is similar to the way we search for rules.
@ChrisLovering Take it away !
Time complexity in this part seems like it can be better, currently iterates for 2N times for N total users reacted. For 2 reactions, each with 500 users, currently, we iterate a constant of 2000 times (for loop that builds list + list.count) on each new reaction.
Suggest this as an alternative:
In the same case of 1000 users, this would iterate a best case of 1 time and a worst case of 500 times.
@staticmethod
async def already_reacted(new_reaction: discord.Reaction, user: Union...
When using the timeit command with a setup block and clicking the "Run in 3.10/3.11" button, any variables previously defined in the are no longer present, typically producing NameErrors in the resulting job:
It appears that the PythonVersionSwitcherButton does not store the commandline arguments used in the initial execution which leaves out the setup code ...
GitHub Actions run 3286309313 succeeded.
GitHub Actions run 3286954185 succeeded.
Better to use the style mentioned in our style guide https://www.pythondiscord.com/pages/guides/pydis-guides/contributing/style-guide/#bracket-and-item-arrangement
async def zen(
self,
ctx: Context,
zen_rule_index: int | None,
*,
search_value: Union[int, str, None] = None
) -> None:
You are definitely right, my bad.
Applied the suggestion
GitHub Actions run 3287711484 succeeded.
random.choicewill error on an empty sequence, so we should handle it beingNone/an empty array before trying to do that.
Right, that makes sense.What do we actually want to do in the event that
.get("results")orselection_idends up beingNone?
I don't think there's any reason it should be None so probably send a message to the user saying no results were found and maybe log a warning so we can look into it.
In fact, reading through [the code](https://...
Changed my mind again, I think this can just be closed :)
self,
ctx: Context,
zen_rule_index: int | None,
*,
search_value: Union[int, str, None] = None
search_value: str | None = None
An int would never be used here, as it would be picked up with the index arg first. if the user provides two ints, then only the first will be used anyway.
If the status gets approved can I be assigned this issue?
There's still not really a conclusion on what should be changed for each part (apart from the second part).
GitHub Actions run 3287870246 succeeded.
e57c6aa change the signature to include a "zen_rule_index" - Amrou Bellalouna
05b636e update doc strings to reflect the usage of the ... - Amrou Bellalouna
c5aaccb apply style guidelines to signature - Amrou Bellalouna
5556a60 remove int from search_value's type union - Amrou Bellalouna
1e18187 Merge pull request #2298 from shtlrs/issue-2294... - wookie184
GitHub Actions run 3287946597 succeeded.
Connected!
@wookie184 For the first part I think these lines are concerned
- https://github.com/python-discord/sir-lancebot/blob/main/bot/exts/utilities/githubinfo.py#L350-L351
- https://github.com/python-discord/sir-lancebot/blob/main/bot/exts/utilities/githubinfo.py#L264
We could use either dd/mm/yyyy or mm/dd/yyyy for both.
Don't know about the third part, I think its better the way its now.
@wookie184 For the first part I think these lines are concerned
* https://github.com/python-discord/sir-lancebot/blob/main/bot/exts/utilities/githubinfo.py#L350-L351
* https://github.com/python-discord/sir-lancebot/blob/main/bot/exts/utilities/githubinfo.py#L264We could use either dd/mm/yyyy or mm/dd/yyyy for both.
I would be happy with using dd/mm/yyyy for both although others may prefer using timestamps not in the footer so it's localised (CC @minalike?), i'...
I'd be fine with that. I also think a static command displaying the aliases would be fine if that doesn't work, i.e. not displaying rule text or taking any arguments, just displaying all the keywords along with each rule number.
I was trying to run the source coded of the Python Bot , I have all the modules installed with correct versions , still it is raising error starting from bot-main\bot__main__.py", line 3, in import aiohttp
ending with
class CeilTimeout(async_timeout.timeout): TypeError: function() argument 'code' must be code, not str
This error was reported here https://github.com/aio-libs/aiohttp/issues/6794 Do any of the comments there help you resolve this issue?
I tried all of them , none helped !
also I reinstalled all the modules required for the execution with the supported versions .
`Traceback (most recent call last):
File "c:\Users\aayus\Downloads\bot-main\bot_main_.py", line 3, in <module>
import aiohttp
File "C:\Users\aayus\AppData\Local\Programs\Python\Python39\lib\site-packages\aiohttp_init_.py", line 6, in <module>
from .client import (
File "C:\Users\aayus\AppData\Local\Programs\Python\Python39\lib\site-packa...
Are you using the latest code from the repository? We've fairly recently moved the bot to be on Python 3.10, but it appears you're still using 3.9. If you used Poetry to install the dependencies, as is intended, then it would've warned you about that or even failed I think.
GitHub Actions run 3294905898 succeeded.
GitHub Actions run 3297456925 succeeded.
GitHub Actions run 3297814039 succeeded.
GitHub Actions run 3298367080 succeeded.
[python-discord/site] New comment on pull request #773: Add guide for working with Python on Windows
This still isn't quite finished, but it'd be good to get some reviews on the content. Please leave a comment if you think there's anything that should be added (you can take a look at the linked issues for ideas).
[python-discord/site] New comment on pull request #773: Add guide for working with Python on Windows
Thanks for this! A few immediate comments:
- Should we maybe have a subdirectory for all of this? an issue might encompass several of those articles, and they're relativeley scattered in the currently resulting list of guides..
- Is "Don't use the py installer" a stance we want to take? I'm not a fan of it myself, but maybe it would be wiser to have a general page about it, with a section about caveats to watch out for.
- In the PATH section, I think it's worth noting that if it contains...
[python-discord/site] New comment on pull request #773: Add guide for working with Python on Windows
* Should we maybe have a subdirectory for all of this? an issue might encompass several of those articles, and they're relatively scattered in the currently resulting list of guides..
Yeah, that would probably make sense
* Is "Don't use the py installer" a stance we want to take? I'm not a fan of it myself, but maybe it would be wiser to have a general page about it, with a section about caveats to watch out for.
WDYM by "py installer"?
* In the PATH section, I thi...
Currently if a vote is archived within a day of being sent, a new vote can be sent immediately, even though a day hasn't passed since that vote was archived.
We should fix this by using redis to cache the date of when the most recent nomination was sent. Then we'll check if it's been a day since this date, even if the nomination was archived.
We should check that a user has been active in the past 7 days before choosing them to review.
This will require an endpoint on site that queries metricity for a user's message count.
I don't think we need to worry about clearing out users that stop being active completely in this issue, it might be better to update the !tp list command to display activity information somehow so they can be cleared out every now and again.
[python-discord/site] New comment on pull request #773: Add guide for working with Python on Windows
WDYM by "py installer"?
Oh sorry I meant the microsoft store page.
maybe it should be moved to another point on that page or made more obvious?
Ah I missed that. yeah maybe it should be in the form of "this is what you need to make sure of to make it work"
This would allow queueing a user to be reviewed next rather than using the autoreviewer. A mod could run !tp q 493839819168808962 and that user would be reviewed when the reviewer is next ready, returning to the autoreviewer after the queue is empty.
We should also have a !tp queue clear command to clear the queue, and a !tp queue list command to show the current queue members.
[python-discord/site] New comment on pull request #773: Add guide for working with Python on Windows
WDYM by "py installer"?
Oh sorry I meant the microsoft store page.
Well, I don't think we should recommend that people use it (due to said caveats), so i'm not sure what else would be on such a page (maybe how to uninstall it lol).
maybe it should be moved to another point on that page or made more obvious?
Ah I missed that. yeah maybe it should be in the form of "this is what you need to make sure of to make it work"
๐
Something else that can be done automatically is unnominate anyone who hasn't been active in the past ~3 months (with a suitable message in chat).
@MarkKoz I think that changing that dynamically is going to be a PITA concerning how simple this should be.
The doc dunder attribute is not writable, which throws an AttributeError upon trying to modify/write to it.
So we could go with @wookie184's approach here, and we have a static command that fetches the rules & kws & maybe even cache them per rule number ?
No need to make the http request each & every time, WDYT?
I think that changing that dynamically is going to be a PITA concerning how simple this should be.
The doc dunder attribute is not writable, which throws an AttributeError upon trying to modify/write to it.
Seems pretty straight forward. I don't know why you'd get an error.
>>> def foo():
... """hello world"""
>>> foo.__doc__
'hello world'
>>> foo.__doc__ = "1"
>>> foo.__doc__
'1'
>>>
we have a static command that fetches the rules & kws & maybe even cache...
Thanks for writing this, the structure of this tag is good, although I think some of the information isn't necessary. It's best to keep tags short and snappy, otherwise people wont read them.
I've tried condensing the tag down a bit, could you take a look and see what you think and maybe merge both our versions togther?
Yes, I consider that feasible, but keep in mind that sentences must start with a capital letter. In line 6:
- *slicing* is a way of accessing a part of a...
Thoughts on what the best way to persist this queue would be?
By now, even I don't think they are necessary.
Woops, I just didn't notice that.
GitHub Actions run 3300479672 succeeded.
This issue is required for bot#2302
The endpoint should take a list of user IDs and a number of days (or just a timestamp?), and return the number of messages sent by each user from now up to the date/interval provided. This data is available through metricity.
The reason I suggest an endpoint taking multiple user IDs at once is that I assume it would be more efficient as a single query, as we may want to use this endpoint on all nominated users at once (e.g. to check for users in the tale...
Another thing I didn't notice.
It would be nice if we could add links to previous nomination threads to both !tp history and newly created nomination threads. As it stands, we have to search for the username in the discord thread history (and this isn't particularly great UX nor reliable).
Storing the thread ID for a nomination sounds like a good first step (and probably worth committing immediately even before other features are complete?), then searching through threads by username to attempt to rediscover old thread...
GitHub Actions run 3302882789 succeeded.
It seems I forgot about this issue, but it's now back on my radar and will hopefully have a PR ready over the next week or two.
I don't think there's any reason it should be
Noneso probably send a message to the user saying no results were found and maybe log a warning so we can look into it.
Yep, that sounds good.
If we used the results from the first request we'd be much more limited in the results we got.
Right, I see. For some reason I was thinking that the initial response would include all entries, which isn't actually the case as you stated (it seems to return 20).
Side note: we may ...
afb2ff6 Store time of last vote in redis to prevent vot... - wookie184
[python-discord/bot] New branch created: 2301\-fix\-voting\-conditions
Previously if a vote was sent and ended within a day a new one could be sent immediately.
Closes #2301
GitHub Actions run 3303287447 failed.
GitHub Actions run 3303335392 succeeded.
6bbb12e Added Blurple and OG Blurple colours (#1125) - brad90four [ab0f39a`](https://github.com/python-discord/sir-lancebot/commit/ab0f39ad7195996fcb0a15fb3914b7b35a056782) Merge branch 'main' into fix-issue-1120 - ChrisLovering
[python-discord/sir-lancebot] branch deleted: fix\-issue\-1120
1934b18 Remove calls to the deprecated .flatten() method - TizzySaurus
08bf905 Remove unnecessary map() - TizzySaurus
db35e5e Add break statement to loop to make its funct... - TizzySaurus
38d1589 Improve time complexity of already_reacted fu... - TizzySaurus
ab0f39a Merge branch 'main' into fix-issue-1120 - ChrisLovering
1934b18 Remove calls to the deprecated .flatten() method - TizzySaurus
08bf905 Remove unnecessary map() - TizzySaurus
db35e5e Add break statement to loop to make its funct... - TizzySaurus
38d1589 Improve time complexity of already_reacted fu... - TizzySaurus
ab0f39a Merge branch 'main' into fix-issue-1120 - ChrisLovering
GitHub Actions run 3303855903 succeeded.
Connected!
GitHub Actions run 3303868996 succeeded.
I'd like to:
- Remove the cache of nominations, as we refresh it almost every time before using it anyway so it's pretty useless. It's also a potential for bugs in places we forget to keep it updated.
- Convert the site response of nominations into dataclasses or pydantic models. This means we don't have to use dictionary accessing everywhere and makes my IDE happy because it knows the types. (I think pydantic would probably be easiest as it handles dictionary->model conversion automaticall...
[python-discord/bot] New branch created: 2306\-nominations\-cleanup
Closes #2306. Not completely tested yet but should be good enough for a review.
GitHub Actions run 3304429303 succeeded.
a39ce55 Move Security cog to backend extension - mbaruh
[python-discord/bot] New branch created: move\_security\_cog
That cog is out of place for the filters extension.
GitHub Actions run 3304472696 succeeded.
My bad, what I meant is, we have another callback that fetches & composes the rules, and then the help argument in the command decorator will take that callback.
And what I also meant is that this callback will cache the results so that we don't have to get them over & over again.
But it'll require an instance of the API client to do that, is there a global instance we could use ? (from bot core maybe ?)
What do you think ?
@bast0006 IF you could explain what nominations are & how they work in a Nutshell, I'll gladly take this on once we finish planning it up
@bast0006 IF you could explain what nominations are & how they work in a Nutshell, I'll gladly take this on once we finish planning it up
The talentpool is our system for getting new helpers (users with the "helper" role), and nominations are a part of this. The overview of how it works is:
- Any helper can run the
!nominatecommand (in a staff channel), to nominate someone they think could be a good helper - When a user is nominated they are put in a "pool" of users waiting to be ...
Thanks @wookie184, that's gives me a very good basic understanding of how it works!
Yes, I'll gladly wait on your PR then I'll tackle this if approved!
My bad, what I meant is, we have another callback that fetches & composes the rules, and then the help argument in the command decorator will take that callback.
Keep in mind discord.py expects a string value, not a function. It looks like @command(help=myfunc()) may work since this gets executed as the cog loads, and extensions are loaded after the Bot has already been created and has an APIClient.
But it'll require an instance of the API client to do that, is there a global inst...
0fbca07 Add ability to reply to a message instead of pa... - TizzySaurus
[python-discord/sir-lancebot] New branch created: randomcase\-reply\-enhancement
<!-- Link the issue by typing: "Closes #" (Closes #0 to close issue 0 for example). -->
Closes #1074.
Description
As per title.
Users can now reply to a message to its contents as the text argument, thanks to a call to botcore.utils.commands.clean_text_or_reply.


Add a bit of styling to it, and we should be ready, WDYT ?
7c4060e Replace utils.messages constants with args in r... - TizzySaurus
Since we aren't much closer to an actual conclusion with constants, I've gone with @mbaruh's suggestion of just making the constants arguments inside the respective functions: 7c4060e.
Further to this, before we can merge this, we should have a bot PR that implements this logic, so we can actually test the code.
I've only now seen this PR. I think my [original suggestion](#dev-contrib message) would simplify this quite a bit, where these args are replaced with an allowed_roles Sequence. Similar to how https://github.com/python-discord/bot-core/blob/main/botcore/utils/interactions.py#L28 works.
Same comment for reaction_check below.
allowed_users: Sequence[int],
For a consistent interface across botcore.
6f7702f Various improvements and fixes - wookie184
Closes #2280
The purpose of this PR is to add the available keywords per rule upon consulting the help docs of the rules command
