GitHub Actions run 2204375151 succeeded.
#dev-log
1 messages · Page 97 of 1
I think it's fine to refer to an article by its title
[python-discord/bot] branch deleted: bump\-bot\-core
It's mentioned in the sentence above
GitHub Actions run 2204431604 succeeded.
Connected!
GitHub Actions run 2204441559 succeeded.
I'm trying to think about the right place to put this. I don't want them to get to the PR step and then say "btw you should've been committing to a feature branch".
I'm thinking about maybe adding a step before the PR one that includes creating a feature branch, making local commits, and pushing them to their fork.
What you say makes sense, but in practice from the way people use these guides I think mentioning the same thing in different places helps. Even if we don't explain how to use git all over again, saying that the repo should be cloned as the first step (with a link to ./contributing) makes sense to me here. It also makes sense in terms of continuity since later in the page it says "You now have both the bot's code and a server to run it on". A person going over this guide might think "wait, wh...
Looks good to me! Though before this gets merged, you could implement some of Volccy's feedback.
Which ones? I thought I implemented them all
I assumed since some of them weren't marked as resolved yet that they weren't completed, a mistake on my end haha
We've had staff who assumed they should fork the repo too, I think it's ok to tell them that even if they're a minority. An internal doc is fine, but I these guides are where they're going to look at when they start contributing just like everyone else.
Not a big deal to me, feel free to resolve if you like the way it looks.
I don't think we call ourselves pydis anywhere in an official capacity
4a3e50d Bump version in pyproject and changelog last fe... - ChrisLovering
[python-discord/bot-core] New branch created: fix\-version\-number
5e5777a Add support for BIG SOLIDUS unicode characters ... - minalike
[python-discord/site] New branch created: BIG\-SOLIDUS\-MAKETH
50117a9 Add support for BIG SOLIDUS unicode charactesr ... - minalike
[python-discord/bot] New branch created: BIG\-SOLIDUS\-MAKETH2
We must add additional support for these unicode characters in off-topic names.
GitHub Actions run 2204575276 failed.
f1ff14c Remove aio-pika and psutil - ChrisLovering
bd13ed6 Bump all deps and exact version pin. - ChrisLovering
4dab419 Bump d.py and bot-core - ChrisLovering
43b6fee Use bot-core scheduling and member util functions - ChrisLovering
4635c31 Don't use discord.NoMoreItems as it's removed - ChrisLovering
GitHub Actions run 2204661266 succeeded.
Connected!
GitHub Actions run 2204682336 succeeded.
[python-discord/bot-core] branch deleted: fix\-version\-number
[python-discord/bot-core] New tag created: v6\.3\.1
[python-discord/bot] New branch created: mbaruh/ext\_fix
This is necessary after cog loading was made async in a new discord.py version
GitHub Actions run 2204857872 succeeded.
GitHub Actions run 2204893784 succeeded.
Looks good 👌 Very important change, thanks
[python-discord/bot] branch deleted: BIG\-SOLIDUS\-MAKETH2
2b2dc95 Make modpings rescheduling robust to unfilled c... - mbaruh
[python-discord/bot] New branch created: mbaruh/modpings\-cache
Moderators might not get their pingable role back if the discord.py cache is missing members during rescheduling. This PR makes the rescheduling resolve every entry in the redis cache.
Additionally, this adds a check which will remove entries in the redis cache of former moderators.
GitHub Actions run 2205007179 succeeded.
256d0e4 Add support for BIG SOLIDUS unicode characters ... - minalike
[python-discord/bot] New branch created: BIG\-SOLIDUS
This PR will allow us to add these unicode characters to off-topic names:
-
⧸ Big Solidus
-
⧹ Big Reverse Solidus
The PR for the site should be merged first: python-discord/site#717
GitHub Actions run 2205085005 succeeded.
Use
fail_if_not_exists = False, rather than catching a NotFoundIs that an option on ctx.reply? It's not documented here or on the Message object
https://discordpy.readthedocs.io/en/master/ext/commands/api.html#discord.ext.commands.Context.reply
I explained more in depth here. #dev-contrib message
thank you for this incredibly important PR!
[python-discord/site] branch deleted: BIG\-SOLIDUS\-MAKETH
GitHub Actions run 2205220179 succeeded.
ALLOWED CHARACTERS should have the regular forward/backward slashes, no? Unless I'm going mad, what you have now are the SOLIDUSses
Oh, right. I made the functionality actually use the unicode characters and tested using them as well. Be back in a minute
Tested this time with actual regular slashes and pushed changes
<img width="403" alt="image" src="https://user-images.githubusercontent.com/75038675/164579612-f65396c3-8dd0-4a4d-82f8-ed51446432fb.png">
GitHub Actions run 2205270483 succeeded.
[python-discord/bot] branch deleted: BIG\-SOLIDUS
c2d1538 Add support for BIG SOLIDUS unicode characters ... - minalike
Connected!
GitHub Actions run 2205468740 succeeded.
It’s currently not possible to use the eval command when you write some code that includes quote marks. A small but beneficial enhancement would be to automatically convert these special quote types to ones the bot will parse so iOS users can use the eval commands for quick use.
Logo Preview 👇

Banner Preview 👇

