[python-discord/forms-frontend] New branch created: dependabot/npm\_and\_yarn/url\-parse\-1\.5\.1
#dev-log
1 messages ยท Page 74 of 1
Yeah I know that hence didnโt resolve it, had a [doubt](#dev-contrib message).
[python-discord/bot] New review comment on pull request #836: Tags cog unit tests and tags cog fixes
Embed(...).set_footer(text=tags.FOOTER_TEXT) would work too since Embed.set_footer returns the instance.
Make sure to update this comment.
This PR is still missing submission validation.
These don't seem to be doing anything.
I don't like this theme at all with our background. The element blends in, and is hard to see. That being said, it seems the library doesn't provide much in terms of themes, and isn't backward compatible with older themes (I converted a few, but they don't look good), so I can live with this for now, provided we add a highly contrasting border.
I tried border: 3px solid lightgray; border-radius: 5px;, and while it isn't the prettiest thing in the world, I prefer it to what we currently h...
How commonly will this be used? The user can get the cog through the bot var manually instead of it being exposed here and adding the unrelated cog code
# It's important to wait for init_task to be cancelled before cancelling scheduled
This can use the allowed_strings converter instead of being handled manually
5add89c Update warn to warning, due to deprecation
- ChrisLovering
2b5da3f Remove unneeded context manager in Metabase cog
- ChrisLovering
[python-discord/sir-lancebot] New review comment on pull request #583: Add the stackoverflow command
I think I am using the reddit upvote emoji
[python-discord/sir-lancebot] New review comment on pull request #583: Add the stackoverflow command
I did use the reddit comment emoji, my bad I forgot to share the images
[python-discord/sir-lancebot] New review comment on pull request #583: Add the stackoverflow command
If you are using the reddit upvote emoji, why is it named stack_upvote?
[python-discord/sir-lancebot] New review comment on pull request #583: Add the stackoverflow command
I did use the reddit comment emoji, my bad I forgot to share the images
If you are using the reddit comment emoji, you need to use the same id and name, that is: 
Nice! I'll remember that one for future. Thanks.
Fixed in https://github.com/python-discord/bot/pull/1573/commits/a870c1a72e5a8664bac5049ad60e323bea7e399d
No reason, other than my slight naรฏvety with aiohttp.
Changed in https://github.com/python-discord/bot/pull/1573/commits/bc7c0990a151cd5a0f5d1681aa25014b392b567f
Other than the redaction, this looks good and works locally.
coeffs = random.sample(range(1, 6), 4)
Isn't this essentially the same?
oh, that works?! that's amazing! i'll change it right now
[python-discord/bot] New branch created: ping\-bugs
Description
Closes #1407.
Changes
- Improves parsing of site URL, to make it work locally and in prod. This has been tested in prod, locally, and on docker.
- Changes the output of the bot latency for when ping is < 0. This is usually caused by a desynced closk. Interestingly, the docker container is always a few seconds out of sync, even after syncing my system clock, and rebuilding the container. This seems like a docker problem though, so I'm not quite sure how to fix it.
##...
I'm happy to work on this together with someone more experienced, per the discussion in #dev-contrib.
I'll also work with @magicandcode on this :P
Assigned as per discussion here: #dev-contrib message
Tested, works as expected
Note that site ping doesn't work on some systems due to requiring root to do ICMP messages, but the error is handled so that's fine!
Maybe we could format it in the questions, for example you could do ... {:b} ...
embed = discord.Embed(
color=discord.Colour.red(),
title=f"The correct answer is/are **`{', '.join(answers)}`**\n",
)
Description is not required.
pog suggestion, i can't believe i forgot about the second param on get lol
Connected!
GitHub Actions run 825960533 succeeded.
GitHub Actions run 825964290 failed.
GitHub Actions run 825964423 succeeded.
GitHub Actions run 825964432 succeeded.
i thought about that too, but decided to use lambda instead. if you think operator would make it more concise, then sure!
GitHub Actions run 825974057 succeeded.
GitHub Actions run 825974053 succeeded.
GitHub Actions run 825980272 succeeded.
GitHub Actions run 825983281 succeeded.
GitHub Actions run 825983286 succeeded.
GitHub Actions run 825981660 succeeded.
yes, i forgot about that since original code used it and i thought it was necessary. resolved
walrus comes clutch again with satisfyingly simple yet elegant solutions. resolved
Connected!
Connected!
GitHub Actions run 825997008 succeeded.
GitHub Actions run 825997124 succeeded.
GitHub Actions run 825997119 succeeded.
GitHub Actions run 826011880 succeeded.
Is there a reason this is split over 3 lines, the repo is configured to have a max line length of 120 so this just seems like default black formatting
There should be a space at the end here ("Game is already running...") so that it formats correctly in chat
another instance of black formatting not necessarily being better
f-string not needed on this line
f not needed. Didn't python-discord/bot have a rule for disallowing (on lint) string literals with extra f?
(is probably a subject of separate PR)
splitting it into two f-strings? that was from me, i thought it would be more understandable that way
At this length (i.e. short) it just kinda spreads the code out, rather than helping very much with readability
Looks good to me, except these small things.
Remember to from typing import Dict, List, Optional
self.session_token: Optional[str] = None # session_info["session_token"]: str
self.session_expiry: Optional[float] = None # session_info["session_expiry"]: UtcPosixTimestamp
Shove comment into docstring.
self.exports: Dict[int, List[Dict]] = {} # Saves the output of each question, so internal eval can access it
The lint rule should also be present on lancebot, using f strings is fine when joining strings like this (and afaik preferred, the misaligned strings look weird)
So, consensus during the staff meeting is that this is something we want.
- It is an opt-in command that a person has to run
- It will DM the person who ran the command when they post their first message in newly opened help channels
https://pythondiscord.com/pages/contributing/style-guide/#mood
Imperative mood and present tense usage is preferenced when writing docstrings.
Use:
"Build an information embed."
Don't use:
"Returns an embed containing information."
Is this opt-in command going to be permanent, or per channel?
will be resolved in future commit, currently resolved it in my clone
will be resolved in future commit, currently resolved it in my clone
I don't think the comment really belongs in the docstring, the docstring documents what the function does, while the comment explains why the callback is used which is not exactly important to the caller/user.
Although I'm not sure whether doing this is necessary, as I understand it the cancellation exception will be thrown in the coro before it has a chance to execute anything else
This issue proposes a command that lets you find help channels you have recently been active in: !recent
The premise of this command is that if you're helping in the help channels, or have claimed help in one, and you wish to find your way back to that channel/channels, you can run this command and it will list the help channels that you have been active in during the past X amount of time (I'm thinking 10 or 15 minutes currently).
My current thoughts on implementation are:
- On mess...
fb556c6 Fixes Expected Token Revoke Status Code - HassanAbouelela
[python-discord/sir-lancebot] New branch created: reddit\-revoke
This seems similar to #1567 to me.
We talked about it during the staff meeting they are 2 different Ideas and I believe everyone voted for this correct me if I am wrong @vcokltfre
this one is from me too, for the same reason as the previous f-string literal concatenation. i thought it would improve readability, and this one is quite long too
Understood, thanks for clearing that up!
Proposal
Currently, if a user opens a help channel they have the "Help Cooldown" role until they close the help channel or until 15 minutes has passed, whichever occurs first. This allows a person to open multiple help channels if they wait 15 minutes and don't close their first one. This has led to some sub-par help sessions since a person is trying to get help in multiple channels and it's a bad experience all around.
During the staff meeting, the consensus was that we wanted to enfor...
Relevant Issue
[Sentry error, and me dissecting it](#dev-alerts message).
Description
The reddit cog has a util to revoke a token. The util checks the status code of the revoke endpoint for code 204.
The reddit docs make the following claim:
Note: Per RFC 7009, this request will ret...
as discussed [here](#dev-contrib message), not reverting it. everything resolved :D
This comment is really redundant tbh.
- We get a
TimeoutErrorwhile waiting for a reaction to time out - There's a logging message explaining what's going on
The next line makes total sense without the comment. It's how many commands in the bot operate.
the Python Discord style guide tells to phrase the docstrings in an imperative way, i.e.
Build the embed to DM the bookmark requester.
Correct me if I'm wrong, but in the staff meeting didn't we decide that we should not delete but instead mark a name as "out of circulation", if so, this will require an additional site PR.
Ok, so what should the command be. !remind is already taken, I was thinking something like !remember. Any ideas?
GitHub Actions run 826073049 succeeded.
GitHub Actions run 826078720 succeeded.
GitHub Actions run 826078716 succeeded.
Ok, so what should the command be.
My suggestions would be !helpdm on/off with nice documentation detailing what it does, though we could also hook it into the proposed !recent command do !recent subscribe and !recent unsubscribe.
Is this opt-in command going to be permanent, or per channel?
@JakeM-Git @dawnofmidnight I think the proposed feature is permanent per user. You subscribe and anytime you interact with any help channel that is in use you get a DM. I may be misun...
I think that having options for both permanent and non permanent would be nice, but that's just my take on it.
Temporary does not make sense, the feature is for you interacting with the help channels, not others.
Ok, so have a toggleable command. I like the idea of that how will be go about storing that? Just in the db?
Lance's Colours also has soft_red which is commonly used in error/incorrect-style embeds like this one
'do' doesn't really fit here, I think it should be something more like "You must choose to complete at least one question."
Looks like i missed this in the first round sorry, but another instance of it being split over several lines unnecessarily
Yep, a Redis cache mapping user ID --> boolean is all that is necessary.
Temporary does not make sense, the feature is for you interacting with the help channels, not others.
What if you don't want to get DMs for every help channel you send a message in, only a specific one?
I don't follow how that is useful. The feature is not to receive notifications when there is activity in the channel (though we may revisit that down the line), it's to store a record of which help sessions you interacted with in your DMs.
I can't think of a scenario where you would only want a record of interactions with #help-banana but not #help-apple, if you enable this feature you likely want notifications for all sessions you help out with in.
Again, going back to the example, if ...
Yep, a Redis cache mapping user ID --> boolean is all that is necessary.
Alright, sounds good.
I don't follow how that is useful. The feature is not to receive notifications when there is activity in the channel (though we may revisit that down the line), it's to store a record of which help sessions you interacted with in your DMs.
I'm confusing multiple unrelated projects, my bad.
Are you sure this will work well with numeric answers? 1023451 is pretty close to 1023145, but not the right answer
it will, since all numeric answers are pretty small, enough so that one little change will make it smaller than the ratio
i actually have no idea, all this was in the original code done by other people, i only added new stuff. so you'd have to ask them
wait actually, for consistency i won't. random.randint has been used throughout the entire code
yes! that makes it much more concise. resolved
omg i just discovered that, and it's amazing! resolved
done! also, didn't know there was python_blue haha
hm, but this is also sent when the correct answer is sent. i'll make it green lol
I forgot to mention last time too, this should also probably be a constant from Lance's Colours
unfortunately it is not... we should add it!
unit = random.choice(list(UNITS_TO_BASE_UNITS))
Looks like I missed this one too, this would all fit fine on one line
Two points here:
- This should be a Lancebot constant not a d.py colour
- Red usually signified failure or an error, perhaps a different colour for the start embed?
no this isn't explaining the randint itself, it's explaining that since the minimum possible mod is 10, the maximum remainder can only be 9. should've made it clearer, though... i'll do that!
resolved with a new variable word in a ternary condition, and this variable would be in the f-string
No description is set here, which means the description += a few lines down raises a TypeError
The description is set here leading to the description += calls later raising a TypeError
GitHub Actions run 826279867 succeeded.
GitHub Actions run 826279914 succeeded.
GitHub Actions run 826301760 succeeded.
GitHub Actions run 826301762 succeeded.
GitHub Actions run 826326641 failed.
GitHub Actions run 826326719 failed.
GitHub Actions run 826331338 succeeded.
GitHub Actions run 826331334 succeeded.
GitHub Actions run 826341743 succeeded.
GitHub Actions run 826341731 succeeded.
Looks good to me! Tested locally and the logic is working perfectly, I do have a couple of nitpicks, however:
- The remaining questions still show even after the quiz ends, this ends up looking strange because it says
Let's move on to the next question.when there are no more questions - The embed is a bit - for lack of a better word - strange, at the end of the rounds. By this, I mean that it's odd that even if you got the correct answer it says "The correct answer is", suggesting that y...
According to my testing, no code reviewing (hence why I'm not explicitly approving), the code works well.
Perfect! Unless something else pops into my head later on I'm pretty sure this is ready to go in, nice job!
[SELECT YOUR POGGERS LEVEL]
pog
poggers
kilopoggers
megapoggers
gigapoggers
terapoggers
petapoggers <-
exapoggers
zetapoggers
yottapoggers
39350fb Switch from fetch_member to fetch_user - ChrisLovering
7725a02 Download avatars as size 1024 to avoid very lar... - ChrisLovering
94a9550 Add the number of squares that were used by .mo... - ChrisLovering
28f0c10 Correct grammer in the new mosaic command output - ChrisLovering
e929d6b Update return type hint to reflect new behaviour. - ChrisLovering
[python-discord/sir-lancebot] branch deleted: change\-to\-fetch\-user
Connected!
gold is already a color present in discord.Colour.gold().
Brackets are redundant here
coeffs[2] * x + coeffs[3] * y,
Did you run black on the code?
I didn't understand why this was done here.
If you go with plan one, can you store that information in an async redis cache? How will you handle the daily non-deleting rerolls (since those also count towards the rate limit)?
If you're worried that plan one would slow down development too much, you can go with plan 2 for now and we can plan to migrate to plan 1 later. The underlying logic for the actual deletion-reroll should be unaffected.
We can use async redis cache. I believe async redis cache does not accept dicts as a ...
Red signifies that it's an error or in some way incorrect throughout the rest of the bot and even within this cog, so it makes no sense to have the starting embed be red too
The general style in the project is to have the * on its own line
I think using .format instead of the replacing would be a bit clearer
Why is this not an instance method on the cog if it uses the cog's state?
Consider making it a method and accessing self.bot rather than passing it as a param.
The return type annotation can be extended to be List[Embed].
Does this need to convert to string?
Instead of processing all and then returning the first 10, it may make more sense to return after processing 10.
Do you have ideas for making it more readable.
No, that is not intended behavior, I will change them.
There was a test failing because of this, I will still re-look into this.
This approach is problematic for a number of reasons.
* The attribute will not exist until the coro completes. This means that if a reaction triggers an event, it will fail on an attribute error. At the very least, code accessing this attribute must await the task. * According to the docs, [`fetch_webhook`](https://discordpy.readthedocs.io/en/stable/api.html#discord.Client.fetch_webhook) will raise rather than return None if not found. This code assumes it will return ...
Good point, I will do the necessary changes.
yes, but this was from me. "sparse is better than dense"... but now thinking about it, it does look redundant. resolved
because when it's multiplication the two operands should be smaller, making it easier. will document that in the code, resolved
will change to better error message, resolved
readability matters. i know that the limit is 120 chars, but i believe it looks cleaner
you is you, no matter the plurality. it's english
GitHub Actions run 828087062 succeeded.
GitHub Actions run 828087065 succeeded.
GitHub Actions run 828091901 succeeded.
29aa72e Code snippet: support the two dots syntax - Akarys42
[python-discord/bot] New branch created: snippet\-add\-two\-dots\-support
Lines can be highlighted in GitHub using the L00..L42 syntax, currently not supported by the regex. This commits adds it.
This is actually a duplicate issue! #718
This is actually a duplicate issue! #718
#718 is about adding another field to the infraction for the unban reason, but it will have to wait until the api rewrite. This issue propose a temporary solution of simply adding the unban reason at the end of the infraction reason.
This issue is a proposal to add a tag for dotenv files, explaining what they are, why to use them, and how to use them in python with python-dotenv
@Objectivitix I'm not asking because I really want to know, I'm asking because it's not clear what this part of code means. And it's important that code is clear for others to read.
So while you're adding some feature, it might be a good idea to make the code better explain itself.
I meant that it would probably be better to rephrase the comment
@Objectivitix I think random.randrange(0, 10) would be better here (and in the previous case I reviewed)
the .keys() version is more clear to me, but I guess that's subjective
Actually, I don't think this function needs any explanation. But because it's required in the linting, you have to provide a dummy string.
If you mark the function as private (with a leading underscore), is the docstring not required?
Apart from the unresolved conversation[s] from before, LGTM
@decorator-factory for the random.randint, yes it would make sense to use randrange instead for that specific line, but then it would break the consistency. the other i've already explained; i didn't create that original code so i don't really understand it either, i simply added some stuff to and refined the parts i DO understand from analyzing at the start of the project
regarding the numeric values won't work well with fuzz, i thought about it and i think you're right. i'll see if i...
This description kwarg is optional.
embed = discord.Embed(
colour=Colours.blue,
title="Score Board",
)
embed.description = (
If the above comment is resole then you could do this.
but without this the code below (for loop with augmented assignment on description) won't work, as described by @vcokltfre
same thing here, the below for loop won't work if i removed that line
however if this is applied and above condition was passed during execution, the "information" thing would be overwritten
@ToxicKidz all the description="" and embed.description += something are there for a reason... sorry but i can't use your changes
[python-discord/bot] New branch created: vcokltfre/tag/dotenv
Closes #1578
How it looks:

I would add a small PyPI link where you mention python-dotenv, but it looks pretty good, thanks a lot!
772fa4b chore: add pypi link for python-dotenv - vcokltfre
[python-discord/bot] branch deleted: vcokltfre/tag/dotenv
Connected!
GitHub Actions run 828482380 succeeded.
GitHub Actions run 828502489 failed.
GitHub Actions run 828502509 failed.
indeed. see previous conversation with vcokltfre about why the changes were applied.
Can you get the link for the particular comment?
I still donโt agree with this, I would like to see what others think about this, so it wonโt just be mine and your preferences.
You should keep commit titles short. If you want to add more detail you should do it in the commit body.
Personally, I think that just cancelling would be better. From what I've seen. 0 usually means cancel. Maybe someone was just trying it out, so hitting them with 6/7 questions can be annoying.
they are short? almost all under 50 chars, except for one
I agree on the first part, since the comment describes why we do this, and the caller may not necessarily care.
As for the reason for the callback, I didn't really think about it too much, as this is a common pattern throughout the bot, such as in the Silence and Stream cogs. https://github.com/python-discord/bot/commit/2fd2c77035e87dde009c39aa7345e4871d5b41df
I'm not too familiar with the inner workings of asyncio tasks, so I can't say for certain whether this is needed or not.
sometimes it's 7 or 8 chars more bc it's one word, i can't put that one word in the description it would be too weird
I disagree, if it were half way through execution or something that might make sense, but given its an initial argument it should just error
Connected!
I missed that, thanks. c896414b
This method was only intended to be used within the scope of this cog, so I hadn't considered any problems with that log. I see what you mean though, but it would add useless complexity if we had to convey to the caller that a channel was created. I opted instead to remove the temporary part so the function is not assuming intentions. d9ff7575
I moved the functions to be closer to their callers. 0253f8f6
I'm not quite sure how to do that, could you clarify?
I'm not sure what to call it either. Manual implies there's an automatic overwrite, but that's not really the case. A channel either follows the category's overwritten, or it is manually overwritten. I dropped the overwrite part for has_channel_overwrite, but I'm happy to change it again. 52bfbf31
I think that is better, can't really come up with something that'd properly describe what it is without being overly verbose
Adding a replacement field like the one in MSG_SILENCE_SUCCESS https://github.com/python-discord/bot/blob/880038c61b8c05042593c84b7ce45b22daf9d307/bot/exts/moderation/silence.py#L25 and then filling it with .format on the source_reply/message
I believe this is equivalent.
time = arrow.utcnow().shift(seconds=delay)
It has to wait for reschedule_task to finish first.
Why is there no cancel()?
I have created a command called "half" which will display half of a members avatar.
Pull requests need to have an issue linked which is approved by a core developer and assigned to you, as well as filling out the PR template correctly.
I have created a command which will display a cropped version of a members avatar.
I don't understand why you closed #728 then opened this one? The same things that were said there apply here.
Please send a message in discord to the dev-contrib before taking any more actions.
Description
This command will create a mini game, called Anagrams.
To sum it up, Anagrams is a word game, where you make words from given letters.
This game will be implemented in Sir LanceBot to play with
Reasoning
It is a fun minigame where anyone can participate. The game tests how well you are at making words, and can get a bit competitive
Proposed Implementation
Me: .anagrams
Bot: Sends an embed showing the letters
Me: Crate (bot reacts with a check if the word...
Ok yeah the test fails, with TypeError: expected string or bytes-like object, if the str() is not present.
When .mosaicing ur avatar with some wrong input u get an example with .avatar_modify Mosaic and not .mosaic
I do not follow sorry. :smile:
The code is quite good (havenโt tested it yet). Three small things on the questions.
โsecond lawโ should probably be a valid solution
"question": "Which theorem states that hypotenuse^2 = base^2 + height^2?",
I probably forgot to add it after turning the scheduler into an attribute.
The issue is probably our new limit to infractions returned from the site API, combined with the heavy mass ban we recently did. We have probably crossed 100 active infractions since those were applied, and as a result, they don't show up to be rescheduled when the scheduler restarts.
It does appear to have an easy temporary fix though, reschedule_infractions() should add a filter to the site query to ignore permanent infractions.
A permanent fix would be to remove the pagination cap ...
I don't understand why you closed #728 then opened this one? The same things that were said there apply here.
Ah shit yeah I didn't see the comment
A permanent fix would be to remove the pagination cap for this specific request in the site api.
I think we would be better making the site endpoint an actual paginator and walking through it rather than bypassing the paginator for this specific request.
Hey, this is because the command itself is .avatar_modify mosaic, because it's in the .avatar_modify group. The reason you're ale to invoke like .mosaic is because it uses root_aliases. The qualified name for the command is .avatar_modify mosaic, so the tooltip isn't wrong.
I think we would be better making the site endpoint an actual paginator and walking through it rather than bypassing the paginator for this specific request.
Yeah. As-is no pagination info is sent, but we can naively paginate by just scrolling until we run out of results. We will really want to make sure that filter for non-permanent is enabled, though, otherwise we're just stacking our permanent bans into an ever growing boot delay.
ah ofc, how could've i forgot about that! it was a superscript in the docs (original database) so copy paste error lol. resolved :)
no, this is an easter egg (no correct answer) since no one has ever proved or disproved the riemann hypothesis yet xD
When a user says 0, it means they don't want to play any questions.
Then why would they input the command? This is another reason why 0 should be default
[python-discord/bot] New branch created: 39\-poetry
Description
Bumps the python version to 3.9 (.5 in docker), and switches from pipenv to poetry as the package manager.
Changes
- Pipfile, Pipfile.lock -> pyproject.toml, poetry.lock
- Dockerfile Python 3.8 -> 3.9.5
- Dependency feedparser updated due to a bug in the older version
- CI Pipenv -> Poetry
- Documentation Pipenv -> Poetry
- Add python-dotenv
This is a good time to bump python-discord/sir-lancebot#623 which was stalled by the same dependency this PR was.
GitHub Actions run 832731685 succeeded.
GitHub Actions run 832731687 succeeded.
GitHub Actions run 832726238 succeeded.
GitHub Actions run 832735066 succeeded.
GitHub Actions run 832735078 succeeded.
GitHub Actions run 832741447 succeeded.
GitHub Actions run 832741354 succeeded.
GitHub Actions run 832739751 succeeded.
GitHub Actions run 832741889 succeeded.
I completely understand and I would definitely add better documentation to the original code (made by others) if I could. However, even though I did do an analysis over the code before this project even started, I don't have the level of understanding of the previous quiz's code like its original programmers. Thus I cannot document it or else I might even mislead others. From what I understand, it's subtle differences of channels or something.
I'm not sure how good an idea this is when we're this far along the development process, but I'm thinking of changing up the interface for the silence command. When testing recently, I found it very clunky, especially compared to the other moderation tools. Most commands (ban, mute, etc) have the format: !<command> <target> <duration> <other args>, compared to silence which has <duration> <target>.
This was originally done because the current usage of silence is either !silence or `!...
[python-discord/bot] New branch created: ytdl\-pytube
Following questions about using pytube to download youtube videos, the ytdl tag was amended to explicitly mention pytube, and implicitly any other youtube video downloader.
The name is unchanged, as people are already familiar with the tag.
Per [Python Discord's Rule 5](https://pythondiscord.com/pages/rules), we are unable to assist with questions related to youtube-dl, pytube, or other YouTube video downloaders as their usage violates YouTube's Terms of Service.
b65017b Update bot/resources/tags/ytdl.md - HassanAbouelela
Committed, and we should probably squash before merging.
Connected!
We shouldnโt go on what is the probability of something happening, if thatโs possible there needs to be a solution to that.
Just heron should also be a possible answer.
"question": "Which theorem states that hypotenuse^2 = base^2 + height^2?",
ERROR: test_on_message_incident (tests.bot.exts.moderation.test_incidents.TestOnMessage)
According the second point, if the fetch for the webhook fails it would raise an error (HTTPException , or NotFound) rather than returning None. So there isn't a need to check if the webhook was fetched successfully or not, since if the error would be raised it would be logged into Sentry automatically.
The override file is read by docker compose automatically and can be used to customize the configuration locally
@Shivansh-007 @vcokltfre the 0 as default has been fixed. now it should raise an error message (which has also been modified).
This issue proposes a new tag that explains some basics about asyncio and concurrency. Essentially the content would be along the lines of:
- What's an event loop?
- How does it work?
- How do I use it?
If approved I'd like to write this myself
AMAZING! I WOULD LOVE THAT BECAUSE WE HAVE A LOT OF ASYNC/AWAIT QUESTIONS
GitHub Actions run 836295060 succeeded.
GitHub Actions run 836303658 failed.
GitHub Actions run 836306948 succeeded.
GitHub Actions run 836306954 succeeded.
Connected!
[python-discord/sir-lancebot] branch deleted: vcokltfre/feat/ping\-uptime\-merge
Connected!
Description
When not specified there should be a random dog or cat pic response.
EX: .status cat and .status dog would be unchanged but if .status 404 was entered it would choose dog or cat randomly.
Reasoning
This would be useful if you dont care about the picture and are using the command to find the meaning of the status code.
I use it for this reason mainly. You just dont need to know/spend time typing an extra argument when you dont care.
Proposed Implementa...
39350fb Switch from fetch_member to fetch_user - ChrisLovering
7725a02 Download avatars as size 1024 to avoid very lar... - ChrisLovering
94a9550 Add the number of squares that were used by .mo... - ChrisLovering
28f0c10 Correct grammer in the new mosaic command output - ChrisLovering
e929d6b Update return type hint to reflect new behaviour. - ChrisLovering
[python-discord/sir-lancebot] branch deleted: reddit\-revoke
Connected!
#485 adds many redirects (see here). Do we know what others might be needed?
I put it up to a vote with the mods, and most people were leaning towards making the first argument accept either the duration or the channel, so I did that. From my testing, the converters are able to properly choose between a channel, and an int, so not much work was needed.
The subject of the !shh command did come up during discussions. One concern raised was the disparity between the interface of two very similar commands. I'll try adding an optional channel argument, but I'm not sur...
backend? i'm adding more stuff for user features
hmm... might be because the code had been heavily modified to fit with the new image questions and dynamic questions lol
well it's not going to harm the game, there's no correct answer so no one will get the points. just a fun little easter egg.
Relevant Issues
<!-- Link the issue by typing: "Closes #" (Closes #0 to close issue 0 for example). -->
Closes #628
Description
Added Music cog with the command .music. Fetch data from Last.fm via the Last.fm API. Access the API through a custom asynchronous API interface based on aiohttp. Initially, pylast was used. However, it does not operate asynchronously.
Did you:
- [x] Join the Python Discord Community?
- [x] Read ...
e08feec chore: add setup instructions to readme - vcokltfre
[python-discord/quackstack] New branch created: vcokltfre/chore/readme\-update
[python-discord/quackstack] branch deleted: vcokltfre/chore/readme\-update
f5135f1 chore: switch around docs urls - vcokltfre
[python-discord/quackstack] New branch created: vcokltfre/chore/docs\-urls
Since redoc is easier to understand and easier on the eyes at a glance, this switches around the default docs locations:
/docsis now the redoc endpoint/swagger-docsis now the endpoint for the default swagger generated docs
[python-discord/quackstack] branch deleted: vcokltfre/chore/docs\-urls
[python-discord/quackstack] New branch created: docs\-path\-fix
323aedc fix: use slash-prefixed url for swagger_docs - vcokltfre
[python-discord/quackstack] New branch created: vcokltfre/chore/docs\-urls
#42 introduced a fault which should have been caught at the review stage :neckbeard:. I have fixed the fault :neckbeard:.
[python-discord/quackstack] branch deleted: docs\-path\-fix
[python-discord/quackstack] branch deleted: vcokltfre/chore/docs\-urls
it is almost done, i just need to change the code a bit and change some responses to make it look neater.
I would like to implement this
It took some figuring out, but now both changes have been made, and the PR is ready for review again.
#485 adds many redirects (see here). Do we know what others might be needed?
There are, namely the content pages which I am in the process of migrating.
I think other redirects worth considering are shortcuts for some of the regularly visited links, examples being a link like https://pythondiscord.com/rules, which don't lead to anywhere at the moment (canonical link ...
I don't think it is fun but more frustrating than anything to have a question that doesn't have an answer. Can you please remove it?
It's failing because it doesn't mock the content attribute. So accessing it will resolve in a MagicMock instance. By converting it to a string in the tested code, you're running the regex on the following string:
"<MagicMock name='mock.content' id='...'>"
Either way, I guess what I'm trying to ask is whether there's any reason to be converting the attribute to a string. The docs don't seem to ...
Again, this looks off. For message_id, either the annotation is wrong, or it doesn't need to be converted to an int.
This seems inaccurate. Detection wasn't skipped, it just didn't detect anything. :smile:
This is minor, but the docstring refers to a param name from a previous revision (presumably) that doesn't exist anymore.
This was added, as it was having the same issue as this. Will do the required changes.
Connected!
As a pure code review, this looks good to me
Looks like an overall reasonable and well-coded approach. Let's just make sure we've got everything we talked about in #dev-core and I think this is good to merge.
Description
I'm not even sure if this is worth a pull request, I was literally bored and while sifting through the source code I saw this lol
"Handles errors" should be "Handle errors" (in the imperative mood, as described by the PyDis Styleguide.)
Can we get a speedrun merge??
speedrun!! let's try to get this pr merged in 8 hours
In the context of what a cog is, I don't think this is actually necessary, hence I'm revoking my approval and closing the PR.
There will always ever be only one ErrorHandler, if we move it to a generic package shared by Bot and Sir Lancebot then we could investigate changing docstrings to this form, but for this it doesn't make sense.
PR speedrun any% [FAILED]
reason: joe had second thoughts
sad
PR speedrun 100% approved, lint passed, then closed
10 minutes
we broke a record.
The code is quite good (havenโt tested it yet). Three small things on the questions.
Connected!
make sure to re-delete the reddit constants before merging.
29aa72e Code snippet: support the two dots syntax - Akarys42
0af0e02 feat: add dotenv tag - vcokltfre
772fa4b chore: add pypi link for python-dotenv - vcokltfre
ac5a495 Merge pull request #1579 from python-discord/vc... - Akarys42
00984df Merge branch 'main' into snippet-add-two-dots-s... - Xithrius
@ToxicKidz ive resolved the changes you requested
@janine9vn ive resolved the changes you requested.
Alright @Shivansh-007 changes you wanted are resolved
I would like to point out that both ghostbusters and turkey characters are also very big, we should suppress HTTPException just in case the output is too large.
Maybe we should filter dragon, trex, and stegosaurus out of these char_names since they aren't actually available.
You should change this type hint to bot.bot.Bot here and in the setup function, since that's the type of the bot.
[python-discord/bot] branch deleted: extract\-metabase\-data
7ece67b Add constants for Metabase cog - ChrisLovering
bb8c3b7 Add new cog for extracting data from metabase - ChrisLovering
4b18602 Remove metabase redaction of link used while te... - ChrisLovering
24fbbf6 Save query outputs to the internal eval environ... - ChrisLovering
51fc84c Add comment to int e for context with Metabase ... - ChrisLovering
Connected!
I forgot to mention this, but why are we lowering the text here?
Instead of doing this three times, you can just do raise commands.BadArgument(error_message), and the error handler will catch it.
Defining logger and importing logging is redundant here, as they are not getting used.
You should be importing the Cog at runtime to prevent side effects like defining RedisCache instances too early.
Why not make it a proper dataclass/namedtuple?
You already imported operator, maybe use itemgetter(1)? :-)
why is that preferred over simply using a type alias? also, how would I make it lol
yessssssssssss lambdas bad! imported functions good!
got it, will be resolved in a future commit i'm planning rn
6ad0184 Make tests expect 302. - kosayoda
Discord recently redid their branding, and have started using a new blurple color. I think we should rebrand the pydis logo(s) to fit the new color.
[python-discord/sir-lancebot] New review comment on pull request #583: Add the stackoverflow command
since I was using it for stackoverflow, I thought I'll rename it to stack_upvote so as to avoid confusion between the emojis.
Hey @lemonsaurus I'd love to take this!
[python-discord/sir-lancebot] New review comment on pull request #583: Add the stackoverflow command
I don't think we'd be using a new environ variable for this, especially since it would be the same emoji.
hey @lemonsaurus is this availiable??
@Kronifer vco is interested in taking this as shown above, but on top of that this issue is currently blocked pending futher development on QuackStack, there are a few things we need to do before we should slot it into a production application.
You are welcome to contribute to quackstack though, and I'm sure that if you ask in #dev-contrib then you can find out what needs to be done to get that project into a more ready state.
alright, sounds good joe, ive been looking into the readme
it is, but we're waiting on more things to be ready to do this.
For example, the issue mentions PyPI installation and API usage, things we should probably bring to a more production ready state before we start writing lots of documentation.
So then, wait for the cli to be finished, and seeding iirc
GitHub Actions run 839786553 failed.
GitHub Actions run 839786556 failed.
GitHub Actions run 839794212 failed.
GitHub Actions run 839794218 failed.
GitHub Actions run 839798047 failed.
GitHub Actions run 839798053 failed.
GitHub Actions run 839803968 succeeded.
GitHub Actions run 839803977 succeeded.
@decorator-factory your changes have all been implemented (except for major refactoring) :D
such an impressive pr. absolutely IN C R E D I B L E
a75ec75 Fix default margin on error pages - bast0006
[python-discord/site] New branch created: bast0006\-patch\-error\-page\-margins
This removes the scrollbar from them
Would be nice to have one more set of eyes and testing over this.
Nit picking, to maintain consistency, leave a line here, like you did for api.py.
Nice use of dataclasses, just a bit overkill of using typehints on all variables.
Footer text only gets used once, so I think we can directly put this inside the set_footer method.
Type-hints should only be present, when the type is unknown or difficult to understand from the code, I know this is a minor thing but there are many of those here.
There was a short discussion on discord, [here](#dev-contrib message).
[python-discord/site] branch deleted: ks129/dewikification/redirection
When type-hints, are too big they are put into a variable with snake case, which is wrong as they are type of Type Classes. And therefore need to follow Pascal Case, like it can seen in this real python article.
Screenshot of the exact section:

It can also be seen on the [python docs](https://do...
This PR removes wiki features and authentication from the site.
- Event pages and sidebars are static pages at
pydis_site/templates/events/pages - Resources are now loaded from
.yamlfiles atpydis_site/apps/resources/resources - Content pages (guides, rules, etc.) are now loaded from markdown at
pydis_site/apps/content/resources/
How to Review
- Run the branch locally.
- Compare each page with the corresponding page on the current website.
- Don't suggest grammar/ph...
Adds a docker file that builds the frontend, and a docker-compose which houses the backend and the frontend.
The main thing missing from these changes is that file reloading does not work. Webpack-dev-server by default enables the webpack watch option, but for whatever reason, it doesn't work in the docker build. I've stumbled upon this SO post multiple times in my search, but nothing I tried worked.
...
Connected!
Another idea, which would also reduce load if we have lots of bot restarts, is to change rescheduling from a "on-startup" to an hourly task. Each hour, grab the infractions that would expire by the end of the hour, and schedule them. That way there's a rolling run where we only schedule soon-to-be-expired infractions. This sidesteps the issue of having to filter out permanents and gives us a lot more headroom under the paginator, and even if there are >100 expiring they'll simply "spread out"...
I personally think that docker-compose.yaml should be renamed to docker-compose.yml to ensure consistency with the other repositories.
Relevant Issues
#731
<!-- Link the issue by typing: "Closes #" (Closes #0 to close issue 0 for example). -->
Closes #731
Description
When cat or dog subcommands are not invoked the parent command (http_status) will show a cat or dog picture, relating to the status code given, randomly.
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...
This docstring may need to be updated.
This check can be removed since it only gets invoked without a subcommand.
We should use random.choice, and instead of using get_command, you could do self.http_cat/self.http_dog.
I haven't done a full code review, but from some smoke tests on the site, along with integration tests with the bot all seems to be working to me!
cc979fc fix: USE_FAKEREDIS is uppercase - vcokltfre
[python-discord/site] New branch created: vcokltfre/fix/uppercase\-env
The environment variable USE_FAKEREDIS should be uppercase
[python-discord/site] branch deleted: vcokltfre/fix/uppercase\-env
2a1e821 Revert "fix: USE_FAKEREDIS is uppercase" - jb3
[python-discord/site] New branch created: revert\-488\-vcokltfre/fix/uppercase\-env
Reverts python-discord/site#488
Bot side issue: https://github.com/python-discord/bot/issues/1559
Context
The re-roll command on the bot side re-names an off-topic channel and marks the previous off-topic channel name to be devoid of being used again.
We will need a new field in the OffTopicChannelName model (here) that describes if the name is to be considered for the channel names.
We are still keeping ...
I think I fixed all the issues. Sorry for the troubles. When I committed it went to the wrong branch so I had to revert it and that deleted my code on my PC somehow. So I had to redo it and must have forgot to lint.
These comments should be deleted
Some documentation amendments.
"""Choose a cat or dog randomly for the given status code."""
I think we can tidy up these docs a little.
"""
Fetch an image depicting HTTP status codes as a dog or a cat.
If neither animal is selected a cat or dog is chosen randomly for the given status code.
"""
9420ec1 Changed rules to those agreed upon in a prior s... - swfarnsworth
[python-discord/site] New branch created: swfarnsworth/rules\_update
This PR changes the rules page to match the rewrite we discussed internally. This PR should only be merged when an admin is available to update the rules displayed in the client.
I've got a few nitpicks here.
dataclasses should be above asyncio
Should be bot.bot.Bot
Logging is not needed in this scope
Lgtm! You have a failed lint due to whitespace, you can fix it using:
pipenv run lint
git commit --amend --no-edit
Don't forget to setup pre-commit!
Imports should be alphabetical order, and from x import y imports come after import x imports.
wtf is capitalised in other areas
Seems to me this should be log.warning, but thats just me
Few nitpicks, but looks good!
Could we reword this to "Returns the fuzzy match of a query if its ratio is above 90, otherwise returns None", using else sounds bad
May I put this one up for grabs? I'm not sure how to implement this, and I don't have enough experience with backend Python.
could this be done with regexing webpage content?
Kind of.
The problem arises that we probably want a site wide search, but we need to render every page before we know what is on there, we can't just search templates and resolve them backwards to the actual page they make up.
It's a tricky one that I'm not sure of the perfect answer for, we need to be able to search the content, resources and events apps, all of which use different rendering methods (only content kind of supports searching since the documents are in their final form).
i cant think of a way to do this unfortunately.
2b0411c Enable permanent redirects for redirect app - jb3
[python-discord/site] New branch created: joe/redirect\-app\-301
After monitoring traffic ingressing and confirming redirects are working as expected, I'm happy to switch redirects from the redirect app to using 301 permanent redirect.
Getting 301s & the redirect works for me +1
Both Python and Sir Lancebot had slightly outdated lists for environment variables, which were updated in this PR.
Changes
Python:
Add BOT_TRACE_LOGGERS
Remove REDDIT_CLIENT_ID and REDDIT_SECRET
Sir Lancebot:
Add REDDIT_CLIENT_ID, REDDIT_SECRET and REDDIT_WEBHOOK to the Token/APIs portion of the env var reference.
Preview:
Python:

Sir Lanceb...
Proposal
Our current events page could be improved to draw in more engagement, clearly showcase the upcoming events, and have a stronger call to action for people to join and find the information they're looking for.
The below image illustrates what I'd like to do.

- A clear intro blurb briefly describing our events and provid...
[python-discord/sir-lancebot] branch deleted: bookmark\-react\-for\-copy
bdfeef5 Rework bookmark command to allow other users to... - ChrisLovering
99a0fcc Update phrasing of comments in bookmark command - ChrisLovering
a308990 Fix spelling and grammar errors in bookmark com... - ChrisLovering
6e71554 Split out an embed add field call for readability - ChrisLovering
22e062a Make bookmark emoji a constant - ChrisLovering
Connected!
Description
This would mean that when using commands such as .ext unload the state of those cogs would be stored in redis, and when the bot starts back up the state is restored and cogs that were marked as unloaded are not loaded during cog load.
Reasoning
This would be useful in instances such as the current latex cog where every time the bot restarts the cog needs to be unloaded as it's not stable enough to be allowed to run yet.
Proposed Implementation
- when using ...
You should look at the previous reviews and not repeat the same comments. Most of your comments are repeated here.
I am logging a error level messages if it fails to fetch it 3 times. I don't see the need to do it for every fetch.
Explain "bad", I think else is good and makes its functionality clear.
[python-discord/site] branch deleted: revert\-488\-vcokltfre/fix/uppercase\-env
Approved, but like @Akarys42 said, let's fix linting.
Hmm, let's stop using Imgur on our site. Can you use the asset from the github repo, or add it to the static files?
1f5e4e2 Reorganizes Contributing Guidelines - HassanAbouelela
[python-discord/site] New branch created: reword\-contrib\-guides
This PR cleans up some things in the contributing guidelines based on feedback we've seen since it was deployed. The guide is placed on the main contributing page.
It also removes mentions of black and fixes mentions of pre-commit.
This PR has been sitting here for many months now. All it does now is change one emoji for another, amongst the changes to the result. The changes to the result are fine, but I don't like the new emojis. Ultimately, that is a matter of preference, and I don't see how you could change that. I'll dismiss my review because while I don't agree with these changes, I won't block them either.
But here's the deal, let's not make minimal style changes like these anymore without at least discussing ...
Besides the change I requested, you have my tentative approval on the code.
In terms of actual functionality though, was the change in the x and o styles bikeshed? I don't particularly like the new ones, especially on light mode (you can compare the old and new styles in the screenshot below).

We can just render all the templates when the site launches, cache the content, the URL and any other metadata somewhere, and then search that metadata?
Since there's been no movement on this for a very long time and there's no actual implementation suggestion here, I'm gonna close it. If anyone really want to see this happen, open a new issue with a better specification.
Looks like this service would do it:
https://www.booklinker.net/
Doesn't look like Amazon itself has a feature for it. I'm not sure how I feel about using some third party service for this, though.
One thing we could do is link a page like goodreads.com instead of amazon.
One of the key features in the Smarter Resources project is going to be good filtering. We want to be able to tag all our resources with stuff like difficulty and domain, and then filter by those tags in a clever way.
Which tags do we need?
Initially, we'll tag our resources with one of each of the following tags. Note that part of this issue will be working through all existing resources and assigning tags to them.
Resource type
- Book
- Guide
- Course
- Interactive
-...
I'm closing this in favor of #496, to help prevent confusion. This will be solved by that issue.
I'm closing this in favor of #496, to help prevent confusion. This will be solved by that issue.
Yeah, let's just change our book links to GoodReads. It won't solve the universal link problem, but at least it will link to a bunch of different stores instead of us just sending everyone to Amazon. Feels more neutral and nice.
As we complete the Smarter Resources project, we'll want to carefully document precisely how a member of the community (staff member or otherwise) can suggest a new resource to be added to our list of resources.
The following must be documented:
- How to suggest a new resource for inclusion
- How to implement a new resource. What files need to be edited, and how?
- The review process for a new resource. Who reviews and approves these suggestions?
23db09e Add concurrency behaviour to github actions - ChrisLovering
[python-discord/sir-lancebot] New branch created: concurrency\-action
git commit --allow-empty -m "Empty test commit"
Description
This grouping means any new actions on either a PR or against main, will cancel any running actions.
We do not care about these old actions, as they are out of date, so cancelling them will mean the actions we do care about get done faster.
Did you:
- [ ] Join the Python Discord Community?
- [ ] Read all the comments in this template?
- [ ] Ensure there is an issue open, or link...
55978b8 Empty test commit - ChrisLovering
GitHub Actions run 844785472 was cancelled.
GitHub Actions run 844786187 succeeded.
What's up with you and concurency? Just drop the redundant or and ๐
[sir-lancebot] Branch concurrency\-action was force-pushed to `1fb4a02`
[sir-lancebot] Branch concurrency\-action was force-pushed to `4683f94`
2cac931 Adds A Dev Only Endpoint For Adding Admins - HassanAbouelela
[python-discord/forms-backend] New branch created: admin\_endpoint
Adds an endpoint if the environment variable PRODUCTION is set to false, which reproduces the behavior of the admin endpoint, without authentication. This is meant to make it easier to get an admin account set up in production without having to manually manipulate the database.
[python-discord/site] branch deleted: swfarnsworth/rules\_update
9420ec1 Changed rules to those agreed upon in a prior s... - swfarnsworth
68bff1c Merge branch 'main' of https://github.com/pytho... - swfarnsworth
c7c3541 Fixed whitespace issue raised by linter. - swfarnsworth
20aa50e Merge pull request #491 from python-discord/swf... - ChrisLovering
[python-discord/sir-lancebot] branch deleted: concurrency\-action
[python-discord/site] New branch created: update\-rules\-api
This is to reflect the recent changes made to the server rules.
Looks to be correct.
[python-discord/site] branch deleted: update\-rules\-api
Abstract
Moderators should be able to set a schedule for when their moderator ping role gets removed, to avoid waking up to a ton of unread pings.
Specification
A new command, !modpings schedule set [start] [stop] (with the two arguments being UTC time), should store those two dates in a Redis cache and make sure to remove the role when start hits and re-add it when stop hits using a scheduler.
!modpings schedule reset should clear the cache entry and disable it.
...
A couple of thoughts:
- The word
Topicis better than domain. - Topic/Domain probably cannot be a list like shown in the mockup, if we want it to be truly scalable we need a better way to present that than a huge list of checkboxes. Maybe a search of some for topic areas, though I'm not entirely sure.
I agree that Topic is better than domain, let's do that instead.
however, I'm confused by your scalability comment. how many topics are you really expecting here? I was not expecting to scale that at all.
One of the major points behind this system was so we could add topics that were too specific. We've talked about having stuff like individual libraries such as discord.py as topics where we've rejected resource suggestions because they were too specific.
1c07a8c Namespace each concurrency group - ChrisLovering
[python-discord/sir-lancebot] New branch created: concurrency\-action
Description
This stops different actions, from the same commit, running in parallel from canceling each other.
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 the contributing guidelines?
[python-discord/sir-lancebot] branch deleted: concurrency\-action
Connected!
This doesn't match our indentation style
A version of this was implemented in #645. If further changes wish to be made to this command, we should open a new issue for clarity.
Code looks good, I could find two bugs.
The staticmethod is making the following traceback appear
sir-lancebot | Traceback (most recent call last):
sir-lancebot | File "/usr/local/lib/python3.8/site-packages/discord/ext/commands/core.py", line 451, in _actual_conversion
sir-lancebot | ret = await instance.convert(ctx, argument)
sir-lancebot | File "/bot/bot/utils/converters.py", line 20, in convert
sir-lancebot | return await super().convert(ctx, argument)
sir-lancebot | TypeError: super(typ...
This f-string isn't necessary
description=STATES[valenstate]['text'],
Also, can you change line 65 to be
embed_text = f"You have another match, this being {leftovers[0]}." to avoid formatting the list directly.
This is a really clever PR.
Should probably use 4 spaces indentation here to maintain consistency with the rest of the file.
Would y-m-d be better here to avoid confusion? The current standard in the archive is to use d-m-y, but that's just arbitrary.
This is a pretty strange metric to go by imo. From my testing, it usually works, but it can pretty easily break. If we have access to the message, why don't we check the content for the message opening (line 114). We can make part of the opening a constant to make this easier.
Shouldn't this be a constant under the imports of this file?
Keep this consistent with the rest of the file's strings, such as the ones on line 81-82 and 76-77 in this same file.
"The Advent of Code event is not currently running. "
Should we consider having aliases be assigned to tupels, since they're constant?
@commands.command(name="hanukkah", aliases=("chanukah",))
The thing is that it should work with automatic messages too, that doesn't have a standard opening message. Maybe we could do that for bots only then? Not sure what the best course of action would be here.
I just followed what was already being used, but I don't mind changing it.
Hmm well, most votes will have pings. One option would be looking for messages with 2+ pings.
That could work if we look for role pings, let's do that.
How to suggest a new resource for inclusion
The current consensus among those who have voiced their opinion is that new resource suggestions can be submitted as issues in this repository. Beyond that, we'll need to iron out what we want people to say when they go to suggest a new resource and come up with a set of issue labels that will make the pipeline easiest to manage.
How to implement a new resource. What files need to be edited, and how?
As someone with no front-end experie...
[python-discord/site] New branch created: swfarnsworth/dave
This PR restores a change made to the site during the dewikification freeze. Specifically, it replaces references to Zoot with Dave.
Dave is the bot formerly known as Zoot. If not for the nickname policy, I suppose we could have changed that bot's name to an unpronounceable symbol.
Can't this just be
suffix = number_suffixes[festival_day - 1 if festival_day <= 3 else 3]
(or something more readable than what I just wrote)
(I also don't see why suffix is being defined as an empty string before this either)
message = ":menorah:" * festival_day
embed.description = f"It is the {festival_day}{suffix} day of Hanukkah!\n{message}"
``` isn't this essentially the same?
@swfarnsworth this all sounds fine.
re: yaml file for resources - this is already how it works in the dewikified site.
It would be amazing to have deploy previews in our PRs, but this will probably require us to do a whole bunch of very tricky stuff, so it's a really long-term goal.
Wait, what would we have to do?
fd44978 Latex: temporarily disable loading of the cog - Akarys42
[python-discord/sir-lancebot] New branch created: latex\-don't\-load\-cog
As we are currently working on restricting resources on the latex cog, this commit will prevent it from loading.
It will be reverted once solved.
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 discu...
[sir-lancebot] Branch latex\-don't\-load\-cog was force-pushed to `8573325`
[python-discord/sir-lancebot] branch deleted: latex\-don't\-load\-cog
Connected!
description=STATES[valenstate]["text"],
Into a constant you go. Also, there's some attributes in the class SpookyNameRate that would need to be refactored a little to account for this new constant.
Name can be an f-string.
embed.add_field(name=f"Recommendation: {game['title']}\n{game['link']}", value=game["description"])
Everything looks good
except for the
command,can_run() if statement., if the user can the group main command, then the subcommands should have no problem running. We don't have any checks on the functions too. The invalid argument error in any way
caught in the error handler. But I guess it doesn't hurt to have it.
Poifect. I partially forgive you for your past crimes.
Here are few things I found after reviewing a few files.
This is a list of changes that could be implemented in this PR
https://hackmd.io/@Y1bKKDhaRoeTMz_bW9jEOg/SkqibsT_O
"""Separate function run from an executor which turns an image into a mosaic."""
Doc item doc_item.symbol_id='testing' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='flask.Config.from_json' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
Doc item doc_item.symbol_id='module-flask' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
1ed857d chore: switch commands.Bot typehints to bot.bot... - vcokltfre
713396a chore(evergreen): format each cog load docstrin... - vcokltfre
227d0a7 chore(evergreen): make usage of . at sentence e... - vcokltfre
f919e0c chore(evergreen): remove unneeded cog constructors - vcokltfre
ae64ddd Clean Up the Halloween Season - ToxicKidz
This line is causing this issue, with wrong time left being sent.

Solution is to increment the hint_no value after sending the hint or the time (after line 97).
Excellent work ๐ฏ ! Just a few changes and bug encounters.
I think checking for hint_no is not required here. What do you think?
if len(done_question) > _constants.QUESTION_LIMIT:
rules = "\n".join([f"`{index}`: {rule}" for index, rule in enumerate(_constants.RULES, start=1)])
Connected!
Should this do --prod, like the Dockerfile does? or should the Dockerfile be changed to this?
I was told to use this instead of __call__ so that check would run.
Right, but this group command has the same checks as the subcommands (which is the global check) so there isn't really any point in calling can_run.
ce8a9d8 feat: allow replying to messages to bookmark - vcokltfre
[python-discord/sir-lancebot] New branch created: vcokltfre/feat/bookmark\-reply
[python-discord/sir-lancebot] Pull request opened: #738 feat: allow replying to messages to bookmark
Relevant Issues
Closes #689
<!-- Link the issue by typing: "Closes #" (Closes #0 to close issue 0 for example). -->
Description
Users can now bookmark a message by replying to it, this is done by making the message argument optional, and if it's None take the message reference, if that is None raise an error to display command usage.
Did you:
- [x] Join the Python Discord Community?
- [x] Read all the comments in this template?
...
Nitpick ๐
target_message = await ctx.fetch_message(ctx.message.reference.message_id)
Then again, Message.resolved exists, but I'm not sure how reliable that is.
Flake8 and pre-commit are dev dependencies.

