Actually message.reference.resolved doesnt exist because lance uses 1.5.1 not 1.6
#dev-log
1 messages ยท Page 75 of 1
Could we try to get this from the cache before making an API request?
Ideally if lance is using discord.py 1.6.0 or above we can just use the resolved reference so we never need to fetch from the API
Nitpicking, but it should be this:
max_lines: Optional[int] = None,
LGTM, works well. Just one comment.
a8b60fd chore: Update sir-lancebot's env var reference - ToxicKidz
[python-discord/site] New branch created: update/sir\-lancebot\-env\-vars
[site] Branch update/sir\-lancebot\-env\-vars was force-pushed to `5a86952`
Description
This PR updates sir-lancebot's env var reference. It adds CHANNEL_REDDIT, IGDB_CLIENT_ID, IGDB_CLIENT_SECRET, AOC_COMMANDS_CHANNEL_ID, and AOC_SESSION_COOKIE. It also removes IGDB_API_KEY since it is no longer valid.
[python-discord/site] New branch created: poetry
In preparation for python-discord/sir-lancebot#623, and python-discord/bot#1582, this PR updates the dev setup guides to use poetry instead of pipenv, as well as 3.9 instead of 3.8.
Connected!
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
[python-discord/sir-lancebot] branch deleted: pipenv\-to\-poetry
[python-discord/site] branch deleted: poetry
[python-discord/bot] branch deleted: 39\-poetry
Connected!
GitHub Actions run 847372780 succeeded.
GitHub Actions run 847373622 succeeded.
GitHub Actions run 847380287 failed.
f3f1f4c Fixes Dependency Install Flag In Dockerfile - HassanAbouelela
[python-discord/bot] New branch created: fix\-dockerfile
Fixes the poetry install flag used in the dockerfile setup.
... oops
Connected!
In most cases, you can install pre-commit using `pipenv run precommit` or `poetry run task precommit`, and lint using `pipenv run lint` or `poetry run task lint`.
0503777 Fixes Typo In Contrib Guide - HassanAbouelela
ed2426c Hide arrow to the right of More below the 1024p... - Transfusion
b5a7dc4 Resolve conflicts - Transfusion
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
[python-discord/site] branch deleted: reword\-contrib\-guides
GitHub Actions run 847438839 succeeded.
GitHub Actions run 847440438 succeeded.
GitHub Actions run 847443082 succeeded.
Yup, looks good to me :D
When reviews are broken up into multiple messages, the formatting can also be split too.
But that's pre-existing and a problem for another PR.
be9cb47 EH Tests: Created test cases set + already hand... - ks129
8229d21 EH Tests: Created test for CommandNotFound er... - ks129
28e8321 EH Tests: Remove class member cog + other sma... - ks129
3ea33bc Error Handler: Changed CommandNotFound error ... - ks129
28e962b Test Helpers: Added new attribute to MockContext - ks129
b26368c Nominations: automate post archiving - Akarys42
d6098bc Nomination: ping the whole team - Akarys42
63cbede Nomination: pin nomination announcements - Akarys42
77176b0 Nomination: properly handle multi messages nomi... - Akarys42
b8429c7 Nominations: send many archive messages if the ... - Akarys42
[python-discord/bot] branch deleted: nomination\-archive\-automation
Tested locally, all good ๐
[python-discord/sir-lancebot] branch deleted: vcokltfre/feat/bookmark\-reply
Connected!
Connected!
@doublevcodes will you be applying the changes that have been stated sometime soon?
Thanks.
@Objectivitix please resolve these conflicts.
GitHub Actions run 847568377 failed.
GitHub Actions run 847576518 succeeded.
GitHub Actions run 847576860 succeeded.
GitHub Actions run 847597379 succeeded.
If you did not
and then later on
your whole bot will
This should be in the same tense, either past or present, but not both
The rest of the tag seems to be present tense, so I'd recommend changing if you did to if you do
e4ef23a Constants: use in-server emojis for incident - Akarys42
[python-discord/bot] New branch created: incident\-emojis
The default config is currently referencing the emoji server versions, making it unable to work with the nomination archive automation
Connected!
@Xithrius All conflicts have been resolved. Two are caused by the spring cleanup I believe, and so I selected the spring cleanup ones
Thank you, I'll do a final test and then give my thoughts.
Code looks good to me as of now.
[python-discord/site] New branch created: mod\-policy\-redirect
Redirects pages/code-of-conduct/policies/ to pages/code-of-conduct/.
4c3312a Add 30 math questions and 30 science questions ... - Objectivitix
93331ac Merge pull request #1 from Objectivitix/Objecti... - Objectivitix
113a20a Implement the math and science questions, added... - Objectivitix
9e6004f fix NameError, add some forgotten imports - Objectivitix
fc80051 Merge pull request #2 from Objectivitix/Objecti... - Objectivitix
Connected!
Sentry Issue: SIR-LANCEBOT-59
KeyError: 541638762007101470
File "discord/ext/commands/core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "bot/exts/evergreen/trivia_quiz.py", line 478, in stop_quiz
del self.game_owners[ctx.channel.id]
Unhandled command error: 541638762007101470
Caused when multiple users with permission try to stop the same quiz.
If you are interested in writing a tag, go for it and can also open a PR for it.
The problem of the doc command fetching the Django template syntax for if-else will need some digging and investigation.
aeb3ce4 fix: Send the help for the right command in .sr... - ToxicKidz
[python-discord/sir-lancebot] New branch created: fix/wrong\-source\-message
Description
Currently, when you do .source help, it sends the description of bot.command.Command, instead of the actual help command. This is because of this line:
Since our help command is just a regular command, I removed the check to see if the source item is a help command.
Screensh...
Do you think it is the humanity of us sending it over the bot? If so, your argument is ridiculous.
I don't see how it's ridiculous. People abused !ask mostly because it's very quick and easy to invoke the message.
If a person is lost, you can just say something along the lines of: "Hey, check out #how-to-get-help and claim a help channel." or "You can look at the guide to our channels here: https://pythondiscord.com/pages/guides/pydis-guides/help-channel-guide/"
Description
A new tag that explains the following:
- Ternary operator syntax.
- How is it different from a regular if-else statement.
- Examples.
A different approach
Since we don't already have a tag for if-else, we could have 1 tag for both if-else and ternary operator, stating their differences and syntax.
This was discussed in the admin meeting, we are happy for this feature to be implemented, as long as there is a 16h limit between the start and stop.
This number was to settled on as a good medium to allow for 8 hours sleeping and 8 hours school/work.
Can we include the support for /favicon.ico in this PR as well? Or if not, open an issue to do so.
That means that devices would fallback on pages where we don't explicitly specify a favicon.
[python-discord/sir-lancebot] New branch created: fix/quiz\-keyerror
432f732 fix: Handle a KeyError when using .quiz stop - ToxicKidz
Ah, it seems we don't need to do this since it already gets deleted here https://github.com/python-discord/bot/blob/67934bd582ae5a6fac459c02ba3fa6c17d085d1a/bot/exts/moderation/voice_gate.py#L207-L214
[python-discord/site] branch deleted: mod\-policy\-redirect
Relevant Issues
Closes #739
<!-- Link the issue by typing: "Closes #" (Closes #0 to close issue 0 for example). -->
Description
This PR handles a KeyError in a race condition for .quiz stop. Just a try/except.
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 the [contributing guidelines]...
Connected!
It seems the fork this PR is based from has been deleted, so changes cannot be made. Therefore, I am closing this PR.
If someone still wants to implement these changes, please open an issue for it to be discussed first.
It seems the fork this PR is based from has been deleted, so changes cannot be made. Therefore, I am closing this PR.
If someone still wants to implement these changes, please open an issue for it to be discussed first.
Description
Currently, the vast majority of static data stored in lance is in JSON format, but a few files are YAML or plain text. I propose that this all be turned into one format (JSON, and while I'm there make the JSON formatting consistent across all JSON files) so all static data is stored consistently.
Reasoning
This is a QoL improvement to make the bot more consistent, akin to the spring cleanup but without the huge amount of effort reviewing that took, instead this woul...
Description
What this issue solves
This issue aims to solve two things:
- The format in which issues and pull requests are displayed in the embed that the bot automatically sends.
- The order in which the issues and pull requests are sent. This wasn't part of the original issue but I figure if this is correctly implemented then this could be fixed too.
Current implementation
Upon mentioning an issue or pull requests in a message such as sir-lancebot#69 or `bot#420...
Since the option to opt-in or out of metric collection was removed there are no longer any commands in Metricity, this means the following changes can be made (and have been made in this PR):
- removing
bot_commands_channelconfig option, it's now redundant - removing
command_prefixconfig option, there are no commands, prefix now set to"" - adding
help_command=Noneto the constructor, else you just get this:
LGTM, everything is working as expected.
[python-discord/sir-lancebot] New review comment on pull request #583: Add the stackoverflow command
In that case, you could just rename the the emojis to maybe post_upvote, post_view, post_comments, or something similar. And then use them in the reddit as well as the stack overflow cog
okay, so, if we get into a situation where we have a lot of topic tags, we can show the 5 topics with the most resources in them, and then a button like "show all topics" that brings up a modal with the rest.
I think I'd like to build this myself while I got some time off this week. Self-assigning.
I'll fix this too while I'm at it.
Do we just go for the easy, but tedious, solution and update the doc strings? I think the other options are complex and would add maintenance burden.
We could then just ensure we test what the help embed looks like for future commands before approving.
hm. i just realized... this didn't get an explicit approval yet-
There's a redundant is True on line 469 that I didn't see upon my first PR, would you mind removing that as well?
toxickidz clutching up with all these minor error fixes :D
Description
This will be a tag that briefly explains why "asking if one could ask a question"/"asking if there's anyone who can answer a question" or any other variants decreases one's chance of getting an answer quickly.
Motivation
Currently there is a website that explains this but it is too long and considered dismissive (or sometimes used in a passive-aggressive way), because 1) people would have to navigate between the site and server and 2) the wo...
Duplicate of #1111. That issue also explained why the original ask tag failed, and from what I gather, this suggestion is no different from the original tag or the website. The third reason the website was blocked, the reason you didn't mention, is that people would use it in a dismissive way, and no amount of content changes can fix that. We've discussed this hundreds of times, but every time we come to the same conclusion that something like this just won't work.
I'm extremely against this type of tag. Users who this tag would be used for are usually newer users, and if one of their first interactions with our server is our members sending this tag to them with no other context could be very off putting.
I would much prefer our members to just write out a sentence asking them what their question is, as that would be far more welcoming.
I'll close this now. If you really wish, you're welcome to comment on the issue I linked, but I think you should at least talk about this idea on server before you move on. We can point you towards older discussions, and tell you about all the ideas that were considered before hand, and dismissed.
Got it @HassanAbouelela and @ChrisLovering. Thank you all for telling me this, and sorry I didn't know I'd have to discuss in the server first before opening an issue (I thought issue was the first step).
ah... this was already considered, i'm way too late xD
yesssss i would love this!
so, set error message as a constant?
@ToxicKidz all character names need to be lowered otherwise you get an error, i can stop lowering the text if you want.
No, I mean just do
raise commands.BadArgument("The given text is too long! Please submit something under 150 characters.")
I'm talking about the text, not the characters, so yes
i removed this, will commit soon
i block these as they break.
resolved, will commit soon
This is a constant, it should be UPPER_CASE_WITH_UNDERSCORES
LOCAL_CHAR_NAMES = list(char_names)
Let's keep this consistent
cowsay = "~=4.0"
if character not in localcharnames:
ill do this manually as you suggested it be renamed to a constant
GitHub Actions run 850183444 was cancelled.
GitHub Actions run 850186667 failed.
GitHub Actions run 850200966 succeeded.
Works fine with testing. Only things that need tweaked are the doc string that I pointed out (possibly looking through the others just to make sure I didn't miss anything), and the thing that Chris pointed out.
Docstring needs to be updated to reflect the new return type, detailing what the second element represents.
This PR Looks Good To Me And Can Be Merged To Main
[python-discord/forms-backend] branch deleted: admin\_endpoint
Workflow shields
The Build and Deploy workflow seems to have been separated into two different workflows. IDK when.
This PR just separates the shield into 2 separate shields for each workflow, because the old README seemed to mess up because of the non-existent shield
d2ce374 feat: Allow custom arguments to be passed to eval - ToxicKidz
[python-discord/snekbox] New branch created: feat/custom\-eval\-arguments
Or, the Contributing Guidelines page could be changed to be a little clearer.
[python-discord/snekbox] Pull request opened: #108 feat: Allow custom arguments to be passed to eval
Relevant Issues
Closes #105
Description
This PR makes it so that you can pass arguments, through an array of strings, that can replace the "-c" option. An example of how this would work would be:
>>> import requests
>>> response = requests.post(
... "http://localhost:8060/eval",
... json={"input": "[i for i in range(1000)]", "args": ["-m", "timeit"]}
... )
>>> ...
[python-discord/site] New branch created: poetry\-and\-python\-3\.9
Description
Bumps the python version to 3.9 (.5 in docker), and switches from pipenv to poetry as the package manager. The vote to switch to poetry is [here](#dev-core message).
Changes
- Pipfile, Pipfile.lock -> pyproject.toml, poetry.lock
- Dockerfile Python 3.8 -> 3.9.5
- Add python-dotenv
- Bump CODEOWNERS to track poetry files
3af548a Fix pre-commit, since flake8 isn't a task - ChrisLovering
[python-discord/bot] New branch created: flake\-8\-isn't\-a\-task
269b6d3 Adds An Empty Form For Authorization - HassanAbouelela
[python-discord/forms-backend] New branch created: auth\-form
The pre-commit file current runs flake8 via poetry run task flake8 but flake 8 isn't a task, so it fails,
Tested, and all paths work fine on my end.
[python-discord/bot] branch deleted: flake\-8\-isn't\-a\-task
Connected!
The first thing a developer might want to do when setting up the backend is to add a form. Adding a form requires you have your authorization cookie. Getting your authorization cookie requires clicking the discord OAuth button at the bottom of a form. This creates a sort of chicken-or-egg situation.
This PR aims to resolve that by returning a fake form when the backend contains no forms, and the server is running with the PRODUCTION flag set to false.
A better alternative would be to ...
df8a70a feat: add async-await tag - vcokltfre
[python-discord/bot] New branch created: vcokltfre/tag/async\-await
Async await tag as approved in #1585

Hey, this is a good talk, just a couple of suggestions. Is it worth mentioning the use of asyncio.run as well?
To learn more about asyncio and its use, see the [asyncio documentation](https://docs.python.org/3/library/asyncio.html).
To run the top level async function from outside of the event loop we can get an event loop from `asyncio`, and then use that loop to run the function:
Note that in the `run_until_complete()` where we appear to be calling `main()`, this does not execute the code in `main`, rather it returns a `coroutine` object which is then handled and run by the event loop via `run_until_complete()`.
Since the whole events thing is being redone, this can be closed.
We won't close it yet, but when a PR is opened to rewrite events put Closes #452 in the description and this issue will automatically close on merge.
would you mind if I take this on? I was thinking we could have some points of what you should do rather than what you shouldn't do
Should this be replaced with the animated logo (what was there before the link went dead) or the motionless one? All the others on the events page are motionless.
The issue specifies the animated one, and I think we should have the Hacktoberfest branding in there somehow.
@Akarys42 would an acceptable implementation of this be per-cog?
I can see this is a controversial option, but i'd be interested in implementing this.
None of the proposals put forward after the removal of the !ask tag have met the criteria specified in this issue.
We currently document good asking practices in the help channels passively through the available channel embed, which summarises good asking points and also links through to our longer form guide on asking good questions.
<img width="487" alt="Screenshot 2021-05-17 at 19 48 12" src="https://user-i...
I'm fine with this tag being created, provided the implementation meets the following three criteria:
- It's short. Tags are meant to be a quick way to convey information.
- It only explains what PATH is, and makes no attempt to explain how to modify it. Reasoning for that above.
- Links to an external guide on how to do it. Preferablly, this guide will be up to date, from a reputable site, and have useful resources such as pictures.
[python-discord/site] branch deleted: poetry\-and\-python\-3\.9
e9f6501 Replace pipenv with poetry - ChrisLovering
9c4867d Convert docker file to use 3.9 and poetry - ChrisLovering
b0308d9 Bump lint flow to 3.9 and use poetry - ChrisLovering
e978443 update CODEOWNERS to track poetry files - ChrisLovering
706658b Fix pre-commit, since flake8 isn't a task - ChrisLovering
Agree with Scale, we should be careful with this one, as we don't want to be responsible for users who mess up their path.
The default config is rather long (over 500 lines currently) which can be rather dauting for new users as it's not clear which values have to be set for the bot to run. I'm not sure how smartconfig would affect this but it looks like it's still a bit before it can be used within the bots for configuration.
As the first thign all the unused values from both the default config and constants should be removed, for example Channels.reddit or Free.
The formatting of the file is a bit a...
I would be willing to try and implement this as my first major contribution to the site ๐
Assigned!
Feel free to chat with us in #dev-contrib if you get stuck at any point, we'd be happy to help!
Added a short tag on what the PATH is, uses for it and resources on how to modify it.
[python-discord/sir-lancebot] New branch created: remove\-superfluous\-dependencies
Description
- Change AoC helpers to use arrow over pytz
- remove bs4 and pytz
- update arrow to 1.1.0
pytz is only used in one file in the whole bot, so we can remove the dependency by changing AoC to use arrow.
I chose to use America/Chicago arbitrarily, for no other reason that being the first tz google returned that was in EST.
Beautifulsoup4 is no longer used, it used to be used in AoC code a while ago.
I also updated arrow to 1.1.0 while I was here as the break...
I get this error when I run .aoc countdown
05/17/21 18:41:12 - bot.exts.evergreen.error_handler ERROR: Unhandled command error: tzinfo argument must be None or of a tzinfo subclass, not type 'str'
Traceback (most recent call last):
File "python3.9\lib\site-packages\discord\ext\commands\core.py", line 85, in wrapped
ret = await coro(*args, **kwargs)
File "~\sir-lancebot\bot\exts\christmas\advent_of_code\_cog.py", line 103, in aoc_countdown
datetime_now = datetime.no...
I chose to use America/Chicago arbitrarily, for no other reason that being the first tz google returned that was in EST.
Will this be consistent? Arrow will presumably implement daylight savings for actual locations.
All doc strings should be consistent to Load the x Cog
"""Load the Pride Leader Cog."""
leader = random.choice(list(self.pride))
Type hint to bot.Bot here.
These should be double quotes too
STATUS_TEMPLATE = "**Status: {code}**"
ERR_404 = "Unable to find status Floof for {code}."
ERR_UNKNOWN = "Error attempting to retrieve status Floof for {code}."
The embed= part should be on a new line, and footer isn't a valid keyword argument for Embed. Use Embed.set_footer instead.
await ctx.send(
embed=discord.Embed(
title=STATUS_TEMPLATE.format(code=code)
).set_footer(text=ERR_UNKNOWN.format(code=code))
)
The embed= part should be on a new line.
await ctx.send(
embed=discord.Embed(
title=ERR_404.format(code=code)
).set_image(url=url)
)
Nitpick: Could this be changed to SUPPORTED_CHAR_NAMES, it sounds more appropriate then LOCAL_CHAR_NAMES
All doc strings should be consistent to Load the x Cog
"""Load the Cowsay Cog."""
Do we need this here? self.bot hasn't been used at all.
According to @janine9vn
Chicago is CST/CDT. So one hour before EST/EDT
New York, should be the right timezone.
@Shivansh-007 i will do this tomorrow morning
b55df6c Use an actual EST timezone - ChrisLovering
I chose to use America/Chicago arbitrarily, for no other reason that being the first tz google returned that was in EST.
Will this be consistent? Arrow will presumably implement daylight savings for actual locations.
Arrow will shift for daylight savings, which I assume is what we want, rather than a static GMT offset.
This PR makes a redis cache in bot.bot to store all the unloaded extensions, on every unload and load this cache would be edited in the desired manner, either removing it from it or adding it in the cache.
Now, coming to not loading the unloaded commands, on bot startup, just after redis gets connected, the bot would run bot.get_unloaded_extensions and get all the unloaded extensions from the cache. This extensions would be skipped and not loaded, the skipping message would be logged. ...
We currently have a ban on advertisement, but I've noticed a few people getting around this by listing their server on disboard and then sending that link instead. I propose we do something similar to how we block discord invites to block these links. (Honestly this might be overkill, but I'm pretty sure advertisement isn't allowed). If given the option, I'd be fine with implementing this.
Description
This would be a tag explaining why dunder methods are special, why we would sometimes override them, and give some examples using __init__ (constructor), __str__ (string representation), and __repr__ (dev-friendly representation).
thank you for da like :D
@Shivansh-007 made requested changes.
In sir-lancebot, there are currently issue templates for ease of use, and uniform issues. I suggest we either move the sir lancebot issue templates to the repo or create new ones.
I would like this too, since there have been many times I've had to go copy it from the Sir Lancebot repository. This would make it easier.
Have you tested all other characters to see if they fit in the 2000 character message length?
Yep, just noticed turtle breaks but otherwise we're good.
Duplicate of python-discord/organisation#268
Alright, I will run a small test of them.
Also, github actions are currently struggling so lint might struggle
There is currently nothing scheduled. @Xithrius, @Akarys42 thoughts?
Since I do not have access to that issue, im assuming that it is for issue templates across repos
I donโt think we reached a consensus on this, although here are my thoughts:
Iโm not sure if locking ourselves in with a template issue is a good idea. I think having this freedom of structuring it as we want makes us more efficient and we can assume most of our users know how to write a good issue. It feels also quite bureaucratic.
It isnโt mentioned in the issue but a contrario Iโd say copying the PR template over would be a good idea. You donโt need much freeway when writing PRs and ...
beavis also failed.
I'd be fine with just going with the PR template, but I think at least having templates would be a good idea. We could provide a blank template for people to use as well.
strange, i believe beavis was fine when i tested.
If you're testing on mobile, everything breaks
i am talking about message character length, not codeblock breaking, here is a simple code:
.int e
from cowsay import char_names, get_output_string
s = list(char_names)
for element in ["dragon", "trex", "stegosaurus", "turkey", "ghostbusters", "turtle"]:s.remove(element)
t = f'{"helloworld"*100}'[:150]
for char in s:
msgbody = get_output_string(char.lower(), t)
try:
await ctx.send(f"\`\`\`\n{msgbody}\n\`\`\`")
except:
await ctx.send(f"{char} failed")
Alright, did what you asked
4c3312a Add 30 math questions and 30 science questions ... - Objectivitix
93331ac Merge pull request #1 from Objectivitix/Objecti... - Objectivitix
113a20a Implement the math and science questions, added... - Objectivitix
9e6004f fix NameError, add some forgotten imports - Objectivitix
fc80051 Merge pull request #2 from Objectivitix/Objecti... - Objectivitix
waiting for Github actions issue to be over since https://github.com/python-discord/sir-lancebot/pull/740 is ahead of this to be merged and this will need to be updated to main
[python-discord/sir-lancebot] branch deleted: fix/quiz\-keyerror
The naming is currently too ambiguous. I think *args should be nsjail_args (no longer varargs) and extra_args should be py_args.
There needs to be a comma between the kv pairs.
The response no longer matches the request.
Presenting... "Edit on GitHub"
The main purpose of this PR is to implement the "Edit on GitHub" feature mentioned in #459. This means that a button stating: "Edit on GitHub" will be present on all pages in the content app.
The button currently looks like this:

This is subject to change
The intended use of this button is to open the same p...
Connected!
GitHub Actions run 854812279 succeeded.
GitHub Actions run 852789947 succeeded.
GitHub Actions run 852958973 failed.
Connected!
Tested locally, all looks good to me ๐
d9e7c2d Update FAQ to clarify file types allowed - janine9vn
[python-discord/site] New branch created: faq\-update
Small PR that clarifies why we don't allow .py and .txt filetypes even though Discord does offer (limited) support for previewing them.
[snekbox] Branch feat/custom\-eval\-arguments was force-pushed to `8444bce`
[snekbox] Branch feat/custom\-eval\-arguments was force-pushed to `c105ff9`
[snekbox] Branch feat/custom\-eval\-arguments was force-pushed to `e157ce9`
This should be clearer
A list of arguments for the Python subprocess can be specified as `args`.
Otherwise, the default argument "-c" is used to execute the input code.
The input code is always passed as the last argument to Python.
`py_args` are arguments to pass to the Python subprocess before the code,
which is the last argument. By default, it's "-c", which executes the code given.
Revise this to explicitly mention nsjail_args rather than "additional arguments".
On mobile (Android, not sure about iOS), an opening bracket without a matching closing bracket causes the Markdown renderer to interpret everything in between as a link title. The mobile renderer ostensibly uses the earliest opening bracket it finds while the desktop renderer uses the latest. It renders as a link because later on, there is link Markdown which is used for the following post's title. This is what that looks like on mobile:
.
Looks good , except few nitpicks
Instead of completely removed the, you can add zero width spaces to backticks, which will prevent it from escaping the codeblock
Could do: this seems to explain it in a better way
# Creates a copy of supported cowsay character names to filter out characters which break the embed.
You are calling character.lower() twice, L30 can be moved up to prevent that.
character = character.lower()
if not text:
text = f"I'm a {character.lower()}"
Hey, can I work on this?
9226627 chore: Update the Nsjail.python3 docstring to u... - ToxicKidz
8cf0010 chore: Apply suggestions to improve documentation - ToxicKidz
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.
i think quackstack is already in a good stable state with a good amount of features, so we can now continue with the other work and not deffer them.
[snekbox] Branch feat/custom\-eval\-arguments was force-pushed to `497f27b`
oops, didnt notice that
This commit does two major things, it adds a query parameter called type which takes in a string object of the detail they are requesting i.e. either man-duck or ducky as of now. If it is None, then it would send all the details of all types, otherwise it would send the details only of the requested type.
This commit also adds details for man-duck generation and accordingly alters the man-duck generation class
Requesting ?type=ducky

fe3b0b0 (details): Rework /details endpoint - Shivansh-007
aa20756 (details): Use path parameters instead of query - Shivansh-007
94fc8a0 (details): Remove redundant use of or in dic... - Shivansh\-007 [96b141e`](https://github.com/python-discord/quackstack/commit/96b141e1b8fa3188bc012b4416eb62cdaf93410a) Merge pull request #45 from Shivansh-007/enhanc... - ToxicKidz
24dbaaa chore: switch to uvicorn - vcokltfre
[python-discord/quackstack] New branch created: vcokltfre/chore/uvicorn\-woohoo
Thanks! Looks Good To Me!
[python-discord/quackstack] branch deleted: vcokltfre/chore/uvicorn\-woohoo
This wouldn't stop the codeblock from breaking
text = text.replace("`", "`\u200b")
@ToxicKidz It does actually
it looks bad though, ill do this
Now that quackstack is pretty stable, could I do this after I finish up #494?
Code Jam preparation is in full swing. To reduce the burden on our organizing team, I'd like a command that will automate almost all of the team channels and role creation. Please ping me here or in server if there are any questions about this implementation. This is fairly high priority as I would like it working by June 14th.
The Proposal
A single command !codejam create that will create the channels and roles needed for the code jam.
The csv will be structured like so:
| Team Na...
cc: @ChrisLovering please assist where you can in terms of implementation details and the like~
We should first implement S3 on Quackstack and make sure Quackstack is in a more production ready state, I'll be looking at the former this weekend.
GitHub Actions run 857396293 was cancelled.
GitHub Actions run 857399290 succeeded.
Should this command be limited to mods, admins (or just you)?
Admins since it's going to be a fairly expensive and extensive command.
It would also be nice if we could call the tag name without the group name,
example: Both !dpy intents and !intents are valid commands and the bot responds with the same embed.
2999f6f chore: Upgrade to python 3.9 - ToxicKidz
[python-discord/quackstack] New branch created: upgrade/python3\.9
This PR updates quackstack to python 3.9, and updates README.md to use uvicorn.
https://github.com/python-discord/quackstack/blob/main/Dockerfile#L1
The docker file python version also requires a bump.
35411f4 chore: Update Dockerfile to use python 3.9 - ToxicKidz
It would also be nice if we could call the tag name without the group name,
example: Both!dpy intentsand!intentsare valid commands and the bot responds with the same embed.
As I understand it the issue's main purpose is to avoid having all of the tags as direct commands to avoid cluttering and prevent accidental invocations. If both methods are allowed the only real thing it'd bring is the ability to list a certain group and the grouping in the source
hello @swfarnsworth , can you update the issue description to match the updated implementation?
Updated implementation
Instead of deleting the off topic name after re-rolling, we are gonna mark that name as inactive in the backend (database).
These inactive names will not be considered for future channel names. We are storing these to avoid similar names to be added via the add command as the command checks existence of similar names.
Use a subtest context manager to isolate the assertions. Furthermore, it could use a for loop over the JSON bodies to reduce code redundancy.
ed1a945 chore: Use TestCase.subTest - ToxicKidz
[python-discord/snekbox] branch deleted: feat/custom\-eval\-arguments
d2ce374 feat: Allow custom arguments to be passed to eval - ToxicKidz
6e98935 chore: Improve documentation for arguments in /... - ToxicKidz
4dfd47a chore: Add tests for py_args and ns_jail args - ToxicKidz
16c00ae chore: Fix some typos - ToxicKidz
3058f37 Add a step to lint-test to show pre-commit logs - ToxicKidz
Description
The following math question with ID of 228 should have one more possible correct answer in the database.
Steps to Reproduce
- input the command
.quiz math 30. - wait for it to reach that question (randomly generated, might take a while)
- input the answer "centisecond".
It won't recognize it as a correct answer.
Expected Behaviour
It should recognize it as a correct answer.
Actual Behaviour
It doesn't.
, it can be removed.
bot.add_cog(Cowsay())
Alright, few more nitpicks
I'd be happy with either implementation. Would this be something you'd be interested in working on Bast?
Is there a reason that a role has been used? Storing in Redis should be just as simple with Redis Cache and helps reduce role pollution on the server.
I think it was to reuse some of the code that we have for the announcements feature.
Yeah, there really isn't any reason we need to do it. I have the redis cache setup already made so if you would rather use that then we can.
[python-discord/bot] New branch created: feat/timeit\-command
This PR is no longer a draft as the main functionality is now there.
I don't think this would work if we were using another URI, like https://pythondiscord.com/.
Relevant Issues
Closes #1025
Continues #1234
Description
This PR adds the !timeit command, which passes the ["-m", "timeit"] arguments to the python process in snekbox.
Screenshots

Context
As our server grows we're looking to have more ways for people to engage on the server besides the help channels. One of the ways we do this is with more events. Not all events need to be as large as the code jams though. Some just need a quick announcement, a way for people to subscribe to said announcement, and then a ping when the mini-event starts. I'm hoping to have a system with Python that helps with this.
The Proposal
We previously had a PR to introduce a User Events...
I've chatted with @RohanJnr about converting this code for a different but very similar purpose. He'll be using a new branch and PR but has requested this stay open for a bit longer to reference some implementation details.
Since python-discord/snekbox#108 was merged, I will be implementing this in #1602.
@janine9vn Thank you for the update.
@NiumXp Please link the issue/discussion so others can see the reasoning behind this PR.
This probably won't be a priority but it would be cool to have any events scheduled show up on this website (as I currently understand it the whole events section is being redone).
This proposes the ability to invoke commands (or if not commands generally at least tags) inline in a normal message, for example:
- command:
this is a message {!e print("message")} more messageruns the eval command in there - tag:
Hey, there's actually a tag explaining that: {!customcheck}
I'm not a fan of this idea, it may be pretty confusing. We already have workarounds in place, for example !eval will remove text outside of the code block before evaluating and you can place any text after a tag invocation. I think the syntax is the biggest issue, not a lot of people may understand what it means.
Yes, if it's not too urgent (I don't see it taking a month but maybe a week if something comes up). I'd like to do the second one, as its more kind to bot restarts and the future.
Yup, sounds good to me.
We have an interim solution, see #mod-spam message so we can afffored to spend a bit more time on this to make it a good solution.
Urgh. I need to adjust site to let us filter out permanent infractions. I might as well add a date field there, as well. We also have the option of just scheduling the next X infractions rather than the next X time of infractions to schedule/unschedule, which won't require the time filter (but that's getting into bikeshedding and we probably want that filter anyway).
Description
Add a .reverse command that reverses a submitted string.
Reasoning
Idk, as a joke I guess, could go with fun.py.
Proposed Implementation
Basically, something like this ```py
@commands.command()
async def reverse(self, ctx: commands.Context, *, text: str = "reverse time"):
text = text[::-1]
await ctx.send(f"> {text}")
## Would you like to implement this yourself?
- [x] I'd like to implement this feature myself
- [ ] Anyone can ...
Relevant Issues
<!-- Link the issue by typing: "Closes #" (Closes #0 to close issue 0 for example). -->
Description
Just added a reverse command to the bot that reverses nicknames if no arguments given else arguments
Did you:
- [x ] Join the Python Discord Community?
- [ ] Read all the comments in this template?
- [ ] Ensure there is an ...
Maybe we can just override load_extension here
core_dev_role = self.get_guild(constants.Client.guild).get_role(constants.Roles.core_developers)
Did you forget to change this back to the correct ID?
We talked about this in voice chat(requested by Hemlock) to make a command to move users to different voice chats.
The command would probably be something along the lines of move user channel
Doesn't Discord move functionality cover this? Who is this for?
I was just told to make an issue about it lol so I am not to sure
Hahahaha, cc @MrHemlock
@jb3 Okay so, there's a good reason for this. When you have a channel that's around 20 odd people, and you're trying to drag someone down to one of the code help channels, you have to deal with the awful drag and scroll issue. I feel it's at least worth talking about.
You can right-click and move to, which avoids that issue at least.
Hmm, we could but I donโt see why is that better than this.
Cog.__module__ is not the same as its extension. For example, InternalEval.__module__ would be bot.exts.internal_eval._internal_eval, yet the corresponding extension is bot.exts.internal_eval.
0eba28f feat: Add the /details endpoint - ToxicKidz
[python-discord/quackstack] New branch created: feat/details\-endpoint
Currently, we only have the /details/{type} details endpoint, but it would make sense if there was a general details endpoint. It also makes it so that /details/invalid-type will return a 400 status code.
94df732 feat: add generation response types - vcokltfre
1d847f5 feat: use correct types on details endpoint - vcokltfre
80a8cd3 fix: make dertails type required & 400 on inval... - vcokltfre
0e38e04 fix: add model docstrings - vcokltfre
e94ee03 fix: resolve import order and docstring space - vcokltfre
[python-discord/quackstack] New branch created: vcokltfre/feat/typing
- Response types have been added to /duck, /manduck, and /details
- /details now requires a type
- /details will return a status 400 response on invalid types
Instead of only using the package name as a fallback to resolve the conflicts, it's now used as the first path with the group renames only used for conflicts within packages, this should make it clearer what the symbol may be about when it's shown in the similar names footer.
This also makes the names a bit less dependent on the order the inventories were fetched in.
In addition to using the package name, conflicts within a package where both of the symbols have their group in `FORCE_PREF...
286472a chore: add start-dev task - vcokltfre
[python-discord/quackstack] New branch created: vcokltfre/chore/reload\-task
This PR adds the ability to run poetry run task start-dev to start uvicorn quickly for development with the reload option enabled
async def get_details(type: str) -> Union[ManduckDetails, DuckyDetails]:
Since we're using python 3.9 now, we can use list here instead.
7aee7f4 fix: remove = None from signature - vcokltfre
I.... legit didn't know that.
[python-discord/quackstack] branch deleted: vcokltfre/feat/typing
94df732 feat: add generation response types - vcokltfre
1d847f5 feat: use correct types on details endpoint - vcokltfre
80a8cd3 fix: make dertails type required & 400 on inval... - vcokltfre
0e38e04 fix: add model docstrings - vcokltfre
e94ee03 fix: resolve import order and docstring space - vcokltfre
ec6aac5 chore: use new moderators role - vcokltfre
[python-discord/bot] New branch created: vcokltfre/chore/modmail\-tag\-update
Updated modmail tag to use the new mod role (831776746206265384)
[python-discord/bot] branch deleted: vcokltfre/chore/modmail\-tag\-update
Connected!
I don't think the current output redirecting approach is a good way to do it, as it heavily influences the timing of code that has its runtime on the lower end.
Somewhat hacky to persist the state across runs, but something like this works as the setup code and doesn't affect code that doesn't interact with stdout.
import atexit
import sys
from collections import deque
if not hasattr(sys, "_setup_finished"):
class Writer(deque):
def __init__(self):
sup...
On various guides on the site such as the one on Installing Project Dependencies, you find the command line instructions at the very bottom of the page, below the (rather space consuming) guides for PyCharm.
On pages filled with images, it can be easy to miss the command line instructions for very important steps. Plus, it's likely that more people will use the command line instructions, si...
Is this still being worked on?
Yes, I'm working on it.
f168c05 Cooldown role only removed when help channel cl... - swfarnsworth
e5f93bc Delete _cooldown.py, which is no longer needed. - swfarnsworth
a05d284 Remove the claim_minutes configuration. - swfarnsworth
58fc616 Merge branch 'main' of https://github.com/pytho... - swfarnsworth
[python-discord/bot] New branch created: swfarnsworth/one\_help\_channel
This PR removes the cool down functionality from the help channel cooldown role, and instead applies the role when their help channel opens and removes it exactly when that channel closes, thereby ensuring that a given user is never the claimant of more than one channel.
If you test this functionality, please list which cases you tried.
@Kronifer
โข [How do I set or change the PATH system variable?](https://java.com/en/download/help/path.html)
I am using Cog.__name__ here not .__module__

Ah, yes. The reason I did this is that I wanted both the scheduler and the cache to have the same name. Hopefully it's not too much of an issue. A way to around it is to add an optional namespace argument to the scheduler init, although I'm not sure if that's desirable.
In what format? I can avoid keeping the bot instance as an attribute, and call the rescheduling separately from outside, but it doesn't seem to be better in terms of coupling. Otherwise, I need the rescheduling task object for the cancels and deletes to work correctly, as you mentioned above.
This closes #747
Description
added "centisecond to the json file.
Did you:
- [ ] Join the Python Discord Community?
- [x] Read all the comments in this template?
- [ ] Ensure there is an issue open, or link relevant discord discussions?
- [x] Read the contributing guidelines?
This hasn't been done yet and I would be able to get this completed. What is this "whole events thing" and does this change the frontend of this page, if so should I hold off?
The events page is being redesigned as species in #494, so all the links will be updated then anyway
Updated ping command
Made a better ping command.
Before:
After:
Important:
The bot will not reply to message(or to the sender of .ping command)
because I have removed that feature but I can add it back if requested
- [x] Join the Python Discord Community?
- [x] Read all the comments in this template?
- [ ] Ensure there is an issue open, or link relevant discord discussions?
- [x] Read the [contributing guidelines]...
GitHub Actions run 867234327 failed.
GitHub Actions run 867237081 failed.
GitHub Actions run 867243816 failed.
GitHub Actions run 867246207 failed.
GitHub Actions run 867247155 failed.
GitHub Actions run 867249756 failed.
Add permanent, types, expires_before, and expires_before as filter options for the bot/infractions endpoint. This let's us filter for only in-flight infractions to expire, and also lets us put limits on how far in the future we reschedule infractions if we desire to.
Make sure to only fetch infractions to reschedule by filtering by type and permanent status. We don't reschedule permanents as they will never be automatically expired, so they're a waste and clog to filter out manually. There is a PR for site to add the requisite filters (types and permanent).
We also only reschedule the soonest-expiring infractions, waiting until we've processed all of them before fetching the next batch by ordering them by expiration time.
This requires python-di...
PR's opened: python-discord/site#510 python-discord/bot#1609
Ok. I'll add tests for those validation failures.
Description
This is an extension of PR #726. It was planned to also add these two categories in that PR, but we didn't get enough quiz entries on "cs" and "python" and thus it couldn't be implemented. But now, thanks to lak, we got 30 questions each, which is enough!
Reasoning
I believe this would be beneficial to our community because they're programming, computer science and Python questions. These questions are very related to our server.
Proposed Implementation
Since all...
LGTM, but those indents though... could you revert them back to their original state, please?
A couple suggestions related to styling
Prefer x not in y over not x in y
to_schedule = [i for i in infractions if i['id'] not in self.scheduler]
I know this was using single quotes already, but our style guide says that we should prefer single quotes over double quotes.
params={
"active": "true",
"ordering": "expires_at",
"permanent": "false",
"types": ",".join(supported_infractions),
},
1dcf21b chore: Update guides to use poetry instead of p... - ToxicKidz
[python-discord/site] New branch created: update/docs\-pipenv\-to\-poetry
[site] Branch update/docs\-pipenv\-to\-poetry was force-pushed to `ad1a90b`
We've recently changed site, bot and sir-lancebot to use poetry instead of pipenv. This PR updates the contributing guides that still mention pipenv.
Hi, is there any context for this? Perhaps a conversation on discord or an issue on the repository?
As a side note, please donโt use the CI as your only linting. Run the lint locally, and maybe setup precommit to do it for you.
LGTM, but those indents though... could you revert them back to their original state (2 spaces), please?
Yes of course
@Objectivitix Please review I have made the requested changes.
Description
A command to convert the text args (passed to the command by a member) into an ascii art.
Reasoning
Well, just a fun command! People may find it fun using.
Proposed Implementation
Implementation will require an installation of third-party lib pyfiglet.
Would you like to implement this yourself?
- [x] I'd like to implement this feature myself
- [ ] Anyone can implement this feature
I don't know that this Idea is good or not
But I Guess using pyfiglet this can be done easily
I don't know that this Idea is good or not
Me neither but this is how a basic output will look like if this helps. (Not final product.)

@ks129 will you be able to finish up this PR?
Hi, is there any context for this? Perhaps a conversation on discord or an issue on the repository?
I just made the ping command of the bot more stylish
but to be honest, there isn't really a need for it.
As a side note, please donโt use the CI as your only linting. Run the lint locally, and maybe setup precommit to do it for you.
I used the "format document" option you get within Vscode to format the file
[python-discord/site] New branch created: lemon/smarter\-resources/tag\_filtering
7c67ea3 Test boilerplate - lemonsaurus
Description
A command which fetches (evergreen) forest images using unsplash API like earth_photos.
Reasoning
I and (many of us) find greenery "relaxing", thus a command for providing such photos will be good.
Proposed Implementation
Implementation will (mostly) be same as earth_photos, frontend will have all the appropriate details like it as well.
Would you like to implement this yourself?
- [x] I'd like to implement this feature myself
- [ ] Anyon...
I made the original ping command simple because that's what I was asked to do. There was no desire nor need for an overly complex ping command, so I didn't implement one.
I'm not convinced this'll lead to anything more than spam. People can already make ascii art outside of discord and paste in, and as a mod, 99% of that is spam, usually disruptive, and probably leads to some sort of infraction.
I'm not convinced this'll lead to anything more than spam. People can already make ascii art outside of discord and paste in, and as a mod, 99% of that is spam, usually disruptive, and probably leads to some sort of infraction.
yeah, understandable.
I don't think the demand for an if-else tag is there, though each tag needs to be bite-sized, so let's start with just ternary.
Sentry Issue: SITE-P
Unable to parse the GitHub repository metadata from response!
This is caused by us hitting github ratelimits, as we're not authenticating with the API.
a3c96d2 Authenticate with the github api to avoid rate ... - ChrisLovering
[python-discord/site] New branch created: auth\-with\-github\-api
Closes #512
Previously we weren't authenticating with the github API, which led to us hitting ratelimits on the github API.
These rate limits would raise an error when trying to re-fetch repo meta data on the homepage.
[python-discord/bot] New branch created: fix/float\-tag\-typo
This PR removes the extra as in the !floats tag.
Connected!
Connected!
Database has been completely copied to the JSON. Next step is to test, then PR Timeโข๏ธ
All questions tested. PR Timeโข๏ธ tmr
Is this issue not yet approved. I did make a pull request for this one
I don't think we should wait for tag grouping before moving along with this. It wouldn't change anything about the current functionality, we can group them later on when we merge the other PR.
Makes duck pond entries less common, by requiring more ducks for a message to be ducked.
Moving this to a different branch and changing the limit to 7.
20fd496 Up duck pond threshold to 7 - gustavwilliam
[python-discord/bot] New branch created: higher\-duck\-limit
Makes duck pond entries less common, by requiring more ducks in order for a message to be ducked.
For the record I think this will kill the duck pond, however, I also think it's good to try things out since it can be so easily reverted so... let's go for it!
[python-discord/bot] branch deleted: higher\-duck\-limit
Connected!
Have played around with it a bit and it seems to work fine. My only worry is that removing the timed cooldown creates a potential for trolls to quickly open and close their channel to mess with the system, I think that was one of the reasons for having a cooldown. On the other hand, being able to simplify the system is nice, and the amount of harm somebody could cause is likely pretty low and we would notice/deal with it pretty quickly.
To clarify, that would still involve limiting the hel...
Connected!
@wookie184 I don't think that concern was raised during the meeting where we green-lit this change.
I'm hesitant to have the "channel is closed and five minutes" cooldown as it re-introduces some of the complexity that this seeks to eliminate. I have also at times closed help sessions that have been overrun by trolls and instructed the claimant to open a new session, and I wouldn't want to lose the option to do that without penalizing the claimant.
Relevant Issues
Closes issue #753 and #747 , extends PR #726
Description
It was planned to incorporate these two categories in the same PR, however I didn't get enough quiz entries for them. But now, thanks to lak, I have enough! So in total, 60 new questions are added. I also changed the starting embed a bit to make it look nicer, made the variation tolerance stricter, and added some missing answers specified in 747 to the math & science questions.
Did you:
- [x] Join the [...
lint works, everything works, ready for review :D
My bad, I forgot that the role was already removed. In that case this isn't a change of behaviour in that regard so it's fine. This looks good to me, have tested and the role is added and removed correctly, with command !close and natural close.
You could add log messages for when the role is added or removed, as was in add_cooldown_role and remove_cooldown_role previously
Connected!
c9860a2 Update pixels token regex to false match less - ChrisLovering
[python-discord/bot] New branch created: update\-pixels\-regex
This new regex means there needs to be a minimum number of characters between each ., along with requiring there to be 3 "sections" to the API token.
This should reduce the number of false matches
Connected!
I can avoid keeping the bot instance as an attribute, and call the rescheduling separately from outside, but it doesn't seem to be better in terms of coupling.
Yes, that is exactly what I mean. The rescheduling function is part of the public interface anyway. It is better for coupling since it won't rely on Bot or even an event loop (for create_task).
Hopefully it's not too much of an issue
The logger name will be really long since__name__is full qualified and two fully qualified names are being concatenated.
A way to around it is to add an optional namespace argument to the scheduler init, although I'm not sure if that's desirable.
I'd be okay with it if it was really necessary, but I don't think it's important to keep the names the same. In fact, it may be a bad idea to use __name__ for the cache, since it will cause cac...
I am very much in favour of this, as it would be incredibly useful to me quite commonly.
For me, one of the biggest use cases would be inline usage of the docs commands.
There is another issue though: how does it handle multiple invocations in a single message?
Perhaps rather than commands in general it's just tags, this removes the complications of all the other commands which can be confusing. As for multiple invocations it would just take the first instance and use that
I'm not too concerned about get_role failing, but add_roles should have some exception handling. Failing to change the role isn't a critical failure; it shouldn't leave the system in an invalid/broken state. Some of the functions you removed were taking care of the error handling. I don't see why you can't just leave them in and keep using them.
Generally, you should probably wait until this is approved by a staff member. You shouldn't start it yet, as it might go to waste.
Okie dokie. Waiting for approval, Once approved you can assign me if possible.. Willing to work on this issue
Apparently they've been a sponsor for a long time, but are not listed. I'd love to add them, as an easy first PR.
Why?
Because we thank our sponsors by making them appear at the bottom of our main page. Thatโs how they get paid back for all the sweet services we get for free.
Closes #514
Added cloudflare to the bottom of the site sponsors.
Image:

It looks quite big, can we make it smaller?
@Akarys42 thats the size they give me, do you want it resized?
e9f1b6e Block some codes from status dog - ChrisLovering
[python-discord/sir-lancebot] New branch created: block\-some\-status\-dog\-codes
Description
This codes aren't server-friendly, so we block them.
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?
These aren't super uncommon codes. May I suggest we instead hardcode the values in without the images?
[sir-lancebot] Branch block\-some\-status\-dog\-codes was force-pushed to `8b5f411`
Connected!
Connected!
Hey, you should test before you push, because I get this error:
Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/discord/ext/commands/bot.py", line 618, in _load_from_module_spec
setup(self)
File "/bot/bot/exts/evergreen/trivia_quiz.py", line 593, in setup
bot.add_cog(TriviaQuiz(bot))
File "/bot/bot/exts/evergreen/trivia_quiz.py", line 202, in __init__
self.questions = self.load_questions()
File "/bot/bot/exts/evergreen/...
@ToxicKidz I did test all 60 questions before, the error arose during the commit (copy paste error smh). It has been resolved :D
I've run the TypeScript compiler both with and without and there's no difference, so I'll remove them.
The default is 10,000 already which seems to work well, but I'll explicitly define it.
From an initial glance, should we have to worry about both the type and types parameters being used together?
If you use request.path instead of request.build_absolute_uri you can avoid the URL hassle and just strip /pages/ from the path.
Similarly, has this been discussed somewhere? I do see the point of this change though.
I think this can be refactored to avoid an unnecessary HTTP request to Github.
We can already differentiate between pages and categories in the view (pydis_site/apps/content/views/page_category.py), so we could for example add the template name to the context in get_context_data, then use that to determine the URI path for the Github link.
What's the reasoning for this removal?
maybe limit it to commands that are meant to respond with some content, like tags, docs, pypi
This should be Optional[str].
def load_extension(self, name: str, *, package: Optional[str] = None) -> None:
extensions_msg = "- " + "\n- ".join(self.unloaded_extensions)
54088a5 Recruitment: revert nomination order - Akarys42
[python-discord/bot] New branch created: reviews\-revert\-order
This makes review appear in chronological order, making it easier to say things like "^^ what they said".
Now we need a PR title hall of fame.
[python-discord/bot] branch deleted: reviews\-revert\-order
Connected!
It would be nice to be able to refer to both using the same name for debugging purposes, although it's not a must.
Just to be sure, you mean you want the rescheduling function to receive a bot instance and create the task there?
Or do you mean you want whatever instantiated the class to create the task? because then I still need an indicator inside the scheduler that the rescheduling finished.
I don't think we should wait for tag grouping before moving along with this. It wouldn't change anything about the current functionality, we can group them later on when we merge the other PR.
The PR is stalled because the group PR should also introduce the ability to pass in embed arguments through the tag file to be used as titles, after the issue is approved. I suppose it could also be done in a PR separate from the grouping functionality but I don't think it'd be worth complicating i...
[python-discord/site] branch deleted: update/docs\-pipenv\-to\-poetry
This was discussed in #dev-contrib and I think the consensus was that this was supposed to be removed. Feel free to provide alternatives.
This was also discussed in #dev-contrib
Originally, I meant that the user of the scheduler would call reschedule_all_tasks and keep track of the task itself, if needed. The responsibility of ensuring rescheduling is finished before attempting to delete something would be delegated to the user of the class.
However, on second thought, having to manage the task externally sounds inconvenient. I'd feel fine with passing an event loop to the scheduler so it can schedule task. As for waiting for the guild to be available, that coul...
I'm not too big a fan of pull requests that do one thing + many small other things that are unrelated and should probably go in it's own issue, but this is a small change. Do you have a message link to the discussion on #dev-contrib?
From an initial glance, should we have to worry about both the
typeandtypesparameters being used together?
I'm not sure, but I don't think so. At the moment, doing so behaves mostly as someone would expect. If you specify both type and types, and type is in types, then it will return only type results. If you specify a type that is not in your specified types you will get no results.
We could add an error condition for mixing of parameters like that, but if we do...
I would personally prefer strict parameter validation, although I'm not sure about others. It would go something like:
typeandtypesshould be mutually exclusive (or maybe just have one parameter for filtering by a type and multiple types?)permanentandexpires_*should be mutually exclusiveexpires_aftershould be beforeexpires_before
An alternative is to bring back the event object, and then the task can be created from outside.
Well, what do you think about just passing an event loop?
Yeah, that's fine, just throwing an idea
I like the idea, I wouldn't have it send the message in the ">". But other than that it would fit right into fun.py.
@Kronifer You can go ahead and implement this if you'd like.
@melodicht sorry, there seems to be more conflicts.
Once these are fixed, please ping me so I can review immediately.
Way too many conflicts. Best to make a new PR.
@soham4abc Please complete all checkbox items in the first post of this PR.
@soham4abc Please complete all checkbox items in the first post of this PR.
Done
From a cursory look at the PR:
I don't think this is a suitable way to store unloaded cogs in the cache. Currently, you manually serialize cog names by joining them with a pipe character, then setting it to a single key unloaded in the cache.
This is redundant when we have a cache to work with: Simply set the cog name as the cache key. That way, there is no need to even deserialize the cache into a dictionary on every time you want to modify the cache: Simply set and get the cog names...
6dc4dcd Added "centisecond" in trivia_quiz.json (#751) - soham4abc
Connected!
@SuperMaZingCoder what's the status on this?
If you can't work on this anymore for any reason, I can pass it on to another person if needed.
@Hillo111 would you still like to make a PR for this?
@Xithrius No, kinda lost interest
Would you still be willing to discuss how this would be implemented with others?
Would you still be willing to discuss how this would be implemented with others?
Yes
@NeilShah2026 This bot currently doesn't have a database, such as postres.
I don't think many users would like to be message automatically if the bot noticed a pattern that is set by some constant.
The bot does have a feature for bookmarking a message, so if the user wants to save something for later, they can always do so.
the other idea would be to make github requests a utility function since there's two cogs that request issues and make them share the method.
@onerandomusername There will probably be some commands in the near future that will need authentication, so I think we should go with this method.
Would you like to go ahead and put this together?
@vcokltfre I'd like to see this implemented.
hm. i just realized... this didn't get an explicit approval yet-
This may be true. @dannynotsmart if there was a conversation about this, could you link us to it?
If not, please follow the contributing guidelines more closely next time.
In the meantime, I will be the one approving this issue.
So in the end, would we have .github repo, .github user, .github issue, and .github pr?
Oh, of course we would. The thing is, you would really need some help if you want to implement it by yourself.
@KatsumiKougen
Oh, of course we would.
What is this in response to?
The thing is, you would really need some help if you want to implement it by yourself.
I'm not so sure, this would probably be a relatively simple PR to implement.
Hello, I'd like to implement this feature.
What do you think about the last point in the original post? It will allow for future flexibility, but it's not currently needed and complicates the class a bit. Then again, if we do need it, then adding it later will be a headache that will invalidate the caches.
I don't think I'll be able to finish this in time as I have a bunch of other stuff to do, sorry.
If you wish to continue this PR feel free to ping me (Akarys#2780) in Discord, and I can give you a very detailed runbook of what is left to do.
d16df79 fix: Remove the extra 'as' in floats.md - ToxicKidz
a830935 Merge pull request #1610 from python-discord/fi... - ChrisLovering
20fd496 Up duck pond threshold to 7 - gustavwilliam
bd50454 Merge pull request #1612 from python-discord/hi... - mbaruh
725b8ac Add filter for pixels API tokens - ChrisLovering
asyncio.CancelledError is an exception
This should be consistent with other questions
"question": "What does ASCII stand for?",
@InvisibleOS seems like there is no activity done on this, if in case you have dropped this, may i do this? since I made it in lancebot.
@Xithrius No it doesn't. Ever since the new topics got added and after April, it just didn't repeat that often.
(I almost forgot that this issue was open lol)
I'll guess I'll close this issue?
dfb0888 Bump @fortawesome/free-brands-svg-icons from 5.... - dependabot[bot]
0152db4 Bump @typescript-eslint/parser from 4.17.0 to 4... - dependabot[bot]
ff55e3a Bump webpack-cli from 4.5.0 to 4.7.0 - dependabot[bot]
7a37633 Merge pull request #216 from python-discord/dep... - HassanAbouelela
200d2f6 Bump hosted-git-info from 2.8.8 to 2.8.9 - dependabot[bot]
310fa86 Removes Linebreak Linting Rule - HassanAbouelela
310fa86 Removes Linebreak Linting Rule - HassanAbouelela
97e97b9 Merge branch 'main' of https://github.com/pytho... - dawnofmidnight
2171021 Update code field styling after pulling upstream - dawnofmidnight
I will now obliterate this issue
That's almost otn worthy
But I can't find a good one
734e4ef Prefer using the package name as a prefix when ... - Numerlor
b6ccd03 Prioritize symbols depending on their group's p... - Numerlor
f00fe17 Add the doc group to FORCE_PREFIX_GROUPS - Numerlor
9d5567d Merge branch 'main' into doc-force-prefix-priority - Xithrius
58b1d27 Merge pull request #1606 from Numerlor/doc-forc... - Xithrius
Connected!
Yeah, alright. I initially had the whole command ready but I didn't know how to raise a pull request for it so I wasn't able to implement it.
Since types and type do a different query (IN vs =) I figured I'd leave them and make them exclusive to each other.
Otherwise, permanent and expires_ are now exclusive and expires_before must now be after expires_after.
hm... lak made these questions, i'll go confirm with him
from python docs:
Changed in version 3.8: CancelledError is now a subclass of BaseException.
i will wait for lak's response before further action
Great, thanks for the update @InvisibleOS .
@Akarys42 can you please assign this to me?
Thanks.
Doesn't this create a deadlock?
The scheduler calls reapply_role and it waits for reschedule_task. reschedule_task calls normalize_roles, which waits for the scheduler to be ready. However, the scheduler is not ready until all reapply_role are called. That's a cycle, is it not?
I don't see how moving it down after getting the role and guild makes a difference.
Do you not think it's worth raising an error?
What do you think about the last point in the original post? It will allow for future flexibility, but it's not currently needed and complicates the class a bit. Then again, if we do need it, then adding it later will be a headache that will invalidate the caches.
I'm not sure, but I have a feeling this would be better saved for another PR, especially since this one is pretty close to being done already. It doesn't sound like a terrible idea - I did store JSON once in redis for s...
Is this issue not yet approved? @dawnofmidnight
@soham4abc Consider it approved. Go for it!
@soham4abc Consider it approved. Go for it!
Thank you !!
I can't fully review at the moment, but could you reorder the "table of contents" at the top of both pages to match this new change?
I can't fully review at the moment, but could you reorder the "table of contents" at the top of both pages to match this new change?
Done!!
from lak:
It is a BaseException, not an Exception. Though maybe it should be rephrased to clarify meaning
i will rephrase it to be more precise and less vague
I would absolutely love this feature. A lot of times I need to send a command, then ping the person and explain to them what it was for.
Closes #613
Description
Added Rock paper scissors command which allows players to play it with bot.
Format
.rps
where option_name can be any of r, p, s, rock, scissor, paper in any case.
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 the [contributing guidelines](https://pythondiscord.com/pages/...
734e4ef Prefer using the package name as a prefix when ... - Numerlor
b6ccd03 Prioritize symbols depending on their group's p... - Numerlor
f00fe17 Add the doc group to FORCE_PREFIX_GROUPS - Numerlor
9d5567d Merge branch 'main' into doc-force-prefix-priority - Xithrius
58b1d27 Merge pull request #1606 from Numerlor/doc-forc... - Xithrius
[python-discord/bot] branch deleted: swfarnsworth/one\_help\_channel
f168c05 Cooldown role only removed when help channel cl... - swfarnsworth
e5f93bc Delete _cooldown.py, which is no longer needed. - swfarnsworth
a05d284 Remove the claim_minutes configuration. - swfarnsworth
58fc616 Merge branch 'main' of https://github.com/pytho... - swfarnsworth
3c04326 Remove claim_minutes constant. - swfarnsworth
Connected!
Connected!
This can be put inside the the command itself, there isn't a need to create a helper function for this.
Hello, and thanks for your contribution!
There are some lint issues with your PR, can you please fix those?
I'd also like you to try to write more descriptive commit messages. For example, rather than minor changes you can write Apply grammar changes to invalid move message, etc.
Since the code is relatively small, we can merge Game and the cog class together.
Constants are written in all capital letters and underscores separating the words as specified by the pep8 guidelines here.
Doc-strings aren't used for inline documentation, use comments here.
# Instead of putting bunch of conditions to check winner, we can just manage this dictionary.
@Shivansh-007 Thanks a lot for reviewing I have made changes you requested and resolved all the flake8 errors the PR faced.
Just a small review of changes done:
- Merged Game class and cog class
- Added Doc strings in all the methods
- Capitalised static variables
- Added missing types
- Removed dead code
- Changed @commands.groups to @commands.command
- Changed variable name to appropriate meaningful name(i.e. arg => move)
- Checked linting on local machine and tested bot in my se...
Great, I'll wait for reply of core devs if its fine or not and will change if required.