For Issue #149
GitHub Actions run 2207956082 failed.
I use iOS and the quote marks I get are " and '
Do you get something different?
I use iOS and the quote marks I get are " and '
Do you get something different?
“ and ‘ for me. Idk whether they are the same or not.
See [here](#bot-commands message)
For anyone else, you can turn off smart punctuation in the settings > general > keyboard
Ty Mina for the suggestion.
I'm not sure exactly what message you're referring to there. The general form for !mute, !ban, etc is
Applied <action> to <user> until <end timestamp> (<time remaining>)
e.g

This issue still applies though. A fix for this would be to use the total duration instead of the time remaining (given they should be the same when creating an infraction).
Even if it's technically inaccurate, I would much prefer that the bot displays the rounded duration (i.e., the duration that the moderator used in the infraction itself).
The OP may possibly be referring to the message from the bot as well.
122bd7a Invert Deleted Message Log Order - HassanAbouelela
[python-discord/site] New branch created: order\-log\-messages
Inverts the order messages are displayed in on the logs page to match the order they would be displayed in on discord (and how they would be read).
GitHub Actions run 2209813443 succeeded.
GitHub Actions run 2209867395 succeeded.
GitHub Actions run 2210067394 succeeded.
Like this, split into multiple lines capped at ~120 characters:
- Heroku has minimal system dependency control. If any of your Python requirements need C bindings (such as PyNaCl
binding to libsodium, or lxml binding to libxml), they are unlikely to function properly, if at all, in a native
environment. As such, you often need to resort to adding third-party buildpacks to facilitate otherwise normal
CPython extension functionality. (This is the reason why voice doesn'...
As per [this message in the discord](#dev-contrib message) I will be taking over this PR.
I think we can reverse the sentence: "You'll need to create a copy under your own account by forking the repository with the Fork button" (or something similar). This way, the reader can understand the meaning of forking a repository before reading "forking".
I am marking this unresolved because there is still for "How do I start contributing?".
I think that would be good, there would be a good place to remind the user about the commit message guidelines as well!
We can just call it "the main repository"
Why not use discord provided timestamps with the end time?
We already use them for <end timestamp>, so you mean for <time remaining> as well?
I feel that's less useful. In the beginning it will say "in 1 day" and then as time goes by it will say "in X hours" and then as more time goes on it will say "X [units] ago."
I like the duration being just normal static text, I just wish it reflected the actual duration written in the infraction by the moderator (or the bot), rather than a calculation of how much time is remaining (I assume that's what i...
Revised Logo Preview👇

Revised Banner Preview 👇

Connected!
Connected!
Connected!
To give some context, the duration in parentheses is calculated after the infraction is added to the database. In a very rare case we had some latency and a 10 minute mute was applied 6 minutes after it was added to the database. In that case we were told the mute will last 4 minutes, which is correct.
That said, it doesn't seem like a very compelling reason to keep this behavior. I'm ok with just using the supplied duration as-is, or maybe we could add a check to make sure the delta is no...
def0f2a Speed Up Sync Cog Loading - HassanAbouelela
[python-discord/bot] New branch created: speedup\-syncing
The user syncer was blocking the startup of the sync cog due to having to perform thousands of pointless member fetch requests. This speeds up that process b:
- Increasing the probability that the cache is up-to-date using
Guild.chunked, and assuming that any found cache data is correct - Limiting the fetches to members who were in the guild during the previous sync only, meaning we don't fetch a bunch of outdated members
GitHub Actions run 2212122362 succeeded.
The second point still stands, @Shom770 can you use codelines for
.env?
What's codelines? I'm a bit lost here.
b7cef27 Update pydis_site/apps/content/resources/guides... - Shom770
GitHub Actions run 2212878588 failed.
GitHub Actions run 2212904318 failed.
Thank you for the PR!
We should add YAML frontmatter and I don't think we should use markdown headers for the text. As for frontmatter, see this PR for an example. How about we start with something like this:
---
title: Custom Help Command
description: "Overwrite discord.py's help command to implement custom functionality"
---
First, a [basic walkthrough](https://gist.github.com/InterStella0/b78488fb28cadf279df...
Forgot to press submit on this one yesterday 😅
LGTM, just one comment but doesn't really matter in the big picture, since there's a few to change anyway.
from botcore.utils.members import get_or_fetch_member
One less to get in the migration :D
270a6f2 Migrate discord.py custom help command pin to s... - Diabolical5777
GitHub Actions run 2213277572 succeeded.
We could say "which can then later be merged into the main Python Discord repository."
Problem 1
Suggestion: A point-based system with milestone roles
This has been discussed a few times in the past, and the general consensus is that this comes with a few [issues](#community-meta message):
Ideas for gamifying the help system have been proposed before, but that's not something we're currently interested in. Making people rely on a points system for gratification, possibly making people pressure others to...
Building IA course Project
GitHub Actions run 2215167264 succeeded.
GitHub Actions run 2216573305 succeeded.
Connected!
Yeah sorry I didn't notice, it's now consistent
GitHub Actions run 2218795758 succeeded.
This is something I've noticed with discord relative timestamps in general. Even if you do time = 0 it will say Dec 31 1969.
This is something I've noticed with discord relative timestamps in general. Even if you do time = 0 it will say Dec 31 1969.
time += 1
Correct me if I am wrong! This can be achieved by defining an 'on_typing' event listener?
And according to me there must be some upper limit to the channels that can occur in available help category even when added dynamically please do share your thoughts and relatable numbers about that.
I agree, there should be an upper limit.
With that said, there are plans:tm: to migrate our help channel system to Discord forum channel. I'm afraid, in that case, work done on this issue will be a waste of effort.
99e6cb1 Set BotBase.statsd correctly based on init kwargs - ChrisLovering
[python-discord/bot-core] New branch created: actually\-use\-statsd\_url
[bot-core] Branch actually\-use\-statsd\_url was force-pushed to `641318d`
Since it is a custom kwarg (i.e. not inherited from discord.py's Bot), it should be documented.
Is this guaranteed to succeed? If not, there should be some time out and the syncer should still run if possible.
Force pushed a change to make this a named arg, with documentation.
[bot-core] Branch actually\-use\-statsd\_url was force-pushed to `fe3fd3d`
The only time this won't succeed is if the member cache isn't populated by Discord.py, which could happen in a very rare case if Discord has gateway issues.
In that case we wouldn't want the user syncer to run at all, as we assume further down if a user isn't in the member cache, they are no longer a member.
[python-discord/bot-core] branch deleted: actually\-use\-statsd\_url
[python-discord/bot-core] New tag created: v6\.3\.2
Does a 30 minute timeout sound reasonable?
3082b7c Bump bot base so a real statsd client is actual... - ChrisLovering
[python-discord/bot] New branch created: bump\-bot\-base
in the case where this times out I think the correct thing to do would be to log a warning/error and cancel the cog load.
It doesn't sound like the syncer should run in that case. Thus, it might as well wait forever, unless you think some log message would be useful. I think wait_until_guild_available already checks if the caches are populated anyway (I assume the syncer cog is waiting for that somewhere).
GitHub Actions run 2221372721 succeeded.
What if the member was not in the cache and in_guild = False. Does this mean the DB won't be able to know that they've rejoined the server (until the next sync where hopefully they are in cache)?
The alternative would be fetching thousands of members (up until it was purged 200-300k). That doesn't seem feasible anymore.
What kind of impact could a member being out of sync have on the rest of our features?
I think the big impact would primarily be on moderation tools. More specifically, the user embed would be off.
There are some other operations that would have problems if the cache was off (banning would raise an error for instance), but that is only in the case where the user is off the guild, but in the cache. I don't think that's an anticipated scenario, the opposite is more likely.
GitHub Actions run 2221718218 succeeded.
Connected!
GitHub Actions run 2221737877 succeeded.
acc1654 Add Timeout To The Sync Cog - HassanAbouelela
Added an exception and timeout in acc16545. It will now log the following after 30 minutes:
discord.ext.commands.errors.ExtensionFailed: Extension 'Sync' raised an error: RuntimeError: The guild was not chunked in time, not loading sync cog.
GitHub Actions run 2221841101 succeeded.
GitHub Actions run 2221914573 succeeded.
Connected!
GitHub Actions run 2221935780 succeeded.
GitHub Actions run 2222900512 succeeded.
I'm closing this PR, my commits are kinda messed up.. Will be opening a new PR from a new fork.
GitHub Actions run 2224322447 succeeded.
GitHub Actions run 2224338303 succeeded.
I believe this has been resolved with #778, closing.
This was not fixed with #778.
@HassanAbouelela
[python-discord/bot-core] New branch created: bump\-d\.py
[python-discord/bot-core] New review comment on pull request #72: Bump d\.py to fix Guild\.chunk\(\)
Guild.chunk as it is right now had a more severe OOM problem, but let’s just see how this goes.
[python-discord/bot-core] branch deleted: bump\-d\.py
[python-discord/bot-core] New tag created: v6\.4\.0
GitHub Actions run 2225724139 succeeded.
Connected!
GitHub Actions run 2226081225 succeeded.
GitHub Actions run 2226335225 succeeded.
PR Author
Workflow Run
Source Branch
bump-bot-memory-u...
GitHub Actions run 2226712557 succeeded.
[sir-lancebot] Branch bookmarking\-enhancements was force-pushed to `3a1b29e`
GitHub Actions run 2228355058 succeeded.
85b6973 Improve the docstring for the action_bookmark f... - ChrisLovering
i will re-make this PR, as a lot of the context in this PR is irrelevant due to the new direction.
[python-discord/sir-lancebot] branch deleted: bookmarking\-enhancements
GitHub Actions run 2228375589 succeeded.
dce01f4 Simplify when a message can not be found when b... - ChrisLovering
2ff57b7 Simplify bookmark error embed helper - ChrisLovering
659b0da Remove need for additional abstraction in bookm... - ChrisLovering
3a1b29e Add command to delete bot messages in DMs with ... - ChrisLovering
85b6973 Improve the docstring for the action_bookmark f... - ChrisLovering
[python-discord/sir-lancebot] New branch created: bookmark\-enhancements
Relevant Issues
<!-- Link the issue by typing: "Closes #" (Closes #0 to close issue 0 for example). -->
Closes #918
Description
This simplifies the bookmark implementation, and adds the ability to delete bookmarks in DMs.
To reduce complexity, the delete bookmark functionality actually allows users to delete any sir-lancebot message within their own DMs, and is labeled as such.
Did you:
- [ ] Join the Python Discord Community?...
GitHub Actions run 2228392419 succeeded.
8d05a50 Manually chunk guild if not chunked 30s after s... - ChrisLovering
[python-discord/bot] New branch created: chunnk\-guild\-if\-not\-chunked
GitHub Actions run 2228553330 succeeded.
The only documented failure is if the members intent isn't enabled, looking though the call stack it doesn't raise anywhere else.
It's also a websocket action, so won't get normal http errors.
[python-discord/site] New branch created: rewrite
[python-discord/site] branch deleted: rewrite
[python-discord/site] New branch created: rewrite
[python-discord/site] branch deleted: rewrite
[python-discord/site] New branch created: rewrite
GitHub Actions run 2229373256 succeeded.
[python-discord/site] New branch created: logs\-force\-word\-wrap
fc982b4 Force line break at arbritrary points for reall... - minalike
Currently if a message contains a very long word the content doesn't wrap and extends off the page.

This PR forces line breaks in what normally are unbreakable words.

GitHub Actions run 2230746618 succeeded.
6c93d12 Add Support For Multiple Banners - HassanAbouelela
[python-discord/branding] New branch created: allow\-more\-banners
Adds support for having either a banner.png as we currently do, or a banners directory similar to icons which can hold multiple banners.
This feature should not be used until support is added for it on the bot scheduler side, but it can be merged right away.
GitHub Actions run 2233551096 succeeded.
7e8366d Add Support For Multiple Banners - HassanAbouelela
[python-discord/bot] New branch created: multiple\-banners
Looks like it will do the trick, nice one.
[python-discord/site] branch deleted: logs\-force\-word\-wrap
This PR adds support for having multiple banners which rotate in a single event, much like icons currently do. See python-discord/branding#179 for the relevant changes there.
There are almost no code changes here as most of the required logic was already implemented, and was standardized to work for both icons and banners. A majority of the diff is renaming "icon" to "asset" and adding an asset type argument to the functions.
For testing purposes, make sure to create an API token as you...
GitHub Actions run 2235395164 failed.
GitHub Actions run 2235640459 succeeded.
Ah right, this is still not resolved. Can you change it to "For example, the paragraph below discusses the..."?
GitHub Actions run 2235647216 succeeded.
Thank you, I am happy with this - looks good!
[python-discord/site] Pull request review submitted: #699 Contrib walk\-through and improving guides
I previewed it locally, and the few places where I thought it wouldn't render (or look out of place) appears to be working as intended.
What a great improvement, thank you for putting the effort into this!
Connected!
Updated to " the drawbacks of using common free hosting services to host a discord bot are discussed below."
GitHub Actions run 2236784165 succeeded.
Sentry Issue: BOT-33Z
AttributeError: __enter__
File "discord/ext/commands/core.py", line 200, in wrapped
ret = await coro(*args, **kwargs)
File "bot/utils/lock.py", line 108, in wrapper
relative_url_path, _, symbol_id = relative_doc_url.partition("#")
File "bot/exts/info/doc/_cog.py", line 434, in refresh_command
with ctx.typing():
Error executing command invoked by joe#60...
12b1f82 Use async with Messageable.typing() everywhere - ChrisLovering
[python-discord/bot] New branch created: use\-async\-with\-typing
Closes BOT-33Z Closes #2154
With the latest version of discord.py support for the with Messageable.typingn() was droped, in favour of only using async with.
GitHub Actions run 2237705028 succeeded.
GitHub Actions run 2238151143 succeeded.
b6de183 Remove Explicit Support For Standalone Banners - HassanAbouelela
Very cool, looks good, thanks Scale.
We should hold off on merging this until the same day as the bot side is merged though.
GitHub Actions run 2238204278 succeeded.
Kwzrd suggested we remove support for standalone banners to simplify the code here, thanks for the idea!
This diff should have never been this large. For such a minor change, the diff should’ve been equally as small. I suppose the blame doesn’t fall with you, but the person before you for not marking the function as sync.
Yeah, I'd definitely like to see this change. 👍🏼
Going to close this, as discussed in #dev-branding, we'll be going with another design for this.
This is beautiful work. Sorry, we should've merged this a while back.
We have a bunch of these now. Solved!
Plenty of lemojis now, let's close this.
GitHub Actions run 2238708008 succeeded.
GitHub Actions run 2238711597 succeeded.
Not really relevant anymore now that we're using Streamyard
Closing this, never seemed to materialize.
I'd still very much like to see this one happen.
[python-discord/bot] branch deleted: use\-async\-with\-typing
Connected!
GitHub Actions run 2238777409 succeeded.
Things Added
- Added
banner.png&logo.png( inserver_iconsfolder) along withmeta.mdfile. - Purple themed branding in available in
altnamed folder.
If you find any issue or problem with PR, please let me know :")
In reference to #149 .
GitHub Actions run 2238821487 succeeded.
I think it's quite hard to justify spending time recreating this icon over a minor color discrepencies. I'm tempted to just close this issue, especially given it's been inactive for over a year.
@MarkKoz do you have any objections to that?
I quite like this proposal, and would welcome a PR for this.
Okay, fine, let's close this.
@dannynotsmart @gustavwilliam
This seems to have gone stale. Should we close this issue?
We've added a bunch of role icons by now, and they've found their way into this repo inside https://github.com/python-discord/branding/tree/main/icons/role_icons
Let's close this issue as this has been resolved.
What's the problem?
Some of the events we've got branding for, such as Eid al-Fitr and Holi, fall on different dates every year.
This means we manually update the start and end dates for these in order for the events to happen at the right time of year.
How can we solve that?
One approach is to leverage GitHub Actions to create an automatic pull request with the required changes every year.
For example, on January 1, a Python Discord GitHub App could open a pull request to th...
The graphics look great, but I'd like some minor changes to the metafile before merge.
[Eid al-Fitr](https://en.wikipedia.org/wiki/Eid_al-Fitr) is celebrated after a month-long dawn-to-sunset fasting of Ramadan. It falls on the first day of [Shawwal](https://en.wikipedia.org/wiki/Shawwal) in the Islamic calendar, which will change from year to year in the Gregorian calendar depending on when the new moon is sighted. The duration of this celebration also varies from culture to culture.
During Eid, Muslims will feast on delicious foods, perform special prayers, ...
GitHub Actions run 2240762994 succeeded.
GitHub Actions run 2240849284 succeeded.
GitHub Actions run 2240928037 succeeded.
GitHub Actions run 2240936260 succeeded.
GitHub Actions run 2240951138 succeeded.
GitHub Actions run 2241038516 succeeded.
Awesome work! Thanks for finishing this; looks great.
Another great PR - thank you for this one too! ❤️
That was my only complaint. Thanks for the PR Xithrius (and Mina for finishing it 💯)!
GitHub Actions run 2241123895 succeeded.
GitHub Actions run 2241133550 succeeded.
GitHub Actions run 2241159295 succeeded.
@Shom770 Use backticks ` around .env on line 8
uhm.. how about we close this issue now?
Changes to static images should count as content changes, thus this PR adds the path for static images to the approval rules for site content updates.
I've just noticed a small issue with the gist link at the bottom on mobile, will change tomorrow to a hyperlink instead.
GitHub Actions run 2241721835 succeeded.
The new versions introduce conversions which cause the doc embeds to be formatted improperly, e.g.
| new markdownify | old markdownify |
|---|---|
![]() |
![]() |
![]() |
![]() |
GitHub Actions run 2245366688 succeeded.
GitHub Actions run 2245791297 succeeded.
GitHub Actions run 2245970334 succeeded.
As someone who spends a decent amount of time helping in the help channels, I often find people running into the issue of installing x library using pip but when they run import x they get the error ModuleNotFoundError: No module named 'x' from my experiences this is 99.9% of the time caused by someone using a virtual environment, and installing the library to the wrong environment or not running their program in that environment.
I think that a command that either links them to a pa...
Sounds like a fine change to me, feel free to open a PR!
I'm not completely against this, but I think there are a few fairly major issues, such as:
- I'm not sure how accurate this could be. False positives would be pretty annoying and could just end up making the channel even more cluttered.
- Sometimes pygen is a fine place to ask a question. It's not really clear what it's purpose would be otherwise (although yes, a topical channel would usually be preferred).
- People will likely ignore it anyway - it's hard enough for a human to redirect ...
We used to have something similar https://github.com/python-discord/bot/pull/1028#issuecomment-653923366, not sure what happened to it though.
If we add this I think it should be to give useful information. It does add some clutter to the issue/PR so i'm not sure it's worth it.
On sir-lancebot we use issue/pr templates instead https://github.com/python-discord/sir-lancebot/tree/main/.github.
I think the point griff made about getting your messages deleted is a dealbreaker, so I don't think this is something we'll want to do at the moment.
I don't think the opt-in proposal is great as it would not be clear who the message was initially from (we could add it in the message, but i'd imagine it would still confuse some people, and breaks some other things like being able to mention the user). I don't really see this going anywhere so i'll close this issue.
This seems like a fair suggestion to me, although the bot should tell them why the message was deleted. I think in this case it might be best to just post a really short message where it happened, otherwise they might not see it. Something like:
@user You are not allowed to post discord cdn links in this channel
Thoughts?
This seems like a fair suggestion to me, although the bot should tell them why the message was deleted. I think in this case it might be best to just post a really short message where it happened, otherwise they might not see it. Something like:
@user You are not allowed to post discord cdn links in this channelThoughts?
Lol I completely forgot of this issue's existence, it's been 5 months 🤣
Yeah sending a message like that would be a good idea for sure.
Hmm, that sounds like...
The current !intents command does not state that the Messages Content is a privileged intent that is not enabled by default to get the content of messages.
This closes #2158 by adding the Messages Content privileged intent into the tag.
GitHub Actions run 2248180315 succeeded.
GitHub Actions run 2248223135 succeeded.
(The above activity was me experimenting with whether "as described in" would link the PR to the issue. I don't believe it does; see here for the supported keywords)
I like the change, thanks for the PR!
[python-discord/bot] branch deleted: 2128
Connected!
GitHub Actions run 2248268686 succeeded.
I think this idea may be a bit too restrictive. While yes some users use cdn links to post inappropriate images, that isn't their only use case.
Though embed permissions are disabled in python-general, occasionally users will post links to images, which while not often ideal for getting code help, can be useful in sharing images of their IDE or visual output of their code. These are a few of the examples I observed after searching python-general for such messages.
I don't think there's...
I think this idea may be a bit too restrictive. While yes some users use cdn links to post inappropriate images, that isn't their only use case.
Though embed permissions are disabled in python-general, occasionally users will post links to images, which while not often ideal for getting code help, can be useful in sharing images of their IDE or visual output of their code. These are a few of the examples I observed after searching python-general for such messages.
I don't think t...
The branding for Eid has been merged, so we just need to update that banner config before merging this PR.
Other than that, LGTM! Good work.
see here for the supported keywords
TIL! For some reason I had just assumed GitHub magically does the thing whenever you mention an issue in a PR. Thanks for the helpful link 😌
This will actually only sleep for 20s before attempting chunking. (there are 3 checks with 10s wait between then but the first one is at 0s).
Would it also be worth logging some sort of exception if the guild doesn't end up chunked? I don't think there is a reason it shouldn't eventually end up chunked, only that it might take a long time to do so. If it not chunking itself is a common occurence we'd probably want to know about it as it would cause problems elsewhere in the bot.
Also do...
The delete wont do anything currently as the value is reset on the next line
This seems alright but i'm not 100% sure on the changes to the set function. I may just be misunderstanding though.
If set was called after a bot restart with an hour until a key expired, the expiry would not be changed but the _set_expires value would be set to a week. If set was called a day later, after the key had expired, the key would be set but no expiry would be set. I'm not sure if this would happen with the current workings of doc but if it didn't i'm not sure how the c...
This comment doesn't make sense here any more
Why not? The bock will execute on the first set of the key like the comment says
The top line is fine. Just the next two about _set_expires are not relevant specifically to this block any more, as now _set_expires is always reset regardless of whether it already existed.
Thanks, I forgot to take into account the ongoing expires in redis, should be fine now I believe
GitHub Actions run 2250607888 succeeded.
Just noticed this is changing the dict into a set.
One thing, other than that all looks good.
GitHub Actions run 2250692072 succeeded.
31c1ed4 Add message ID to delete logs - ChrisLovering
[python-discord/site] New branch created: id\-in\-delete\-logs
GitHub Actions run 2250701069 succeeded.
Is it important that we are able to link a banner and icon so they always appear at the same time? I'd guess they probably would end up in sync if they are in the same order in the banners/ and icons/ directories in the branding repo, but is there a way of making this more explicit?
695e903 Output max 10 bumped threads on list - ChrisLovering
90d4f90 Use site api over redis for thread bumps - ChrisLovering
a196ec9 Only call unarchive threads if there are thread... - ChrisLovering
930bf0f Only suppress 404s from site when checking for ... - ChrisLovering
ce10a11 Merge branch 'main' into improve-thread-bump - wookie184
[python-discord/bot] branch deleted: improve\-thread\-bump
GitHub Actions run 2250834062 succeeded.
Connected!
GitHub Actions run 2250846322 succeeded.
c926c80 Merge branch 'mbaruh/modpings-cache' - wookie184
ec86e43 Merge branch 'main' of https://github.com/pytho... - wookie184
ade8a05 Remove rediscache from thread bumper now it's b... - wookie184
[python-discord/bot] New branch created: remove\-redis\-threadbumper
GitHub Actions run 2250892140 succeeded.
63fa1c0 Create discord-messages-with-colors.md - Krypton
934218e Update discord-messages-with-colors.md - Krypton
806ce3f Update discord-messages-with-colors.md - Krypton
fa1dd40 Using static images - kkrypt0nn
e3067dc Removed <br>'s and used code block for raw me... - kkrypt0nn
@wookie184 I considered it, but after deliberating on the matter for a while, I didn't think the added complexity of trying to coordinate both was worth the payoff, especially considering the tight deadline we're trying to finish this in.
It can be added in the future, I imagine we can link them based off their name, but more logic would be necessary to properly handle rotating them at the same time (and certain edge cases such as having 2 banners, and 1 icon).
Deleting bookmarks doesn't seem to work for me. When I try it in DMs I get told I can only use it in the bot-commands channel and when I try it in the bot-commands channel I get told i'm not authorised to use it. Could this be because there is a guild_only decorator on the bookmark group and a dm_only decorator on the delete command? Or do I have something set up wrong locally?
I get a similar thing with .help. Ideally I think help should be able to be used anywhere for all c...
e49db8c Fix unbm DM only logic - ChrisLovering
[python-discord/sir-lancebot] New branch created: bookmarking\-enhancements
bdfb3b2 Fix unbm DM only logic - ChrisLovering
[python-discord/sir-lancebot] branch deleted: bookmarking\-enhancements
GitHub Actions run 2254318528 succeeded.
[sir-lancebot] Branch bookmark\-enhancements was force-pushed to `5c108b2`
GitHub Actions run 2254325218 succeeded.
This will actually only sleep for 20s before attempting chunking. (there are 3 checks with 10s wait between then but the first one is at 0s).
Ah good point, I'll update PR title, not a big issue though.
Would it also be worth logging some sort of exception if the guild doesn't end up chunked? I don't think there is a reason it shouldn't eventually end up chunked, only that it might take a long time to do so
Guild.chunk() is blocking until the guild is successfully chunked. I cann...
Sentry Issue: BOT-343
ContentTypeError: 0, message='Attempt to decode JSON with unexpected mimetype: ', url=URL('http://site.default.svc.cluster.local/api/bot/bumped-threads/960577148358381599')
File "discord/client.py", line 375, in _run_event
await coro(*args, **kwargs)
File "bot/exts/utils/thread_bumper.py", line 141, in on_thread_update
await self.bot.api_client.get(f"{THREAD_...
335649a Don't decode empty content as json in thread bu... - ChrisLovering
[python-discord/bot] New branch created: fix\-get\-single\-bumped\-thread
Closes #2162 Closes BOT-343
self.bot.api_client.request can not be used to check if a thread id exists in the bumped thread list on site, as self.bot.api_client.request() always attempts to decode the response as json.
The thread bump viewset in site returns a 204 if the given thread exists with no content, so this does not work.
[bot] Branch fix\-get\-single\-bumped\-thread was force-pushed to `642c741`
GitHub Actions run 2254567473 was cancelled.
[bot] Branch fix\-get\-single\-bumped\-thread was force-pushed to `2a9e51e`
GitHub Actions run 2254572443 was cancelled.
GitHub Actions run 2254576130 succeeded.
Thanks for explaining that! This looks good to me
695e903 Output max 10 bumped threads on list - ChrisLovering
90d4f90 Use site api over redis for thread bumps - ChrisLovering
a196ec9 Only call unarchive threads if there are thread... - ChrisLovering
930bf0f Only suppress 404s from site when checking for ... - ChrisLovering
12b1f82 Use async with Messageable.typing() everywhere - ChrisLovering
[python-discord/bot] branch deleted: chunnk\-guild\-if\-not\-chunked
GitHub Actions run 2255067729 succeeded.
Connected!
GitHub Actions run 2255076722 succeeded.
The usages of the function need to be awaited
LGTM, will merge this now and can do the botcore change some other time
695e903 Output max 10 bumped threads on list - ChrisLovering
90d4f90 Use site api over redis for thread bumps - ChrisLovering
a196ec9 Only call unarchive threads if there are thread... - ChrisLovering
930bf0f Only suppress 404s from site when checking for ... - ChrisLovering
8720262 Make extension management async - mbaruh
[python-discord/bot] branch deleted: mbaruh/modpings\-cache
GitHub Actions run 2255104684 succeeded.
Connected!
GitHub Actions run 2255115065 succeeded.
Connected!
GitHub Actions run 2255171685 succeeded.
Sentry Issue: BOT-YP
Paste service returned error Document exceeds maximum length. with status code 400, trying again (3/3).
[python-discord/bot] New branch created: improve\-pastebin\-error\-handling
Closes #2164
I figured raising errors was the most sensible way of approaching this. I kept the behaviour of snekbox limiting it to lower than the actual maximum, as I assume that was just because more shouldn't really be necessary there, but it's ok elsewhere.
GitHub Actions run 2258783978 succeeded.
[python-discord/bot] New branch created: update\-pep\-cog
There is a new PEP API that saves us having to manually scrape files from github https://peps.python.org/api/peps.json, largely simplifying the implementation.
As far as I can tell this was also the only usage of https://github.com/python-discord/bot/blob/5fe110b9a49144480ebca34dec65de91753994ec/bot/utils/caching.py, do we want to remove that given it's no longer used?
GitHub Actions run 2258855185 succeeded.
I fixed both this and the need to await the async function (who knew this was needed 🤦) with a forcepush to the most recent commit.
[bot] Branch fix\-get\-single\-bumped\-thread was force-pushed to `0edec23`
GitHub Actions run 2258947835 succeeded.
As far as I can tell this was also the only usage of https://github.com/python-discord/bot/blob/5fe110b9a49144480ebca34dec65de91753994ec/bot/utils/caching.py, do we want to remove that given it's no longer used?
I'd vote for removing it yea. We could add it to bot-core for future use if needed too.
See Create Production-Ready logo/banner #27
I've removed the gray background and kept everything else the same
GitHub Actions run 2259019369 succeeded.
ccb56ce Removed unused file and fix incorrect docstring - wookie184
Thank you, looks like exactly what we need.
This is a cropped version of the transparent banner. This is good for when the logo needs to be centered, since the original banner is off-center.
GitHub Actions run 2259525024 succeeded.
GitHub Actions run 2259531281 succeeded.
Sentry Issue: BOT-2ZT
Failed to apply ban to user xxxxxxxxxxxxx
I think this happens when a user is cleanbanned after being banned. We can probably just remove this log.error as apply_ban already does it's own logging.
Sentry Issue: SIR-LANCEBOT-83
KeyError: 'image_url'
File "discord/ext/commands/core.py", line 167, in wrapped
ret = await coro(*args, **kwargs)
File "bot/exts/holidays/halloween/spookygif.py", line 28, in spookygif
url = data["data"]["image_url"]
Unhandled command error: 'image_url'
image_url doesn't exist in the reponse. Changing the line to url = data["data"]["url"] mi...
Wonderful work, wookie. I've reviewed and tested, I just have one small question.
Forgive me for asking but can't you just write these two lines as:
self.peps = listing
The keys of the dictionary will be strings in this case though.
I think i'll leave it, as being an int and having this code naming pep_num and pep_info makes it a little clearer what the structure of peps is imo.
Currently when using !modpings off the bot responds with an embed showing when the Moderators role will be re-applied.
Example:

Currently this information is shown in the footer. However, we could take advantage of Discord's formatted localized timestamps and show full date and time in the body of the embed, similar to our !reminder command

Reasoning
It's kinda hard to explain, to me it just doesn't make sense for just the "React with 📌 to receive your own bookmark..." message to auto-delete when you run .bm...
[python-discord/sir-lancebot] Issue opened: #1052 Add topics for the new \#media\-processing channel
Description
I think it would be nice to have some topics for the new #media-processing channel created 5/3/2022 for the .topic command.
Reasoning
Well, all the other topical channels have topics so it only makes sense to have some for this channel as well.
Proposed Implementation
Some topics I have in mind currently:
- Which Python package is commonly used for image manipulation?
- What is image processing how can Python be used for it?
- What are some ways you co...
GitHub Actions run 2272312851 succeeded.
I'm completely new to python and so far I've been enjoying my time with this bot in the discord server. But I have many things to do and if I send in the server it looks spammy. So I want to get a copy of this bot in my discord server(only me though) so I can use perfectly. Can I get help hosting the bot please
Hello. There are instructions on our site that explain how to set up and launch the bot. Those instructions can be found here.
Follow up/re-run of that same query above as of today, May 4 2022:
for members joined in the last 30 days
no off topic activity: 17,676
ot0: 155
ot1: 28
ot2: 38
I've occasionally re-ran this query a few times throughout the year and if memory servers correctly, ot2 ranked consistently above ot1 for first off-topic channel, imo showing a slight but definitive effect of hard-coding the !ot embed to only show ot2.
I'm not sure I understand, but you should be able to run it anywhere you can run Python and PostgreSQL or anywhere you can run Docker.
Relevant Issues
https://github.com/python-discord/sir-lancebot/issues/1050#issuecomment-1116368854
<!-- Link the issue by typing: "Closes #" (Closes #0 to close issue 0 for example). -->
Description
replace image_url with source_image_url in spookygif.py
Did you:
Yes
- [ 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 discus...
GitHub Actions run 2279969595 succeeded.
The !clean command has multiple modes, and it can be confusing to use.
!clean botsmentions atraverseargument that doesn't exist.!clean regexhas an example of formatting the regex pattern that I think needs more escape characters.- Most of the commands can take either a message or a time limit. They should make it clear that providing a message limits the search to its channel, and to clean across channels you need to provide a time limit instead.
!clean users is a valid alias for !clean user but it can only take one user. The !clean command can already handle multiple users, so this is a very minor change.
Anyone can implement
5ec6cc5 Set Compose Backend Start Command - HassanAbouelela
[python-discord/forms-frontend] New branch created: backend\-command
Updates the command used for the backend in the compose to the development one. The production one caused issues as it did not log any useful output like this one does, it does not refresh, and it can cause authorization issues with JWT signing.
True! Let's just make the bot's response say:
✅ Moderators role has been removed until <timestamp>.
I get this error when trying to run this
KeyError: 'source_image_url'
I also don't see source_image_url mentioned anywhere in the documentation, so i'm not sure where this is from. Could you have another look at this? I gave a potential solution in the issue although ideally that should be tested before commiting.
GitHub Actions run 2286204237 succeeded.
After a discussion within the mod team we have decided that, at the moment, we don't need such feature at the moment. Thanks for the suggestion.
For future reference, issues on this repository are intended for bugs and/or suggestions to the bot. If you need help with running the bot please visit #dev-contrib channel in our discord server.
Tested and all seems good to go.
Was trying to think of a good way of handling matching banners and icons. Had one idea for a layout:
icons
- icon_green.png
- icon_red.png
banners
- banner_green.png
- banner_red.png
To get the assets to use, we'd select a random icon, and then select a random banner in the same group (group is what's after the _, or something like that). This would be pretty flexible as you can easily have one icon with many banners or vice...
@wookie184 That's a pretty good system provided you don't try to deal with combinations of groups, and no groups, such as:
icons:
icon_green.png
icon_red.png
banners:
banner_green.png
banner_red.png
banner_other.png
In this case, you have the following problem:
Day 1: Green icon, green banner
Day 2: Red icon, red banner
Day 3: Other banner, ?? icon.
You end up either having to repeat an icon two days in a row, cause a mismatch in the banners and icons, or ...
695e903 Output max 10 bumped threads on list - ChrisLovering
90d4f90 Use site api over redis for thread bumps - ChrisLovering
a196ec9 Only call unarchive threads if there are thread... - ChrisLovering
930bf0f Only suppress 404s from site when checking for ... - ChrisLovering
2b2dc95 Make modpings rescheduling robust to unfilled c... - mbaruh
GitHub Actions run 2286633278 succeeded.
I don't think there would be any need to support groups with only banners or only icons, that's something that could be validated in the branding repo to make sure it doesn't happen,
should probably remove the ctx.send as well as apply_ban will already send a more specific reason
I don’t agree. We already have events that don’t have banners, because not every contributor will make one. That would artificially limit us. Additionally, with your proposed system where you can have multiple assets in each “group”, you run into the same problems.
We already have events that don’t have banners
Do we? I couldn't find any, and it looks like we already enforce events having to have a banner https://github.com/python-discord/branding/blob/3173b230d8e2b0382a0cb19f0966a7100ad88910/events/validation.py#L68-L73
We have events that don’t have as many banners as icons rather. This is the case with all events that have more than one icon currently, because nothing else is supported yet.
We have events that don’t have as many banners as icons rather. This is the case with all events that have more than one icon currently, because nothing else is supported yet.
That wouldn't be an issue with what I am proposing. For example, if you had 2 icons and 1 banner, you'd just put them all in a single group. A random icon would be chosen, and a random banner from the corresponding group is chosen (in this case always the same one).
No the problem is with what I mentioned about having unbalanced groups.
You end up either having to repeat an icon two days in a row, cause a mismatch in the banners and icons, or smartly pick an icon that is not in the upcoming group.
Ultimately it is solvable. Repeating an asset is one such solution. Which solution is deemed best is probably best left to the actual PR implementing that.
GitHub Actions run 2288318984 succeeded.
I added reminders to fork and clone at the tops of the set-up guides and "Next steps" sections at the bottoms that link to the walk-through and contributing guidelines.
When setting a reminder with the !remind command, the embed contains a timestamp which states the time at which the reminder will arrive. Same should be done for the embed you get when you edit a reminder, i.e, a timestamp of the newly edited time should be added to the embed.
Anyone can implement.
There's no rush to get this merged so we should wait for https://github.com/python/peps/issues/2584 to be resolved.
GitHub Actions run 2289505179 succeeded.
Most aspects of the source command should be the same across bots, although python-discord/bot also needs to support tags. Having an extensible cog that would allow bot to hook in to add support for tags would be nice, although might also overcomplicate things. Thoughts?
GitHub Actions run 2290152860 succeeded.
GitHub Actions run 2290212963 succeeded.
Added a "Making changes" step that tells them to create a feature branch and links to the commit messages guide
Yeah, I'd suggest waiting if you can, since until #2584 is resolved (hopefully soon...™) the "API" is experimental and undocumented, and the path/endpoint, structure, etc. may change.
Relevant Issues
Closes #1052
Description
Added topics for the .topic command for the recently created #media-processing channel
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?
GitHub Actions run 2291206951 succeeded.
If possible I would like to work on this!
Seems to be working fine, code also looks good, thanks for the PR!
Can we please disable the emojis completely, it's so incredibly noisy and awful.
Other than that, I think this needs a little polish but the implementation itself looks okay.
GitHub Actions run 2295461945 succeeded.
Connected!
GitHub Actions run 2295499760 succeeded.
5f18f0b Add video type to Python Morsels resoure - MrHemlock
[python-discord/site] New branch created: MrHemlock\-patch\-1
Adding the video type at the request of Trey Hunner.
GitHub Actions run 2295611180 succeeded.
GitHub Actions run 2295636827 succeeded.
Sentry Issue: SIR-LANCEBOT-85
KeyError: 'status_code'
File "discord/ext/commands/core.py", line 167, in wrapped
ret = await coro(*args, **kwargs)
File "bot/exts/fun/movie.py", line 94, in movies
err_msg = f"There is problem while making TMDB API request. Response Code: {result['status_code']}, " \
Unhandled command error: 'status_code'
There are two issues here. Firstly, the reason the request fails is that the command fetches a random page up to the total number of pages
https://github.com/python-discord/sir-lancebot/blob/6609ceab1600ae5d08c2614f5a0f994b86f8ba5e/bot/exts/fun/movie.py#L88-L89
However the page parameter is documented as only allowing a maximum page numer of 1000 (https://developers.themoviedb.org/3/discover/movie-discover). You can replicate this by running .movies Drama (may need to run it a few times i...
If possible I would like to work on this!
I've assigned you. Check out our contributing page if you haven't already, and feel free to ask if you have any questions!
ccd2d1b Enable Testing In CI - HassanAbouelela
[python-discord/bot-core] New branch created: enable\-tests
7eef69c Fix Discord Invite Regex Docs - HassanAbouelela
[python-discord/bot-core] branch deleted: enable\-tests
[python-discord/bot-core] New branch created: prepare\-v6
Prepare for a release of version 6.0.0. This includes an update to the changelog and enabling tests in CI.
63ec452 Update Coverage Module - HassanAbouelela
e648d36 Update Coverage Module - HassanAbouelela
[python-discord/bot-core] branch deleted: prepare\-v6
[python-discord/bot-core] New tag created: v7\.0\.0
GitHub Actions run 2303340663 succeeded.
672fc94 Bump Bot Core to v7.0.0 - HassanAbouelela
[python-discord/bot] New branch created: fix\-multislash\-invites
Bumps the botcore version to v7.0.0, and implements the changes required by the breaking fix documented in the changelog for utils.regex.DISCORD_INVITE.
GitHub Actions run 2303414685 succeeded.
GitHub Actions run 2303715631 succeeded.
Not sure if it helps, but here are a few additional ideas:
- Any interesting progress to share?
- Any cool trick or optimization you are proud of?
- What is your favorite media processing related algorithm?
- What is the worst outcome for your generation or processing?
- What is the most surprising result you got?
- What is your most advanced media processing related achievement?
- Do you use a lot of math in your media processing related projects?
- Can a computer truly generate ar...
It seems like the repository is already structured in a way that this would be the plan, exts/init.py
An example of what I would be expecting can be found here.
Define each ext/cog approach
This is a code snippet of how a project would use a botcore ext (cog)
from bot.bot import B...
Oh wow, those are actually pretty awesome, @Recursive-Error , thank you so much! However, I would tweak some of them but I don't really have the time right now to write out exactly what I think needs to be tweaked, but I could do it later today if you are interested.
Hello!
Sorry I am having trouble getting the bot to start, I believe I followed all the instructions. Here is the traceback:
Found config.yml` file, loading constants from it.
2022-05-11 10:47:25 | botcore.utils._monkey_patches | DEBUG | Patching send_typing, which should fix things breaking when Discord disables typing events. Stay safe!
2022-05-11 10:47:25 | discord.client | WARNING | PyNaCl is not installed, voice will NOT be supported
Traceback (most recent call last):
File "/...
@mtkumar123 Could you post this in the #dev-contrib channel on the Discord server? Questions like that are better to post in that channel than on GitHub.
Thanks for writing that up, I like the "Define each ext/cog" approach, although I'm not sure the precommand/postcommand hooks would add anything we can't do by overloading. Overloading would also give us more flexibility and let us reuse some of the existing code flow.
For example, to add the tag behaviour for bot, i'd propose that the subclass might look something like this. We'd overload each method that needs tag specific behaviour and implement the tag behaviour before delegating t...
Ah, so overriding works like that?
I was writing both scenarios, where it doesn't correctly override and what solutions could be for that case.
This impl looks like a really good way of doing it.
It would require a lot of studying/referring to the base cog, but that can be detailed in the docstring. I don't think it is too complicated.
Thanks a lot @DMFriends !
I have no string feelings towards any of them. Feel free to use them, reword them or discard them as you see fit.
Ah, so overriding works like that? I was writing both scenarios, where it doesn't correctly override and what solutions could be for that case.
Ooh, sorry, yeah. I didn't read what you wrote properly. I just tested and it seems to work how we'd want it to, i.e.
class A(Cog):
@command()
async def test(self, ctx):
print("Test called")
class B(A):
@command()
async def test(self, ctx):
print("Subclass test called")
bot.add_cog(B())
```...
So from that, we can gather that we don't need to have any (unusual) standardised writing cogs, as they can be efficiently and effectively for the library users.
Should this PR begin to be actioned, i.e. moving over the source command? so Robin & Bot can begin to use the botcore impl
GitHub Actions run 2309447186 succeeded.
Should this PR begin to be actioned, i.e. moving over the source command? so Robin & Bot can begin to use the botcore impl
Yes, would you like to do this?
Not at the moment, if in ~2 weeks it is still up for grabs I might pick this up
Hey @Bluenix2, is this issue still stalled? I don't think I'll be able to work on it, but if it is no longer stalled you could switch the labels.
Threads are still not yet allowed to be used by the wider community except for the permanent ones created by mods and admins. Therefore, this issue is still stalled yes.
Connected!
GitHub Actions run 2312001060 succeeded.
Sentry Issue: BOT-34B
TypeError: string indices must be integers
(7 additional frame(s) were not displayed)
...
File "bot/exts/moderation/infraction/_scheduler.py", line 200, in apply_infraction
await action_coro
File "bot/exts/moderation/infraction/infractions.py", line 389, in action
await user.move_to(None, reason=reason)
File "discord/member.py", line 933, in move_to
awa...
The proposal is to add a plug-in with a command for searching snippets.
This would be a quality-of-life improvement, as currently you have to try different snippets manually to find the right one.
Example:
?snippetsearch appeal
Result: A paginated list of snippets containing the word "appeal" or a close match. The full raw snippet content would be included in the output.
aac8e9c Initial commit on the snippet-search branch - lxnn
[python-discord/modmail-plugins] New branch created: snippet\-search
I personally think that this question would be better fit for the channel description/a pin.
I can see that, let's do a pin. Would you mind if I made it?
Something like:
Some common questions related to media processing:
- Which Python package/library do you prefer for media processing?
- What exactly is media processing and how can Python be used for it?
I can see that, let's do a pin. Would you mind if I made it?
I think Zig's message in the pins answers the question about "What exactly is media processing and how can Python be used for it?" already. (that's the one I meant to highlight, but GitHub also showed the other one.
Oh, so
- Which Python package/library do you prefer for media processing?
is fine?
The question of "preferred library for media processing" is too broad to be conducive to discussion. Same with "what is media processing."
I recommend you accept most if not all of recursive_error's suggested topics.
I especially like the suggestions of whether computers can generate or understand art.
GitHub Actions run 2324521421 succeeded.
Thanks for taking on this task.
Just some personal suggestions.
Also you could perhaps replace "image or video" at places to "media" so that audio/sound is also included but I'm not sure how it'd sound/if it'd sound better.
- Can a computer truly generate and/or understand art?
- Do you know any cool tricks or optimizations for manipulating an image or a video with Python?
GitHub Actions run 2324566268 succeeded.
Description
I think it would make sense to review the current questions we have in the py_topics.yaml file and make appropriate additions/corrections.
Reasoning
I think that the .topic command is really cool and engages members more in the topical channels as well as py-gen. I don't check those channels often, but from what I've seen, .topic is used quite frequently so I thi...
You're welcome to make suggestions for new topics. Let's keep them on the issue and discuss, and once semi-finalized a PR can be raised?
Yep, that sounds like a good idea. 👍
d398f80 Grouping of snippets, and improvements to searc... - lxnn
29ebaba Bug fix; embed field value length shortened - lxnn
Implements #24
The search heuristic probably needs tuning, although we will get better feedback once mods start using the command.
Will fix linting issues later today.
GitHub Actions run 2326607405 succeeded.
Approved on behalf of @jchristgit .
[python-discord/site] branch deleted: id\-in\-delete\-logs
GitHub Actions run 2326679862 succeeded.
I do think this would be nice as a page on the site, and maybe a command linking to that page on the bot. I wrote up something a while back that could be a reference/starting point wookie184/python-guides/windows/import-error.md.
The main difficulty is that it's something where there are a lot of different situations and possibilities. Here are the sorts of questions I might ...
Let's start with the ones that don't already have topics.
For #algos-and-data-structs:
- What is a good algorithm that you know in Python? (might need to be reworded, that sounds a bit weird)
- What are some advantages of NumPy arrays over Python lists?
- What do you know and/or understand about inheritance in Python?
- What are some benefits of modules in Python?
For #c-extenstions:
- What is a good C extension you would recommend?
- How would you go about coding your own C exten...
LTGM and works locally (after fighting startup errors caused by an outdated site image for 30 minutes >.<)
I want/need to remove a thread from the bump list so I'd love to see this merged soon :)
Thanks @ChrisLovering!
# If the thread exists, site returns 204 No Content.
I was a little confused and had to search up what the 204 status code meant. This may or may not be an improvement, feel free to ignore.
2b2dc95 Make modpings rescheduling robust to unfilled c... - mbaruh
8d05a50 Manually chunk guild if not chunked 30s after s... - ChrisLovering
0d3001b Merge branch 'main' into chunnk-guild-if-not-ch... - wookie184
c527b87 Merge pull request #2152 from python-discord/ch... - wookie184
d3058d5 Merge branch 'main' into mbaruh/modpings-cache - wookie184
[python-discord/bot] branch deleted: fix\-get\-single\-bumped\-thread
GitHub Actions run 2330334572 succeeded.
Connected!
GitHub Actions run 2330356207 succeeded.
40bb274 Preliminary structure - camcaswell
92b1f70 Move Contributors role info to the Roles page - camcaswell
0de454f Remove forking and cloning sections in set-up g... - camcaswell
36b43f9 Add guide for pull requests and reviews - camcaswell
d198b3e Split up Supplemental Info and touch up Contrib... - camcaswell
Description
I'd like amsmath to be included in the LaTeX command for Sir Lancebot.
Reasoning
Amsmath is a widely used package for things such as including text in equations or aligning multiple equations. Its absence has long been a thorn in my side, and an extremely annoying one at times.
Proposed Implementation
The amsmath package should be included in the default template, so it gets imported for every LaTeX command run.
Would you like to implement this yourse...
Relevant Issues
<!-- Link the issue by typing: "Closes #" (Closes #0 to close issue 0 for example). -->
Closes #1057
Description
This PR includes the amsmath in the default LaTeX template using \usepackage{amsmath} so that people can use Amsmath commands in the .latex command.
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 ...
GitHub Actions run 2348405610 succeeded.
While we're at it, I think amssymb could be useful too.
What's the status on this?
Hello, I'd like to try addressing this issue
Hello, I'd like to try this issue as well, since it is related to the other one.
I would like to work on this issue.
Also, maximum page number doesn't seem to be 1000 (though it is documented as such), but 500?
curl "https://api.themoviedb.org/3/discover/movie?api_key=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx&language=en-US&sort_by=popularity.desc&include_adult=false&include_video=false&page=999&with_genres=18"
Response
Status code: 422
{
"errors": [
"page must be less than or equal to 500"
]
}
I'm guessing this is because I'm a new user?
I checked our bot and we get the same "page must be less than or equal to 500" so it seems the API docs may be wrong, good spot! We should probably limit it to 500 then.
GitHub Actions run 2360634846 succeeded.
GitHub Actions run 2360906610 succeeded.
Everything looks fine from a technical and grammatical aspect.
fafe8ba Add topics for #media-processing channel (#1054) - DMFriends
Connected!
GitHub Actions run 2360923377 succeeded.
For the record, I'm highly opposed to the philosophy of not updating our deps because we can, however that's not a reason to block the PR for now since it'll fix the bug. We can work on getting it working in another PR. I suspect no one will pick that up though, so I'll try to get it to it once I have some free time.
GitHub Actions run 2361040807 succeeded.
0cfe51e Bump malformed API response from debug to error... - wookie184
[python-discord/bot] New branch created: bump\-debug\-to\-error
If we're getting a malformed request response from the API, something in our code is wrong, so we should log error.
GitHub Actions run 2363586034 failed.
GitHub Actions run 2363609095 succeeded.
890d257 Bump malformed API response from debug to error... - wookie184
[python-discord/bot] branch deleted: bump\-debug\-to\-error
Connected!
GitHub Actions run 2363651229 succeeded.
8858a70 Catch correct exception in clean cog - ChrisLovering
[python-discord/bot] New branch created: correct\-exception
When attempted to reply to a message, fi the message is not found, Discord.py does not raise a NotFound error, instead it raises the generic HTTPException.
Due to this, we now except this error when trying to reply to the message.
GitHub Actions run 2363663066 succeeded.
Traced it back and the point it gets the wrong type seems to be here:
https://github.com/Rapptz/discord.py/blob/7905d63f7c988640a0848cb2a26c8dc3c3eaa862/discord/http.py#L100-L109
(called after the request sent here)
https://github.com/Rapptz/discord.py/blob/93e1ff5f074c4a2a65c48e7ca006d0f6b2eb4124/discord/http.py#L440-L444
What I can see seems to suggest discord is responding with a 2xx status code with no content (sentry shows data is an empty string), Guessing this may be an API e...
If max_length is smaller than MAX_PASTE_LENGTH, there is a chance for a very confusing error message if MAX_PASTE_LENGTH isn't exceeded while max_length is.
Reviewed from the web, no manual testing was performed.
log.info("Contents too large to send to paste service.")
Hm, is this MAX_PASTE_LENGTH limit supposed to be higher than the ten thousand in snekbox.py? I would have thought they should be the same.
Ah I should've read the PR description, my bad. Please ignore this :)
Ah I should've read the PR description, my bad. Please ignore this :)
Overall it works nicely! Thanks for working on this! I have a few documentation suggestions to improve user usability, and also I'd like to repeat the help command unideal behaviour.

Using .help is a bit confusing since it doesn't work in DMs nor any channel except for #bot-commands.
Bookmarks can subsequently be deleted by using the `bookmark delete` command in DMs.
This is a bit confusing when it's sent during a .bm delete invocation since lookup method one is not possible AFAIK, and two, we are trying to unbookmark a message. Not sure how to deal with this without duplication though :confused:
In case this hasn't been considered already, I think it would also be nice to be able to delete the embed with the issues/PR's if you type the wrong number by mistake. Or possibly a better idea is to have an edit listener so if you typed sir-lancebot#654 but you meant to type sir-lancebot#653, you could edit the message to say sir-lancebot#653 and that would automatically edit the embed with the new issue number.
GitHub Actions run 2366264340 succeeded.
4a510cc Ensure correct tag information is sent to statsd - wookie184
[python-discord/bot] New branch created: fix\-tag\-stats
Ensure correct tag information is sent to statsd
[python-discord/bot] Checks Successful on PR: #2177 Ensure correct tag information is sent to statsd
GitHub Actions run 2366505163 succeeded.
Connected!
GitHub Actions run 2366543411 succeeded.
A minor fix that should close #2171.
GitHub Actions run 2367048860 succeeded.
This should address the suggestions in issue #2170.
I have removed the obsolete description about the traverse argument in the clean bots subcommand and fixed as well as added to the description of the clean regex subcommand.
I also improved the explanations for the message or timelimit argument and their relation to the channel argument across all clean subcommands.
GitHub Actions run 2367310320 succeeded.
[python-discord/bot] New branch created: Log\-more\-data\-on\-failed\-clean
This adds request data as a sentry breadcrumb when clean cog fails, so we can understand the data that is causing the site api to error.
This also updates the log string to use % based format strings, rather than a mix of f-string and % string which caused the %r to not work.
GitHub Actions run 2367809939 succeeded.
Hard to test properlu but looks fine and doesn't seem to break anything
To aid this, we should store claimants who receive this embed in redis, for ease of implementation.
Instead of using redis, this should be stored in the database as redis is no longer being used for anything persistent.
The simplest solution is probably just to grant forgiveness to a single-message newlines violation per ~hour, along with a link to the pastebin etc.
Not sure about this one; I can't remember the last time I or anyone else needed to use amssymb in PyDis.
Although on the other hand, it doesn't really add much compile time, so whatever.
GitHub Actions run 2371997272 succeeded.
64965ca Bump Discord.py to 4cbe8f5 - ChrisLovering
ee9112a Bump flake8 tidy imports and taskipy to latest - ChrisLovering
[python-discord/bot-core] New branch created: bump\-d\.py
This fixes a bug with permission resolution when dealing with timed out members.
Discord.py have also removed the /master/ URL for docs, and are now surfacing all docs at /latest/ so I have updated the URL where our docs search for Discord.py symbols.
This also bumps 2 dev deps to latest.
GitHub Actions run 2382506853 succeeded.
GitHub Actions run 2387531049 succeeded.
GitHub Actions run 2387530737 succeeded.
GitHub Actions run 2387531532 succeeded.
GitHub Actions run 2387524760 succeeded.
[python-discord/forms-backend] Checks Failed on PR: #159 Bump flake8-annotations from 2.7.0 to 2.9.0
GitHub Actions run 2387533788 failed.
GitHub Actions run 2387538504 succeeded.
67b2049 Allow latex command in data science and ai channel - ChrisLovering
[python-discord/sir-lancebot] New branch created: allow\-latex\-in\-data\-science
Relevant Issues
<!-- Link the issue by typing: "Closes #" (Closes #0 to close issue 0 for example). -->
Description
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 contributing guidelines?
GitHub Actions run 2389702846 succeeded.
Connected!
GitHub Actions run 2391954197 succeeded.
Looks like it was reopened! Good to know
Looks like it was reopened! Good to know
@aydaultani Yep, and that's because someone brought up the issue again on the Discord server: #dev-contrib message
Looks like it was reopened! Good to know
@aydaultani Yep, and that's because someone brought up the issue again on the Discord server: #dev-contrib message
Ahaha That's amazing, well we better get working on a fix then!
What I have currently, based on @Qwerty-133's idea. I think this probably the neatest way, given we already have some custom behaviour here.
--- a/bot/exts/backend/error_handler.py
+++ b/bot/exts/backend/error_handler.py
@@ -65,7 +65,11 @@ class ErrorHandler(Cog):
if isinstance(e, errors.CommandNotFound) and not getattr(ctx, "invoked_from_error_handler", False):
if await self.try_silence(ctx):
return
- await self.try_get_tag(ct...
Thanks for doing this, I just have one comment.
I think this bit is a bit wordier than it needs to be, I think something like this would suffice (note backticks can be escaped with \):
The `regex` pattern must be enclosed in backticks (e.g. \`[0-9]\`).
If it contains a space it must also be enclosed in double quotes (e.g. "\`test [0-9]\`").

I'm not exactly sure what change the original issue was...
@mathstrains21 Hey, it's been a while. What's your status on this PR?
@doublevcodes are you still planning on fixing up the conflicts in this PR?
@dementati What's your status on this PR?
@dementati This PR seems fairly close to being done. Will you be available sometime soon to complete this?
2b2dc95 Make modpings rescheduling robust to unfilled c... - mbaruh
8d05a50 Manually chunk guild if not chunked 30s after s... - ChrisLovering
0d3001b Merge branch 'main' into chunnk-guild-if-not-ch... - wookie184
c527b87 Merge pull request #2152 from python-discord/ch... - wookie184
d3058d5 Merge branch 'main' into mbaruh/modpings-cache - wookie184
8e1c685 Remove rediscache from thread bumper now it's b... - wookie184
[python-discord/bot] branch deleted: remove\-redis\-threadbumper
GitHub Actions run 2398946032 was cancelled.
[python-discord/bot] branch deleted: correct\-exception
df48d32 Catch correct exception in clean cog (#2176) - ChrisLovering
GitHub Actions run 2398946823 succeeded.
Connected!
GitHub Actions run 2398955669 was cancelled.
GitHub Actions run 2398960846 succeeded.
@Shom770 Wold you like this PR to go up for grabs if you're not able to work on it anymore?
@katimoth What's your status on this PR?
@Krish-bhardwaj If you're not able to complete this PR, I can put it up for grabs, if you'd like.
@ChrisLovering Enhance faster!
Will you be finishing up this PR sometime soon?
@SaumyaBhushan will you be able to fix up this PR?
Probably best to add it just in case, you never know.
@Shom770 Wold you like this PR to go up for grabs if you're not able to work on it anymore?
yeah sure, i've been really busy with school 😅
Very well. Thanks for the quick response!
0ed1b4a revert bump to markdownify version - Numerlor
df99fa8 clear keys from set expires after deleting them... - Numerlor
4cdaaf4 remove leftover task cancel - Numerlor
89527e1 Expire key cache values when redis key expires - Numerlor
ab7d4b6 expire internal cache according to redis' TTL i... - Numerlor
GitHub Actions run 2399069125 succeeded.
Looks and works great to me, thank you @Autonymic! Good luck on your devops course!
Connected!
GitHub Actions run 2399086384 succeeded.
GitHub Actions run 2399088744 succeeded.
Connected!
GitHub Actions run 2399103078 succeeded.
Per recent policy changes this should no longer use the redis cache for persistent data.
@Xithrius Sorry, I am unable to set up the project due to some issues. So I can't test it locally before committing. I will not be able to work on this.
The problem is that the intent seems to be to show how to write the regex part of the command, e.g. must be enclosed in backticks [0-9], but the problem is when it appears on discord it just turns into a code block due to the [0-9] being enclosed in ``, potentially making a less knowledgeable user confused.
When I tried escaping the standard backticks with backslash the linter didn't seem to like it, so I just chose to use special unicode characters that won't turn into a code block, eve...
Ah, in that case you can escape the backticks explicitly to make the linter happy
The `regex` pattern must be enclosed in backticks (e.g. \\`[0-9]\\`).
If it contains a space it must also be enclosed in double quotes (e.g. "\\`test [0-9]\\`").
(is the same as my screenshot above)
+1 for amssymb, it has a bunch of useful stuff like \mathbb for bold letters and a billion different arrows
776a5ff Add special handling for eval command followed ... - wookie184
[python-discord/bot] New branch created: fix\-eval\-backticks
Closes #2047
I think this approach should be fairly robust. I figured this wasn't worth extending to inline codeblocks or other commands.
GitHub Actions run 2401193501 failed.
I've fixed the existing tests, although i'm not convinced trying to write new ones for this is worth it.
GitHub Actions run 2401527309 succeeded.
[python-discord/bot-core] branch deleted: bump\-d\.py
64965ca Bump Discord.py to 4cbe8f5 - ChrisLovering
ee9112a Bump flake8 tidy imports and taskipy to latest - ChrisLovering
8372934 Merge pull request #78 from python-discord/bump... - HassanAbouelela
[python-discord/bot-core] New tag created: v7\.1\.0
If the conflicts are resolved, I think this is ready to merge 🤞
There's a discrepancy in the documentation of this function: https://getsentry.github.io/sentry-python/api.html?highlight=add_breadcrumb#sentry_sdk.add_breadcrumb vs https://docs.sentry.io/platforms/python/enriching-events/breadcrumbs/#manual-breadcrumbs
I don't know how to test this so let's just try and fix it if it doesn't work.
Using exceptions was an excellent choice. Good work. Tested it with snekbox so I assume it'll work fine with the rest; don't see any code issues regarding that.
Add `extension` to the output URL. `max_length` can be used to limit the allowed contents length
to lower than the maximum allowed by the paste service.
Pastebin is the name of an actual website, so using it here would be misleading.
raise PasteUploadError("Failed to upload contents to the paste service")
Raise `PasteTooLongError` if contents is too long to upload, and `PasteUploadError` if uploading fails.
Return the generated URL with the extension.
c825718 Clean from public active threads when channels ... - ChrisLovering
[python-discord/bot] New branch created: clean\-\-\-works\-for\-active\-threads\-too
GitHub Actions run 2402296785 succeeded.
The code looks fine but I'm not sure how to test it with an actual event. Works fine with the default event though.
Why not put the caches directly in the dictionary? I am pretty sure you can manually provide a namespace string.
Also, do you think it's worth it to use MappingProxyType to make this immutable and prevent programming errors?
Doesn't work — it deletes messages in channels, but does not delete messages in threads. Does the bot have to join the thread first?
After a lot of trial and error and confusion, I can confirm it works.
[python-discord/bot] branch deleted: clean\-\-\-works\-for\-active\-threads\-too
Connected!
GitHub Actions run 2402379786 succeeded.
If that goes uncaught, won't it go to Sentry? Consider using the custom exceptions again?
Well, arguably it should go to Sentry since it's an error by the programmer to try to specify a limit higher than supported. Currently, it silently clamps it to the limit, meaning if the programmer actually intended for the limit to be higher, they wouldn't find out that it's impossible.
Ah, I see now, I read this incorrectly as the code that somehow minified the input. Yes I agree, specifying a maximum limit higher than what the paste service actually supports should not fail silently.
4553893 Reminders: merge validation into send_reminder - MarkKoz
e8e4e40 Reminders: delete reminder instead of deactivat... - MarkKoz
50b8a0c Use global bot instance instead of a bot parameter - MarkKoz
664a0c8 Reminders: refactor function names - MarkKoz
e826113 Reminders: remove redundant user arg from send_... - MarkKoz
cd921fb feat: Add the timeit command - ToxicKidz
3f04611 chore: Update tests to correspond with the time... - ToxicKidz
05fbc0a Add modpings schedule feature - Shivansh-007
a97f068 (modpings): Cancel the task before scheduling i... - Shivansh-007
547f883 (modpings): Use separate scheduler for modpings... - Shivansh-007
GitHub Actions run 2402569548 succeeded.
GitHub Actions run 2402590458 succeeded.
b863783 Reminders: use constants for max retries and re... - MarkKoz
In hindsight, the DB should have been modified to store the timestamp of the last send attempt rather than a count of failures. The latter approach is flawed because if the bot restarts immediately after failing, it will instantly try again rather than waiting.
GitHub Actions run 2402634258 succeeded.
GitHub Actions run 2402644298 succeeded.
@onerandomusername No longer disabled since #2080. Do you plan to continue working on this?
Yea, I was following the latter. I guess we can just find out.
0ed1b4a revert bump to markdownify version - Numerlor
df99fa8 clear keys from set expires after deleting them... - Numerlor
4cdaaf4 remove leftover task cancel - Numerlor
89527e1 Expire key cache values when redis key expires - Numerlor
ab7d4b6 expire internal cache according to redis' TTL i... - Numerlor
[python-discord/bot] branch deleted: Log\-more\-data\-on\-failed\-clean
GitHub Actions run 2403718805 succeeded.
Connected!
GitHub Actions run 2403730202 succeeded.
GitHub Actions run 2403746534 succeeded.
Overall it works nicely! Thanks for working on this! I have a few documentation suggestions to improve user usability, and also I'd like to repeat the help command unideal behaviour.
Using
.helpis a bit confusing since it doesn't work in DMs nor any channel except for #bot-commands.
IMO it's even more confusing if we allow it in DMs, since the Help command only...
There are currently a couple of bugs with our sending of deleted messages to site.
Race condition with antispam:
bot_1 | 2022-05-29 09:41:44 | bot.exts.backend.error_handler | ERROR | API responded with 400 for command clean until: {'deletedmessage_set': [{'id': ['deleted message with this ID already exists.']}, {'id': ['deleted message with this ID already exists.']}, {'id': ['deleted message with this ID already exists.']}, {'id': ['deleted message with this ID already e...
I'll probably create individual issues for these actually
67f88c7 Use existing ResponseCodeError attrs rather tha... - ChrisLovering
676844c Add request data as a sentry breadcrumb when cl... - ChrisLovering
c825718 Clean from public active threads when channels ... - ChrisLovering
94a5a87 Merge pull request #2182 from python-discord/cl... - ChrisLovering
2a8d5d0 Merge branch 'main' into Log-more-data-on-faile... - ChrisLovering
[python-discord/bot] branch deleted: fix\-eval\-backticks
GitHub Actions run 2404212278 succeeded.
Connected!
GitHub Actions run 2404226604 succeeded.
Hmmm. Given #2080 should have fixed the original issue, I'm not sure what the benefit of this retry approach is any more.
Hi @onerandomusername, do you still want to work on this PR or should I put this up for grabs? I kinda want to work on this hence why I'm triaging this :p
GitHub Actions run 2404716388 succeeded.
I could’ve sworn I wrote a comment on this, but it seems I didn’t. Anyways, this change is wrong because:
- This command is decorated with a
guild_only. - We don’t allow commands in DMs unless absolutely necessary.
And speaking of 1, that’s redundant since it’s the default for all commands.
This is referring to the bookmark delete command, not the bookmark command. For the bookmark delete command the defaults were overwritten to allow it in (and only in) DMs.
In that case we should probably reconsider. It's policy not to do this, and with decent reason. Core-devs please refer to the policy doc.
Having to jump between DMs and the server to delete a bookmark is not great UX, so in this case I think it makes sense to allow it in DMs. It's a very simple command (implementation) so I don't think there should be any issues caused by this.
I don't think this is better UX, considering all that comes with this (Chris left a comment about it below).
Hmmm. Given #2080 should have fixed the original issue, I'm not sure what the benefit of this retry approach is any more.
It fixed it by doing away with the author check. This means it still sends the reminder even if the user left the server.
Hmmm. Given #2080 should have fixed the original issue, I'm not sure what the benefit of this retry approach is any more.
It fixed it by doing away with the author check. This means it still sends the reminder even if the user left the server.
Doesn't fetch_user still get the user if they're not on the server, so this would do the same? If we use get_or_fetch_member then it should only (and always as it isn't reliant on cache) return the member if they're on the server, so t...




