#dev-log
1 messages ยท Page 91 of 1
Add a comment here describing the intended behavior?
Unfurl links only if the message containing the link:
- isn't in dms
- is not within the python discord
- is not within the incidents channel (handled in the incidents cog)
- and the message is in a staff channel
Also missing from here is the ability to configure other channels (which isn't required but would be amazing if we could get a channel whitelist and add staff channels to it rather than need to edit the code each time)
This also fails to account for nonstandard or newline delimited content. Example:
123456789012345678901234567890
123456789012345678901234567890
123456789012345678901234567890
is 60 characters, but this filter will truncate it to 50. I don't think we should do anything fancy here--it's very unlikely someone will link a message with nonbreaking spaces in it--but I think we should account for the newline case.
GitHub Actions run 1621756801 succeeded.
623056a Hash Cf-Connecting-IP if given, else remote host - jb3
[python-discord/forms-backend] New branch created: jb3/store\-correct\-ip
We store IP hash for anti-spam, however we've so far only being hashing the IPs of our NGINX proxy nodes, meaning the data cannot be used to prevent form abuse. This PR corrects that by instead inspecting the Cf-Connecting-IP header and if set hashing that, otherwise falling back to the remote host.
GitHub Actions run 1622226692 succeeded.
GitHub Actions run 1622235179 succeeded.
GitHub Actions run 1622292918 failed.
Given that the model already had an active field, was the original intent to change this rather than to delete reminders? What advantage is there to keeping around old reminders?
Can anyone think of a better name?
Also, putting the underscore prefix is unnecessary in cogs. We can work under the assumption that cogs generally will not have their methods accessed externally because the classes aren't meant to be instantiated directly, and there are very few exceptions where get_cog is used to get to a method. I realise the underscore is prefix is used inconsistently in cogs, but I suppose if that is to be changed then it needs to start being brought up in reviews.
Why not put this directly in sync_cooldown_roles?
Why reload the whole cog? Is it not sufficient to just call init_available() again?
In such case, I think you'd need to add a lock so it doesn't interfere with claim_channel.
Practically, The PATCH method allows modification of all fields on the model. We could leave it as it is as we will only be patching the active field. If we really want to restrict the PATCH to 1 field only, i.e, the active field, we can add a check to make sure the request body only contains the active field. But, I am not sure if we should have this check or leave it as it is?
Practically, The
PATCHmethod allows modification of all fields on the model. We could leave it as it is as we will only be patching theactivefield. If we really want to restrict the PATCH to 1 field only, i.e, theactivefield, we can add a check to make sure the request body only contains theactivefield. But, I am not sure if we should have this check or leave it as it is?
What is unexpected is the fact that you can create a new off-topic-name by PUTting (this is primarily ...
My comment above applies to PUT also. The reason for the creation of a new
object is django behaviour towards primary keys. This is from the docs
The primary key field is read-only. If you change the value of the primary key on an existing object and then save it, a new object will be created alongside the old one.
https://docs.djangoproject.com/en/4.0/ref/models/fields/#primary-key
On Sun, Dec 26, 2021 at 1:42 AM Bluenix @.***> wrote:
Practically, The PATCH method allows modifica...
eaaa081 CI: disable setup-python action on self-hosted ... - MarkKoz
I think what we discussed is fine then if it seems like it would be a lot of code to change it - it's not a big deal. Thanks for this, let's get it merged!
It's possible however I think I prefer the current implementation where the message is edited, and the drop-down component is removed after the timeout. I'll leave this conversation open and maybe a few other people can share what they think
Sentry Issue: SIR-LANCEBOT-7F
Our paste service currently has a length limit of 100000. The payload should be truncated before sending it (though probably to something more reasonable than 100000). You can use the other bot's interval ...
[python-discord/sir-lancebot] New branch created: aoc\-completer\-role
Description
This PR adds an hourly task to give a specific role to users who have completed all 50 stars and linked their Discord accounts.
This also adds the ability for members to be blocked from getting this role, where we have believe that the user in question didn't complete the stars themselves (such as copying answers from the internet).
Did you:
- [ ] Join the Python Discord Community?
- [ ] Read all the comments in this template...
GitHub Actions run 1622686155 succeeded.
GitHub Actions run 1622688111 succeeded.
[sir-lancebot] Branch aoc\-completer\-role was force-pushed to `20d816e`
GitHub Actions run 1622694429 succeeded.
[sir-lancebot] Branch aoc\-completer\-role was force-pushed to `6adc924`
GitHub Actions run 1622705666 succeeded.
This will break if a username has more than one account mapped to it. If it doesn't erorr out that can just be handled manually.
That probably should at least be an info log. Same for the other one.
GitHub Actions run 1622730453 succeeded.
9ff5fee Update issue config to allow blank issues - janine9vn
[python-discord/forms-frontend] New branch created: janine9vn\-allow\-issues
I'm beginning of the process of moving over the issues and tasks for Forms from Notion to GitHub. To do so, I need to be able to make issues.
Description
The backend currently treats IDs with different cases as separate entities. This is not the standard though and can be unexpected behavior for some folks.
Lowercase and uppercase IDs should be treated as the same.
Reproduction Steps
- Create a form with an upper case ID.
- Try to perform different operations on the form with IDs that have different cases.
For example: try accessing it from the frontend, updating it's content using the api, or deleting it using ...
[python-discord/forms-frontend] branch deleted: janine9vn\-allow\-issues
Description
Submitting a non mapping response to a form, such as a list, returns a 500 error. It should return a 4xx error.
Reproduction Steps
- Create a form with no required questions
- Submit an empty response to that form on the
/forms/submit/endpoint. See request body below. - The server should return a 500 error, and should generate a traceback on the backend (see below).
Request body:
{
"response": []
}
Traceback:
File ".\backen...
Description
We should look into how to test our backend Starlette code to ensure that changes do not invalidate existing validations, features or other components in the application.
Justification
We want to notice when things go awry before we deploy them to production, so we should aim to validate our model code to ensure we don't end up with dodgy data in our database.
Implementation
We'll need to pick a testing framework, Starlette also provides a testing client for autom...
05fbc0a Add modpings schedule feature - Shivansh-007
a97f068 (modpings): Cancel the task before scheduling i... - Shivansh-007
547f883 (modpings): Use separate scheduler for modpings... - Shivansh-007
f8fa9ba (modpings): Make flake8 happy! - Shivansh-007
9f53142 Merge branch 'main' into modpings-schedule - Shivansh-007
Description
Send a DM to a user after they have submitted a form. This may, or may not, include snekbox results if there is a code evaluation component.
Justification
Sometimes it is nice if users get notified about their submission. Code Jam participants and Esoteric Challenge participants should also get notified/a role added if snekbox evaluation goes correctly.
Implementation
This should be implemented as a Starlette background task. This has to ignore/handle all errors (...
[python-discord/bot] branch deleted: add\-dm\_sent\-field
GitHub Actions run 1622818738 succeeded.
Connected!
GitHub Actions run 1622823312 succeeded.
Description
If there is a code evaluation component to the form (i.e. code jam qualifier), the form should display the result and if the code has passed or failed the given unittests.
If it's failed, it should allow the user to re-submit as well.
Implementation
The data returned to the frontend is document on this Pull Request but will also be modified by this PR. ...
Description
forms-backend has some quite nice issue templates that we could likely also use here.
Implementation
Create similar (but adjusted to reflect what's necessary for the frontend) issue templates for this repository.
[python-discord/bot] New branch created: incident\-archive\-msg\-improvements
88cf001 Commit to be edited - TizzySaurus
I realised tonight that I never got round to fixing the tests so have just done so with the help of @HassanAbouelela and @onerandomusername :+1:
This PR now just needs a core-dev approval and it can be merged.
[python-discord/bot] Checks Successful on PR: #2013 Add text indicating when user fetched by message
GitHub Actions run 1622944671 succeeded.
15a846c Add missing bot parameter to call - TizzySaurus
[python-discord/bot] New branch created: fix\-dm\-sent\-feature
[python-discord/bot] branch deleted: fix\-dm\-sent\-feature
GitHub Actions run 1622972441 succeeded.
Connected!
GitHub Actions run 1622980243 succeeded.
e0cd77d Add missing infraction id parameter & change ct... - TizzySaurus
[python-discord/bot] New branch created: fix\-dm\-sent\-feature
13dcc91 Add missing infraction id parameter & change ct... - TizzySaurus
[python-discord/bot] New branch created: fix\-dm\-sent
GitHub Actions run 1622999905 succeeded.
89743e9 Add missing infraction id parameter & change ct... - TizzySaurus
[python-discord/bot] branch deleted: fix\-dm\-sent
GitHub Actions run 1623004978 succeeded.
Connected!
GitHub Actions run 1623009190 succeeded.
So my idea is for helpees (channel claimer) and helpers (role: helper+) to be able to tag a help channel with the helpee's needed topic/s of help. An example would be if a user had a question about pandas, they could tag it "pandas" using "!tag pandas".
To link the tag system with the help channels, we could have a help summary channel above all the help channels that displays all open channels (with #links) with their help tags or an unknown tag if no tags have been added. The channel cou...
Description
Show an error message on the form if the server responds with an unhandled error code during submission.
Handling of common errors such as malformed or missing input is already covered, but other unexpeted errors should be accounted for, as the forms currently load forever with no indication of error to the end-user.
Implementation
Add a check for the result of the submission post on the form page, and handle it as needed. There should be enough details for the user to...
Description
We should render a hcaptcha form on any form page unless the DISABLE_ANTISPAM feature is enabled. We should block submission on completion of these captchas and then send the captcha result to the backend.
Implementation
We should collect a captcha token and pass it on to the backend as a captcha field at the root of the submission object.
This issue is currently being implemented by #162
Description
A user can currently accidentally close a form in-progress, losing everything they have so far typed out. We should do our best to ensure that this doesn't happen.
Implementation
The browser provides an API for prompting a user before they close the tab. You may have seen on different websites.
Refer to this Stackoverflow question as well as the [MDN docs for this](https://developer.mozilla.org/en-US/docs/Web/API/WindowEventHandl...
shouldn't be an if here. it should always be true, and we want to remove the view either way.
this can error if the message has somehow been deleted when we try to delete it.
Might not worth be changing, given that there's not a wait_for_deletion or anything, so only a mod can delete it.
My actually most important message wasn't saved by github. Nor was my summary.
Looks pretty good, one comment about api requests :)
This should use interaction.response.edit_message() as that acks the response and edits the message in one request.
interaction.message.edit is a normal edit request, over the normal route.
Currently, discord.py views check if the interaction was responded after the callback returns, and send a deferred response if it wasn't acked.This ends up being two api requests.
However, if we use interaction.response.edit_message, that will only be one api request.
This is no longer blocked by python-discord/site#618 as its been merged!
What about telling the author how to do it if they're using 3.8 or lower?
Needs an error message.
No code review.
*This may not be accurate as I had a hard time checking out this branch, for some reason.
Description
Taken on the 26th

Steps to Reproduce
Look at the bot after AOC
Expected Behaviour
normal status or something
Actual Behaviour
countdown since aoc of the day that didn't happen
Known Impacted Platforms
- [x] Web
- [x] Desktop
- [x] Android App
- [x] iOS App
Possible Solutions
More complex date checkers that can ac...
So when a link is sent in the server, the link can be used with a command to run it with rendertron, a headless chrome rendering service written in javascript, with a little tinkering it works with Python too, (tried and tested), for example, if a grabify link is sent, the IP registered is that of the rendertron link(tried and tested again)
If I get an approval from maintainers I could start working on it :D
We have GH-1961, unfurling redirects.
Is this what you were meaning we implement?
I forgot to mention what it does, I'm dumb, but coming to the topic, it sends a screenshot of what the link has, suppose I send you a link: https://google.com it runs a headless chrome browser and takes a scrennshot.
If we were to implement this, I donโt think we should do it from the bot, but rather from a worker (doing it from the bot leaves us open to any vulnerabilities presented by the app). That means itโll most likely be JavaScript anyways.
Why rendertron? I see it uses puppeteer, whatโs the benefit of using it over puppeteer directly? If we do this in python, why not a python specific library?
Finally, whatโs the motivation behind this command, aka, what use cases are you envisioning for this.
Can I work on this? Should be easy to do with a constrained type.
Logging for not found members is up to the caller, I didn't want to make this default behaviour as it could be quite spammy depending on where it is called from.
This is copied directly from bot.
How does it break? if there is more than one discord id mapped to the same aoc username, then it would just overwrite and result in on of them being present.
Getting into a bad data situation like this is directly blocked in the command anyway, so shouldn't be possible.
This key is guaranteed to be here if _helpers.fetch_leaderboard() doesn't raise FetchingLeaderboardFailedError.
If it wasn't it would fail within fetch_leaderboard anyway, since this direct dict index is used in there too.
??? that .join is within the else block, so will never get hit if this line is.
Note that it will make any existing form with an upper case letter impossible to access until its ID is changed, which shouldn't be the case in production according to @HassanAbouelela.
GitHub Actions run 1623904822 succeeded.
GitHub Actions run 1623935121 succeeded.
This feature doesn't work at all in its current state
It does fail on aoc_name_to_member_id[...] if the user doesn't have linked their account
GitHub Actions run 1624007697 succeeded.
GitHub Actions run 1624021228 succeeded.
Ah, I had thought this comment was referring to the inner slice, missed the outer slice that will have this issue. Fixed in https://github.com/python-discord/sir-lancebot/pull/991/commits/c88abd4bd3bf427f732195aa88a1ca163fa17d2e
Connected!
GitHub Actions run 1624037961 succeeded.
As for rendertron, calling the api is super easy and can be done in few lines of code, I tried doing the same in various other libraries but to no avail, it needs selenium webdriver
Use cases are plenty, for starters, when someone posts a link in the server to check the contents of the website we could use this command and then it sends us the screenshot, and verify if the link is safe, and as for grabify links and other malicious links of the sorts could be verified using this.
I don't think this needs to raise a sentry issue.
Either it can be just an info log, or it could send a message to Channels.mod_meta.
Thinking on this more, we should remove them from the cache if they don't have the mod role too, otherwise this will just be hit on the next time the cog starts.
IMO this would make sense to be info log, remove from cache & message in mod-meta
That benefit youโre explaining comes at a pretty hefty cost for devs, since youโre trading install difficulty (itโll still be difficult because we need to add npm), with storage (puppeteer on its own is 300mb on average?).
As for grabify links, theyโre outright banned from being posted on the server, so it wonโt serve that use case. If youโre looking for a general utility to do this, one of the existing websites that do this seem a better fit.
Connected!
Rendertron doesn't need npm to be run, it's written in javascript agreed, it can be used using requests and url lib, but again since it fails the use case ig it will be of no use, grabify links can also be disguised as normal links for a few extra bucks
[python-discord/snekbox] branch deleted: feat/nsjail/102/cgroupv2
Connected!
Iโm looking at their GitHub, and Iโm not seeing any binaries, so I assume you need npm to install it
Description
Snekbox hangs while reading stdout from the NsJail processes. This is handled by NsJail._consume_stdout(). The specific line it hangs on is https://github.com/python-discord/snekbox/blob/94627e22c118060bdec1676f9dca16691617fa7d/snekbox/nsjail.py#L120
I believe this happens because the amount of bytes being read is larger than the amount that's in stdout. Hence, the read() call waits until enough bytes become available to satisfy the requested amount.
Reproductio...
is the --time_limit 0 key here?
Not really. Without it, it was exiting with 137 cause it timed out. Although now that I'm trying again, I cannot reproduce this error at all...
Fixes #124
NsJail arguments now properly get forwarded. There's also support for passing Python arguments. This works by separating NsJail and Python args with a ---. The approach discussed in the issue, which was to quote all the Python arguments, does not work because argparse treats stuff that starts with a dash as an argument rather than a string.
One small note - for consistency with the other docstrings, how about something like
Checks who has completed all 50 stars and give them the completionist role hourly.
def web_scr(link:str) -> None:
BASE = 'https://render-tron.appspot.com/screenshot/'
url = link
path = 'ScreenShot.jpg'
response = requests.get(BASE + url, stream=True)
if response.status_code == 200:
with open(path, 'wb') as file:
for chunk in response:
file.write(chunk)
this is an API implementation of it
oh and ofcourse, import requests
Well, this isnโt running on python, the api is hosted by someone, and theyโre running it via JavaScript. We wouldnโt use it in our bot, as they ask people not to. If we were to use it weโd host our own, which is what I was alluding to with CF workers.
Regardless, I donโt think this is something that will be worth pursuing with the limitations listed above. If a demand for it presents itself in the future, itโll most likely be from the mod team, and we can reconsider then.
Thank you for your patience and time. :D
Connected!
The embed already says they were added in 3.9 though
Oh wait, I missed it while reading
What about telling the author how to do it if they're using 3.8 or lower?
Hmm, that's mentioned in the documentation I believe, and that might make the embed a little long. How about adding that next to the footnote at the bottom?
Each job in the test matrix has a different environment and thus covers different parts of the code. To get complete coverage reports, the coverage data from these jobs needs to be combined. There are two approaches:
- Upload each coverage file as an artefact and have another job download all artefacts and
coverage combinebefore publishing to coveralls. - Run coveralls in each job and have another job run
coveralls --finish, as shown [here](https://coveralls-python.readthedocs.io/e...
Currently, coverage data is generated with absolute paths. This means that if the coverage file is moved across machines, the source code must be in the exact same location. The current workaround is to configure Docker to mount the host's code to the same exact directory within the container. However, this doesn't work for Windows machines since the host's path is not compatible on the Linux container.
The relative_files = true setting can be added to .coveragerc to fix this.
Note ...
Is there an issue on coverage.py's repo as this sounds like a bug?
I know this is closed, but itโs listed under python, is it a useable open source bot? Because THIS is what Iโve needed for so long. Or is this a sever specific bot?
@NelsonBlvd Yes, this code is open source. See https://github.com/python-discord/bot/blob/main/LICENSE The bot is designed for our community's needs. So in that sense, it is server-specific. However, you're welcome to run your own instance of it.
Oh I would absolutely love to but I have no idea where to even begin
-Dylan Nelson
From: Mark @.>
Sent: Monday, December 27, 2021 10:27:03 PM
To: python-discord/bot @.>
Cc: NelsonBlvd @.>; Mention @.>
Subject: Re: [python-discord/bot] Support Anti-Spam Checks Across Channels (#665)
@NelsonBlvd<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2FNelsonBlvd&data=04|01||4183777a7f2e4a13e40108d...
GitHub Actions run 1629383183 succeeded.
Connected!
d061ab1 Add active field to OffTopicChannelName model. - RohanJnr
8232b11 Serialize name and active attribute. - RohanJnr
b2819a4 Use ModelViewSet to add support for PUT and PAT... - RohanJnr
28de14b Return a list of ot-names only for GET request ... - RohanJnr
69f4dc1 Return a list of ot-names only for GET request ... - RohanJnr
GitHub Actions run 1630970294 succeeded.
@ToxicKidz What's your status on this PR?
GitHub Actions run 1630979361 succeeded.
As far as I can remember, one of the reasons that we didn't want to include message counts in the !user command was to not "gamify" the number.
I feel like there's a chance this could increase spam, but also help those with good and bad intentions how close they are to getting voice verified.
GitHub Actions run 1631159577 succeeded.
GitHub Actions run 1631320578 failed.
GitHub Actions run 1631394875 succeeded.
94f5c99 Include message counts in all channels (#2016) - ChrisLovering
[python-discord/bot] branch deleted: include\-message\-in\-user\-embed
GitHub Actions run 1631414213 succeeded.
Connected!
GitHub Actions run 1631424665 succeeded.
4d47cae Remove latex cog and matplotlib - ChrisLovering
[python-discord/sir-lancebot] New branch created: remove\-matplotlib
Description
matplotlib, and its sub dependencies, caused a fresh install of an environment to take multiple minutes. As the latex cog is the only one that used it, and that is currently disabled, we have decided to remove it entirely.
Git gives us the benefit of being able to see deleted files. So whoever decides to implement latex again can use that for reference.
Did you:
- [ ] Join the Python Discord Community?
- [ ] Read all the commen...
GitHub Actions run 1631721006 succeeded.
Not enough content for me to nitpick :(
Is it convention for this bot to use redis as a database i.e. for persistent storage rather than as a cache for data that we're okay with losing?
sir-lancebot | 2021-12-28 20:14:11 | root | DEBUG | Error Encountered: TypeError - RedisObject._to_typestring only supports the following: (('f|', <class 'float'>), ('i|', <class 'int'>), ('s|', <class 'str'>), ('b|', <class 'bool'>))., Command: adventofcode block, Author: Mark#3118, Channel: general-meta-voice
sir-lancebot | 2021-12-28 20:14:11 | bot.exts.core.error_handler | ERROR | Unhandled command error: RedisObject._to_typestring only supports the following: (('f...
Couldn't hurt to add a check that this succeeds in getting the role. I had a misconfiguration when testing locally and it resulted in a traceback that was confusing at first glance.
Yea, lance doesn't have database setup, so redis is the defacto persistent storage. It's not as bad as it used to be, redis persistence that is, since it now has RDB and AOF, which we use in prod https://redis.io/topics/persistence
There currently isn't a way to remove them from the leaderboard directly, at least not from what I could see.
I guess something we could do is use this block list further up the chain and filter these users out while parsing the raw leaderboard data.
Cancel this when the cog unloads.
No, it's not. It is a possibility in event listeners though, which this was copied from.
Accidentally deleted the comment, so here it is again:
The block command is the only place where completionist_block_list is mutated. That command also removes the role before mutating. Thus, in what case could a blocked user still have their role? This role change seems redundant.
[python-discord/sir-lancebot] branch deleted: remove\-matplotlib
Connected!
GitHub Actions run 1631811139 succeeded.
GitHub Actions run 1631819158 succeeded.
GitHub Actions run 1631831875 succeeded.
Give members who have completed all 50 AoC stars the completionist role.
Will do when squashing
This isn't getting read anywhere any more. The task needs to avoid adding a role if the user is in this.
So you don't want to remove the role from users that have left the leaderboard?
I don't think that's all too important. If the user wants their role removed they can ask and we can block them.
The role itself will only last for a month after AoC anyway.
Yes, this was dumb of me to remove, I shall add back in the contains check.
[sir-lancebot] Branch aoc\-completer\-role was force-pushed to `56803b9`
[sir-lancebot] Branch aoc\-completer\-role was force-pushed to `0428269`
GitHub Actions run 1631947613 succeeded.
GitHub Actions run 1631948863 succeeded.
Comma splice
log.warning("Could not find the AoC completionist role; cancelling sync task.")
You undid the fix for this.
await self.completionist_block_list.set(member.id, "sentinel")
For consistency with the role's name, rename this to completionist_task.
[sir-lancebot] Branch aoc\-completer\-role was force-pushed to `d55cbc8`
GitHub Actions run 1632025215 succeeded.
e12af36 Store relative paths in coverage data - MarkKoz
[python-discord/snekbox] New branch created: feat/tests/135/rel\-path\-coverage
[snekbox] Branch feat/tests/135/rel\-path\-coverage was force-pushed to `4152f68`
Would be nice to get some feedback/confirmation message when this completes.
dc2e3a7 Inform invoker after successfully blocking a us... - ChrisLovering
GitHub Actions run 1632068529 succeeded.
[python-discord/sir-lancebot] branch deleted: aoc\-completer\-role
06a704a Add member util functions - Chris
21518ae Add hourly task to assign AoC completer role - ChrisLovering
e44460d Ability to block users from AoC completer role - ChrisLovering
d55cbc8 Condense conditional logic in AoC completionist... - ChrisLovering
dc2e3a7 Inform invoker after successfully blocking a us... - ChrisLovering
GitHub Actions run 1632096558 succeeded.
Needs an error message.
@onerandomusername Not sure how that's possible. I'm pretty sure there's an error embed for when no emoji is found.
I'll double check this.
caac1e7 Send "invalid input"-embed for invalid emojis - gustavwilliam
Seems like there was a bug with the implementation.
Should be good to go now, though.
<img width="457" alt="Screenshot 2021-12-29 at 01 39 17" src="https://user-images.githubusercontent.com/65498475/147617087-1f66164a-4a52-4ada-8a0a-8a917b846db1.png">
Could we include the issue on the coverage docs here?
I didn't want to because this problem is not quite the same as the one reported in the issue. I also don't foresee any useful information coming from that issue to warrant mentioning it.
[python-discord/snekbox] branch deleted: feat/tests/135/rel\-path\-coverage
@NelsonBlvd we have a guide on our website, but it requires that you set up other services, and set up your server in a very particular way.
If you don't want to do that, that leaves you with taking the relevant parts of the code that you want to use (linked above), and write a thin wrapper which just calls them.
[python-discord/sir-lancebot] New branch created: logging\-in\-AoC\-completer\-task
Description
This adds some logging to AoC role task to help with debugging issues, along with raising error when bot can't modify the given role in member helper util, rather than silencing it.
Did you:
- [ ] Join the Python Discord Community?
- [ ] Read all the comments in this template?
- [ ] Ensure there is an issue open, or link relevant discord discussions?
- [ ] Read and agree to the [contributing guidelines](https://pythondiscord.c...
GitHub Actions run 1634178844 succeeded.
[sir-lancebot] Branch logging\-in\-AoC\-completer\-task was force-pushed to `16edbba`
GitHub Actions run 1634189962 succeeded.
[sir-lancebot] Branch logging\-in\-AoC\-completer\-task was force-pushed to `0c043c8`
GitHub Actions run 1634218852 succeeded.
let's get some logging up in here
[python-discord/sir-lancebot] branch deleted: logging\-in\-AoC\-completer\-task
Connected!
GitHub Actions run 1634229944 succeeded.
I decided to use a hyphen instead of brackets since it looked weird when the user has a nickname
Haven't tested, but the code looks good :+1:
[bot] Branch incident\-archive\-msg\-improvements was force-pushed to `04db2be`
05fbc0a Add modpings schedule feature - Shivansh-007
a97f068 (modpings): Cancel the task before scheduling i... - Shivansh-007
547f883 (modpings): Use separate scheduler for modpings... - Shivansh-007
f8fa9ba (modpings): Make flake8 happy! - Shivansh-007
9f53142 Merge branch 'main' into modpings-schedule - Shivansh-007
Closes #1059
Incident archive messages now show when the incident was made and no longer displays when the incident was actioned as it's the same as the message timestamp.
Also removed some redundant escapes in the discord message link regex.
GitHub Actions run 1634656375 succeeded.
GitHub Actions run 1635016992 succeeded.
Connected!
GitHub Actions run 1635027373 succeeded.
[python-discord/bot] branch deleted: user\-improvement
681771b Add text indicating when user fetched by messag... - TizzySaurus
[python-discord/bot] Checks Successful on PR: #2013 Add text indicating when user fetched by message
GitHub Actions run 1635314201 succeeded.
I checked /proc/mounts for read-only mounts and /app was listed in there:
root@70b6714b9032:/app# grep "\sro[\s,]" /proc/mounts
sysfs /sys sysfs ro,nosuid,nodev,noexec,relatime 0 0
cgroup /sys/fs/cgroup cgroup2 ro,nosuid,nodev,noexec,relatime 0 0
/dev/sda3 /app ext4 ro,relatime,discard 0 0
proc /proc/bus proc ro,nosuid,nodev,noexec,relatime 0 0
proc /proc/fs proc ro,nosuid,nodev,noexec,relatime 0 0
proc /proc/irq proc ro,nosuid,nodev,noexec,relatime 0 0
proc /proc/sys proc ...
Connected!
Oh it's cause .:/app:ro is in the compose file. I guess it's not possible for a subdirectory to be rw but the parent to be ro?
GitHub Actions run 1635324019 succeeded.
It works on like this on windows, where the more specific volume can be rw
No... I can manually touch /app/pydis_site/api/migrations/x.py.
I can also write to that directory through Python.
You could just use docker-compose run --rm makemigrations.
You can't use this syntax yet unless you add from __future__ import annotations at the top of the file.
When do you get an AttributeError? It may be worth to it to attempt to fix what's causing it (unless it's supposed to raise AttributeError but I am failing to see where that would be).
Oops forgot to press "Submit review" on this one
Shouldn't this be list[str] according to the examples you have showed?
You can use Iterable[str] for both to work.
Good catch. I was writing this in 3.10.
The docstring might be the culprit here, since this always returns a string.
I'll look into some options for fixing this.
Do you think this is better? It looks more compact, but I'm not sure the readability is quite as good.
Either way, I'll look into changing the return type to str | None, so this might disappear.
You can't use this syntax yet unless you add
from __future__ import annotationsat the top of the file.
Even with the import, it would break if anything tried typing.get_type_hints as the syntax itself was added in 3.10.
I'll update the docstring.
What would the response be?
I don't quite remember, but I'll investigate. It might've been a past thing.
Python 3.9.9 (main, Nov 23 2021, 11:52:34)
[GCC 9.3.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>> from __future__ import annotations
>>> import typing
>>> def meth(foo: str | None):
... pass
...
>>> typing.get_type_hints(meth)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/home/.../.pyenv/versions/3.9.9/lib/python3.9/typing.py", line 1496, in get_type_hints
value = _eval_type(value, globalns, ...
Interesting. I might use Optional[] for now then ๐๐ผ
I'm rejecting this for the sake or readability. Unresolved this if you have a strong opinion regarding this.
I am closing this issue. We will be doing something different for the next event, but that will be planned in secret, as to not spoil the fun!
I am closing this issue. We will be doing something different for the next event, but that will be planned in secret, as to not spoil the fun!
I am closing this issue. We will be doing something different for the next event, but that will be planned in secret, as to not spoil the fun!
2e57050 Update in accordance with python-discord/kubern... - jb3
a48612d Pin platform in Dockerfile - ChrisLovering
08a508f Merge pull request #127 from python-discord/Pin... - ChrisLovering
4e5fd3c Update python dep to 3.9.* - ChrisLovering
3d1668f Merge branch 'main' into fix-grant_type - ChrisLovering
67650b6 Check for wrong token before all other checks - Bluenix2
a4ec55f Fix wrong grant types used when generating tokens - Bluenix2
745c06c Touch up api_token.html template after access t... - Bluenix2
f113b9e Correctly send enum value to HTTPException detail - Bluenix2
d10564c Validate that an access token isn't used to gen... - Bluenix2
67650b6 Check for wrong token before all other checks - Bluenix2
a4ec55f Fix wrong grant types used when generating tokens - Bluenix2
745c06c Touch up api_token.html template after access t... - Bluenix2
f113b9e Correctly send enum value to HTTPException detail - Bluenix2
d10564c Validate that an access token isn't used to gen... - Bluenix2
GitHub Actions run 1637660294 succeeded.
GitHub Actions run 1637662080 succeeded.
GitHub Actions run 1637663469 succeeded.
GitHub Actions run 1638061964 succeeded.
This is very nice :clap:
The main thing to change would be to extend the duration of the "still python logo," if you have time to do this. If not, I could probably give it a shot in Premiere later today.
Another concern I had initially was if the logo was too large in the frame, but after previewing this, it looks good:
GitHub Actions run 1638460709 succeeded.
None
Connected!
Looks great! Thanks for making this ๐
If you're wondering what my commits were for, I've deleted some of the files for the old logo, and made sure that what you made will work with the new branding manager. The bot will automatically rotate between every logo in .../server_icons/, so every logo in that folder must be meant for production.
0a62107 Added animated new years server icons - Harbys
2c55b74 Extended freeze frame to 3 seconds and moved fr... - Harbys
2d91a05 Make sure assets work with branding manager - gustavwilliam
71aecec Delete and rename old assets to be more accurate - gustavwilliam
c23e3df Merge pull request #169 from Harbys/master - gustavwilliam
GitHub Actions run 1638707505 succeeded.
6b0741c Fix faulty regex filters in migration 59 - mbaruh
[python-discord/site] New branch created: mbaruh\-patch\-1
Migration 59 populated the filters table with regex filters, some of which were faulty because the \b character wasn't escaped. This is fixed in this PR by making all patterns raw strings.
Making all of them raw was maybe overkill, but it sure does work haha
GitHub Actions run 1638940357 succeeded.
Gotta burn the bugs with fire @Akarys42
[python-discord/site] branch deleted: mbaruh\-patch\-1
GitHub Actions run 1638948978 succeeded.
Sentry Issue: SIR-LANCEBOT-7H
ValueError: 3 is not a valid AgeRatingCategories
(2 additional frame(s) were not displayed)
...
File "bot/exts/fun/game.py", line 294, in
pages = [await self.create_page(game) for game in games]
File "bot/exts/fun/game.py", line 377, in create_page
rating = ", ".join(
File "bot/exts/fun/game.py", line 378, in
f"{AgeRatingCategories(age['catego...
!infraction edit can take an ISO datetime to edit the expiration time, but there's no guard to prevent it from specifying a past date, immediately pardoning the infraction as a result.
The same goes for !infraction append.
[python-discord/bot] New branch created: purge\-to\-clean
This PR migrates our purgeban command away from Discord's native purgeban in favour of our custom logic.
Discord's native purgeban does not leave us with any evidence or context of what messages were deleted. So when mods reference the infraction at a later date, as example for an appeal, they are lacking required information.
Instead, we can use our custom clean cog to delete all messages from the user in question for the last hour, and automatically append the link to that clean log t...
GitHub Actions run 1641439916 succeeded.
Since this changeset introduces additional cross-cog dependencies, I'm planning on writing some tests for this new behaviour. Will get around to it later this evening/tomorrow.
GitHub Actions run 1641502703 succeeded.
GitHub Actions run 1641505583 was cancelled.
GitHub Actions run 1641506756 succeeded.
GitHub Actions run 1641521292 succeeded.
Member: @name [ID]
Actor: @Zig
Edited by: @Zig
Previous expiry: in [duration]
New expiry: in [duration]
Today at 12:00 PM
Current entries look like this, which can lead to confusion when moderators search the log by infraction ID.
Picture of current embed missing the infraction ID

Since this changeset introduces additional cross-cog dependencies, that could be unintentionally broken, I'm planning on writing some tests for this new behaviour. Will get around to it later this evening/tomorrow.
There are some aditional bugs with undefined behavior related to this, depending on how they are implemented.
Please check https://github.com/python-discord/bot/issues/2022#issuecomment-997541569 for more information.
(Also, Happy new year!)
Since this changeset introduces additional cross-cog dependencies, that could be unintentionally broken, I'm planning on writing some tests for this new behaviour. Will get around to it later this evening/tomorrow.
There are some aditional bugs with undefined behavior related to this, depending on how they are implemented.
Please check https://github.com/python-discord/bot/issues/2022#issuecomment-997541569 for more information.
(Also, Happy new year!)
I'm only importing f...
ca8d533 Add profile picture for filter webhook - gustavwilliam
[python-discord/branding] New branch created: filter\-pfp
Adds the following profile picture for the filter webhook:

GitHub Actions run 1641925109 succeeded.
GitHub Actions run 1641934154 succeeded.
[python-discord/branding] branch deleted: filter\-pfp
Some of the current logic in events/validation.py doesn't allow for the end date of an event to be "before" the start date. This means we can't easily have New Year's branding start in December and end a few days into January.
This requires some changes to the validation here, and I imagine it might take some changes in the bot's branding daemon.
See python-discord/branding#171.
Currently, at least according to the validation in events/validation.py in the branding repo, events can't go from December to January as the end date is earlier than the start date (meaning this only affects New Year's).
This may or may not need some changes to the bot as well, but it's definitely worth some time and consideration as we still have a full year left to implem...
d061ab1 Add active field to OffTopicChannelName model. - RohanJnr
8232b11 Serialize name and active attribute. - RohanJnr
b2819a4 Use ModelViewSet to add support for PUT and PAT... - RohanJnr
28de14b Return a list of ot-names only for GET request ... - RohanJnr
69f4dc1 Return a list of ot-names only for GET request ... - RohanJnr
GitHub Actions run 1643482415 failed.
Connected!
None
Connected!
[python-discord/sir-lancebot] New branch created: aoc\-changes
Description
This allows AoC commands to be ran in January, along with limiting AoC join to only be ran in Nov, Dec and Jan.
This also removes the aoc subscribe command, since Python has a replacement for it now.
Did you:
- [ ] Join the Python Discord Community?
- [ ] Read all the comments in this template?
- [ ] Ensure there is an issue open, or link relevant discord discussions?
- [ ] Read and agree to the [contributing guidelines](ht...
GitHub Actions run 1643689231 succeeded.
Please just remove this command entirely and add it to the aliases of the other command. No need having two commands that do the same thing.
GitHub Actions run 1643715901 succeeded.
No need for these to be variables, as they're only used in one place now
.aoc stats needs a restrictive decorator as well.
Might want to consider it for .aoc refresh as well, even though its staff only, it would cause a sentry issue.
.aoc stats needs a restrictive decorator as well.
Might want to consider it for .aoc refresh as well, even though its staff only, it would cause a sentry issue.
Feel free to open an issue. Don't want to delay this PR though.
Feel free to open an issue. Don't want to delay this PR though.
Everything else works, this will just cause a sentry error in February as the code isn't made for that. (Tried it with month override to February.)
If I don't open an issue sentry will
looks good enough, few bugs, but as stated above, worth the risk.
Feel free to open an issue. Don't want to delay this PR though.
Everything else works, this will just cause a sentry error in February as the code isn't made for that. (Tried it with month override to February.)
If I don't open an issue sentry will
"the code isn't made for that". Yes it is, you just need to set the AOC_YEAR env var, otherwise it will try to get next year's leaderboard.
Please don't make assumptions about the code and then say there are a "few bugs".
Yes it is, you just need to set the
AOC_YEARenv var, otherwise it will try to get next year's leaderboard.
No where is it documented that this variable has to be set in production. The contributing guide says debug, which I presumed would not need to be used in prod.

[link to guide](https://www.pythondiscord.com/pages/guides/pydis-guides/contributing/sir-lancebot/env-var...
While we won't be implementing this exactly as stated, we do have plans for an improved leaderboard next year.
Where we serve a webpage that has the joined up PyDis leaderboard, in an AoC style.
Since this will serve as the static leaderboard as described in this issue, I think we can leader this command alone.
Yes it is, you just need to set the
AOC_YEARenv var, otherwise it will try to get next year's leaderboard.No where is it documented that this variable has to be set in production. The contributing guide says debug, which I presumed would not need to be used in prod.
[link to guide](https://www.pythondiscord.com/pages/guides/pydis-guides/contributing/sir-lancebo...
While I don't mind it so much someone else, who is maybe new to contributing to our projects, would be put off by comments like this, so I wanted to raise it here so that it doesn't happen to someone else.
yeah ofc
[bot] Branch incident\-archive\-msg\-improvements was force-pushed to `1e0c0cf`
GitHub Actions run 1643891524 succeeded.
a51b28b Add infraction id to infraction edit modlog - TizzySaurus
[python-discord/bot] New branch created: fix\-bot\-2034
Closes #2034.
Improvements:
- Infraction edit mod-logs now display the infraction id
- Infraction applied mod-logs now have the previously missing colon (
:) - Edited some code to use the defined infraction id variables, rather than re-indexing the dictionary.
The below image shows the mod-logs for applying a mute, editing the mute reason & duration, and finally removing the mute:
 off from whatever timezone the bot is currently being run in. It's so far been unnoticed because in production it does run in UTC. However, this is still a bug as it's dependent on which timezone the bot runs in and impacts local development ...
Splendid job! Works nicely.
[python-discord/sir-lancebot] branch deleted: aoc\-changes
*chef's kiss* Thank you for implementing this! Your local events lead who is always in need of converting dates to epoch is very appreciative.
I have 2 small comments but they are by no means blockers.
Similar comment I left on one of D0rs4n's PR, but I'm concerned about someone not familiar with d.py knowing what the term "interaction" necessarily means. Maybe something like "Sorry, this response can only be used by ...") but I'm also cool if you think it's fine and want to keep it as is.
fun fact about this, if it's a relative/humanized date_time passed in (i.e. "in 30 minutes") then the await ctx.send(f"Date and time parsed as...") won't send, as the type of that is arrow.arrow.Arrow and not tuple.
If that ctx.send(...) was un-indented one more level then it would always fire, which I would like if possible. But I also don't think it needs to be changed, so feel free to ignore.
Connected!
GitHub Actions run 1644419527 succeeded.
https://github.com/python-discord/sir-lancebot/pull/983#discussion_r773506933
This was a misunderstanding on my part. When I read this comment from earlier, you said that you thought it would be useful if that line was sent for every invocation that used relative datetimes. I incorrectly assumed that you made a mistake and you meant that you wanted it for absolute datetimes. I'll commit that now
GitHub Actions run 1644499715 succeeded.
NIT: Would be nice to have total_recent_mentions in backquotes to indicate that it's a variable (as we do elsewhere in the project)
This final line doesn't read very well; "this would break in certain scenarios (such as codeblocks)." reads better imo
I'm not a fan of importing the entire project.
This should be from bot.log import get_logger, as per all other imports of get_logger
Relevant Issues
Closes #995
Description
Added missing enums to GameStatus, AgeRatingCategories and AgeRatings.
Did you:
- [x] Join the Python Discord Community?
- [x] Read all the comments in this template?
- [x] Ensure there is an issue open, or link relevant discord discussions?
- [x] Read and agree to the contributing guidelines?
GitHub Actions run 1644730416 succeeded.
Does what it says :+1:
For the record, I have tested this but have matched up all the values to the API docs so this should all work perfectly.
Connected!
GitHub Actions run 1644748016 succeeded.
11d00e7 Rename Roles.moderator to Roles.moderation_t... - TizzySaurus [71d800a](https://github.com/python-discord/sir-lancebot/commit/71d800add94df3d678786ab482747ae904290129) Rename Roles.admintoRoles.admins - TizzySaurus [dc5f73b](https://github.com/python-discord/sir-lancebot/commit/dc5f73be8c18ef11c701822e8c600c8fca7b149c) Rename Roles.ownertoRoles.owners - TizzySaurus [e2da188](https://github.com/python-discord/sir-lancebot/commit/e2da188b554aba07b6c5a7a25b8af0baa74973cb) Check role id in MODERATION_ROLES instead of co... - TizzySaurus [aa272db`](https://github.com/python-discord/sir-lancebot/commit/aa272dbe789e86013969bc6f4e506d70ddfc63be) Check role id in STAFF_ROLES instead of compari... - TizzySaurus
GitHub Actions run 1644754652 succeeded.
Connected!
GitHub Actions run 1644758380 succeeded.
value=f"Part of speech: {part_of_speech}\n\nMake sure not to spam, or you may get auto-muted!"
My only request, since I imagine people may get annoyed while playing this if they type quickly and then get muted by the bot for spamming.
MessageType is an enum, is that still possible to ensure its the certain value of the enum?
GitHub Actions run 1645189283 succeeded.
I've seen multiple places in both bots which rely on UTC timezone so I figured this was a non-issue.
Nonetheless, fixed in https://github.com/python-discord/sir-lancebot/pull/969/commits/4c451b170e0005726dac2489835045c1dc43ce62
Additionally did a rebase since there were changes to this cog.
GitHub Actions run 1645465314 succeeded.
There were merge conflicts, so merged with main.
GitHub Actions run 1645482553 succeeded.
I think that is resolved with the rest of the enhancements in #2001.
I can change this down to a info for now, and then in 2001 that can be changed.
I'm not a fan of importing the entire project.
Same. Although it is how the instance is passed around everywhere so...
Its used here.
https://github.com/python-discord/bot/blob/5ca6be08a3ea47f124c204c3d972ee8d9704b707/bot/rules/mentions.py#L56
I think this is more readable than if its moved.
GitHub Actions run 1645533178 succeeded.
Hmm, I see.
In which case that can stay, but I would still like to see a from bot.log import get_logger, which is also done in other instances of this scenario
NIT:
# We would need to deal with codeblocks, escaping markdown and any discrepancies between
```(you have a random period)
There's a random . in a docstring, and more discussion about the sum()
I was thinking moreso because the thing you're summing is not user.bot and msg.author != user, and so should go all on one line. The "extra" lines in sum are for what you're iterating over; not for expanding the condition.
Also, if you do move to one line, then not (user.bot or msg.author == user) is better in terms of efficiency, but it's arguably not worth the readability downgrade so will leave up to you.
# We would need to deal with codeblocks, escaping markdown and any discrepancies between
Right, this is correct -- an isinstance would likely give an error.
NIT: Slight nit that I missed, would be nice to have msg.mentions in backquotes too
Another missed point in my review:
This can be made tidier (and more efficient) by moving outside of the loop and then doing an early return, so that we aren't running the if statement every iteration. Something like:
total_recent_mentions = sum(...)
if not total_recent_mentions: # no mentions so definitely haven't gone over max mentions
return None # I personally prefer just `return` when breaking early
for msg in relevant_messages:
# ...
# ...
if msg...
GitHub Actions run 1646067861 succeeded.
Connected!
GitHub Actions run 1646074097 succeeded.
@KALLITAH, did you mean to open a blank issue? I'll close this in case it was opened by mistake, but feel free to reopen it with a description! Thanks!
Description
We are opening our forms project to outside contributors. This entails moving our Quick Start Guide off of Notion and onto site.
This would mean adding a Project Widget Box Thing for forms on this page: https://www.pythondiscord.com/pages/guides/pydis-guides/contributing/ and migrating the information currently in Notion over to forms.
We also need to make sure we include information for how to access the auto-genned documentation when people run it locally. A lot of the...
I could spin up a quick fix for this tonight
a possibility to stop people from doing this could be to refine the URL filter to grab these links and delete them if they are posted in pygen
@vcokltfre would it be okay if i take this one
LGTM, works as expected.
GitHub Actions run 1646984390 succeeded.
Connected!
GitHub Actions run 1646986315 succeeded.
GitHub Actions run 1647004025 succeeded.
Hey @doublevcodes, it's been a while, do you plan on resuming work on this PR or should we put this up for grabs? Thank you!
Hey @doublevcodes, it's been a while, do you plan on resuming work on this PR or should we put this up for grabs? Thank you!
Hey, sorry for the delay, I can finish this in the coming week.
Same here: just return Optional[tuple[int, discord.Interaction]].
I don't have any concrete suggestions here, but this method is pretty complicated. I don't understand how the game logic works
Does the interface really has to be the same?
You're already checking if the player is an AI or a Player. So maybe just do something like:
if isinstance(self.current, AI):
pos = await self.current.get_move(self.board, board)
interaction = None
else:
move = await self.current.get_mode(self.board, board)
if move is None:
# handle timeout
pos, inter = move
Connected!
GitHub Actions run 1647143752 succeeded.
You need to add the correct decorators - otherwise we can't use this in dev-branding for example.
Ah, decorators to allow it by default in all channels? Which ones do we use for that?
It seems like whitelist_check is what you're looking for.
whitelist_override() is the decorator that we use for this.
Whitelist override (the one below that) is what we actually use. On second thought, it might be best to hide the other function, but thatโs a problem for later.
Because it can be confusing, what you need to do is set the role override to the everyone role. You can see an example of that here:
10f626c Update GitHub issue closed emoji - ChrisLovering
[python-discord/sir-lancebot] New branch created: new\-issue\-closed\-emoji
GitHub updated their issue closed emoji from red to purple, this updates the emoji to relfect that new colour.
- [ ] Join the Python Discord Community?
- [ ] Read all the comments in this template?
- [ ] Ensure there is an issue open, or link relevant discord discussions?
- [ ] Read and agree to the contributing guidelines?
[sir-lancebot] Branch new\-issue\-closed\-emoji was force-pushed to `2c66844`
GitHub Actions run 1647221769 was cancelled.
GitHub Actions run 1647222258 succeeded.
I like the idea of the proposed UI, but I think it can be improved. Thoughts?
Suggestion:

- [x] Simplified time of report (less clutter, straight to the point)
- [x] Relative action time in footer (per @MarkKoz here)
- [x] Absolute action time as footer timestamp
crude suggestion diff
Relative action time in footer (per @MarkKoz here)
I discussed this with one of the core devs (I believe in a mod channel) and we decided we don't want this statistic, as it's often not particularly accurate - people forgetting to action etc.
Absolute action time as footer timestamp
For this I refer back to this PR description: "no longer displays when the incident was actioned as it's the same as the message timestamp." This isn't needed.
Simplified time of report (less...
we decided we don't want this statistic
Sure, makes sense.
when multiple reports by the same user are actioned.
In compact mode, if I want to see the date an incident was actioned, I would have to scroll to the first incident of that day, so adding the timestamp to the footer helps. Although, in practice the action time shouldn't be too distant from the report time, so the information is technically in the embed already.
Although, in practice the action time shouldn't be too distant from the report time, so the information is technically in the embed already.
I mean there are multiple instances where it's several hours after, simply because we're unfortunately not a 24/7 taskforce. Then there's the odd case of it being days later (due to being delayed by a ModMail thread etc.).
I think supported with the beginning of your message, that's enough rationale for re-adding the timestamp.
Connected!
GitHub Actions run 1647361831 succeeded.
GitHub Actions run 1649025416 succeeded.
Description
When users link to a github issue on discord via repo#num (e.g. sir-lancebot#999), we currently (as of #998) display a purple tick all the time if it's a closed issue.
Instead, we should display a purple tick only when it has a linked PR which has been merged, and otherwise a red tick (the tick from before #998).
Reasoning
This change will allow users to easily see whether an issue was closed due to "not going to be implemented" / "duplicate" etc. or whether ...
GitHub itself doesn't provide this distinction (a closed issue is just a closed issue), so I'm not how this would be implemented in a practically useful way.
For example, one way of doing it would be checking for linked pull requests as you say. However, that brings the question: should we also check if the linked pull requests was merged or closed without merging? This also doesn't take into account issues closed by just a commit, or issues closed without any PRs needed (e.g. actioned ite...
GitHub itself doesn't provide this distinction (a closed issue is just a closed issue), so I'm not how this would be implemented in a practically useful way.
For example, one way of doing it would be checking for linked pull requests as you say. However, that brings the question: should we also check if the linked pull requests was merged or closed without merging? This also doesn't take into account issues closed by just a commit, or issues closed without any PRs needed (e.g. action...
Looking at the current code it does seem to currently try and end at the right time https://github.com/python-discord/sir-lancebot/blob/532a8d53fca6c06a90d9bcb4862a36062750d359/bot/exts/events/advent_of_code/_helpers.py#L536-L539
Is the issue just that it isn't reset to what it originally was after this while loop?
If you have a bunch of ideas i'd say feel free to open a PR @Objectivitix, not sure what xith was planning though (was it that form thing we have you were going to look through @Xithrius?). If you both have some to add it might be easier to chuck them all in one PR.
I agree with all points made, and think they would make the helpdm system much more useful.
Were you intereseted in implementing any of this @Qwerty-133? (regardless, as a note if anyone would like to implement just part of this that would be fine as there's a couple of different things here)
There was a small bug in the modlog where the bot would attempt to fetch a message before the channel cache was ready, therefore causing an error. This was repaired by adding await self.bot.wait_until_guild_available() before the fetching, preventing that error from occurring again.
GitHub Actions run 1650557575 succeeded.
Along with the review comment, could you mark this PR as closing #2010 and closing BOT-9M
This line needs to be at the start of the function, as it's the get_channel call that relies on the cache existing, which wait_until_guild_available guarantees
should i add this to the top of most of the functions?
This line would be best at the start of the function, yes. It needs to be before the get_channel call at least.
ive added this to the top of the asynchronous functions that use the get_channel function call.
Could you push the changes too?
Is the issue just that it isn't reset to what it originally was after this while loop?
I think so, as someone restarted the deployment and the status reset.
Lmfao I'm stupid I'll get it pushed now
Alright, that should be fairly simple to fix, just adding a line after the while loop to reset it. Would you like me to assign you?
Just need to think of a way of avoiding hardcoding the activity text across the two files, could have something like a get_default_activity function in bot/bot.py, or just put the text as a constant in constants.py, not sure.
[python-discord/sir-lancebot] New comment on issue #502: Riddle command should operate like the Quiz
Im pretty busy at the moment. You can give both of my PRs to others interested.
Alright, i've removed your assignment. Feel free to let us know if you'd like to pick it up again.
GitHub Actions run 1650907392 succeeded.
GitHub Actions run 1651664938 failed.
Connected!
GitHub Actions run 1655208133 succeeded.
Description
After #901 was merged, I thought of 2 more ideas that I think might be cool to add to the Madlibs game.
- Add an "end game" button to end the game in case a user decides not to play after starting a game.
- Add an "add word" button that randomly chooses a word from a list of words and adds it to the game in case the user can't think of a good word to use for the game.
Reasoning
I think these features will enhance how this game works and I'm sure it will make the...
GitHub Actions run 1657572256 succeeded.
I discussed this a little more with other core devs, and we settled somewhere on trying to get TTL working with redis. SebastiaanZ/async-rediscache#17 came as a result of that, but after some more discussion with Sebastiaan, it's unlikely to be implemented in rediscache. Regardless, we have a backup plan that'll come as a result of some planned changes which are not yet public. Seeing as I can not currently work on this, either way, I'm going to be holding off until that change is ready.
Making the difference between closed resolved and unresolved is part of the GitHub roadmap and has not been implemented yet https://github.com/github/roadmap/issues/289
Shouldn't the duration timezone always be UTC?
Notice that datetime.utcnow() is actually timezone unaware (yeah, I know), which could become a problem since you wouldn't be able to compare the timezone-unaware now_datetime to the timezone-aware duration. In practice this will never happen since duration should always have timezone information.
Furthermore, even if duration's timezone could be something other than UTC, there's no need to take it into account when creating now_datetime, since comparing two datetimes in differ...
Forgot to make the above a requested change
Forgot to make the above a requested change
I'm not sure. I copied that line from the scheduler.
Also as a general comment, the staticmethods might be better suited as top-level functions, I think.
IMO CODE feels a bit vague as a variable name.
return hex(ord(emoji)).removeprefix("0x")
codepoint can be just str, right? I don't see anywhere the method can be called with a None/Optional. Even if there was, it would make more sense to handle the None at the call-site, not in the function.
In what way is this better? Clarity of what's going on?
Is this also for clarity? The actual result won't change.
Sure, raising an exception would probably be optimal when only looking at this function, but the output of this function is used in a place where returning an empty string makes things a lot simpler.
Considering this is Sir-Lancebot, I think it's fine to leave it like this, instead of making any larger changes to the code.
Also as a general comment, the
staticmethods might be better suited as top-level functions, I think.
@ShakyaMajumdar True. In an ideal world, I'd put a few of the @staticmethods in a bot/utils/emojis.py file. Might change that.
Yeah, I feel these strings methods are more explicit than slicing.
Yeah, this one's for explicitness too. Just nitpicking heh
If you make it return None, it wouldn't need a lot of change - just Twemoji.emoji(e) to Twemoji.emoji(e) or "".
GitHub Actions run 1660336810 succeeded.
Description
When no input is used in the command, the embed sent should have the url to the website.
Reasoning
Currently a blank .realpython command raises an error, but it could be helpful to have a link to the Real Python homepage instead.
Proposed Implementation
I have an idea for how this could work, but this can be a good first issue for someone starting out.
Additional Details
Would you like to implement this yourself?
- [ ] I'd like to...
Hi i can i contribute to your project , i am a fresher and looking for contributing to open source
can you assign me this issue
Sounds good! Have you read through the contributing guidelines and are able to test your fork?
https://www.pythondiscord.com/pages/guides/pydis-guides/contributing/contributing-guidelines/
https://www.pythondiscord.com/pages/guides/pydis-guides/contributing/sir-lancebot/
yes i have forked it and joined the discord server , as i am new to all this can me expain me on a meet if possible
@ToxicKidz What's your status on this PR?
Sorry, I got busy and forgot about this PR, again. I'll try to finish this PR by the end of the week.
Description
Hi everyone i just sported a bug in your documentation
in this documentation
under the section " Setting up a Bot Account "
point no. 6 " In the General Information tab, grab the Client ID. "
instead of " General Information tab " it should be " OAuth2 tab "
if i can improvise it do let me know i / community can create an issue and i ...
Documentation
Hi everyone i just sported a bug in your documentation
in this documentation
under the section " Setting up a Bot Account "
point no. 6 " In the General Information tab, grab the Client ID. "
instead of " General Information tab " it should be " OAuth2 tab "
if i can improvise it do let me know i / community can create an issue and i...
GitHub Actions run 1666478711 succeeded.
Bemyvalentine secret was already transferred to server only, aoc already runs in the server, and battleship is already guild only. I'd have to check minesweeper, but I don't see a reason for it to not be on the server.
minesweeper works only in dms atm, which with dms not being allowed breaks it currently, but I see no reason to not allow it on the server (I dont remember the orginal reason I made it dm only)
https://github.com/python-discord/sir-lancebot/blob/main/bot/exts/fun/m...
I had forgotten about the existence of this issue till now, but it was more or less resolved with #953.
Allowing a command in DMs needs to be done explicitly now, and we have not done that. Iโll be closing this issue.
We did kind of break minesweeper because it uses a command in DMs instead of just a message like battleship. We could either do what we do in battleship and have it listen to messages not commands, or we move it onto the server and delete the invocation to reduce spam.
Description
PR #953 explicitly blocked all commands which run in DMs, but minesweeper was missed in testing. Minesweeper commands only work in DMs, which makes the game unplayable.
Steps to Reproduce
Try to play the minesweeper game using minesweeper start.
Expected Behaviour
You should be able to respond to the bot.
Actual Behaviour
The bot will tell you you lack permissions to use the game commands.
Known Impacted Platforms
- [x] Web
- [x] De...
The duration timezone is always UTC. The Expiry typehint defines ISODateTime and Duration, which both convert their respective inputs into datetime objects within the UTC+0 timezone.
ISODateTime
Duration
[Expiry](https://github.com/python-discord/bot/blob/3824d...
Then now_datetime = datetime.utcnow() should be enough, if I follow correctly?
It should be enough. An alternative would be now_datetime = datetime.now(timezone.utc), as the datetime module says that datetime.now(timezone.utc) is preferred over datetime.utcnow() when it comes to creating datetime objects that represent UTC times.
I think a reason that ms uses dms is because of Python's spam protection. It is somewhat easy to send a few commands to ms in very quick succession.
Currently, when someone has already nominated the user, it simply says that the nomination already exists, but doesn't mention the user.
The same goes for when someone edits the nomination reason for a user, it doesn't mention the user itself just the fact that the nomination reason changed.
It's helpful to know who the user is because most of the time you won't know the user by their ID which most people use for nominating.
Permission to open a PR directly:
https://discord.com/channe...
Isn't target the person being nominated here, with actor being the person nominating?
GitHub Actions run 1669577512 succeeded.
Agh, skimmed through and I thought actor would be the person being nominated. Fixed it.
GitHub Actions run 1669943513 succeeded.
GitHub Actions run 1670321880 succeeded.
Hmm, looks like its not just for edits, setting a past time as the initial infraction duration seems to be allowed too


Connected!
GitHub Actions run 1670591993 succeeded.
await ctx.send(f":white_check_mark: Successfully updated nomination reason for {target.mention}")
Ah wait, I see what this is doing now, let me think.
When target is an int, it is a nomination_id, not a user_id, so this will never work.
it might be easier to do this using the nomination variable, that is the response from await self.bot.api_client.get(f"bot/nominations/{nomination_id}"). Since that returns a nomination object, which contains a [User object](https://github.com/python-discord/site/blob/ecf794b87a5fa8026e5cfd2f996a4ad...
[python-discord/bot] New branch created: eval\-mentions
3962e0e Restrict allowed mentions for !eval results - bsoyka
This restricts allowed mentions for !eval results (which were previously just the moderation roles) to only allow mentioning the user invoking the command.
GitHub Actions run 1672104000 failed.
Nit: This would probably be cleaner to read as a typing.NamedTuple. For example:
class UserGuess(NamedTuple):
answer: str
editable: bool
elapsed: float
This is a pretty pretty cool feature, thank you for the extensive PR description documenting it!
I've left a few comments for some smaller nitpicks of mine which would be great to address. If those along with the comments from the remaining outstanding review comments are looked through, I would be happy to give this the green approve ๐
It would be nice to specify the units in a comment here. Assuming it's seconds:
DEFAULT_QUESTION_TIME = 10 # in seconds
This is pure evil. I absolutely love it.
Actually, changing this until I see what the test fixes are like
Actually, changing this until I see what the test fixes are like
Hmm, do we not need to keep the initial and last newline? I recall that some codeblocks get weird formatting if you drop it. Could be wrong.
Some minor nitpicks, if you could get them worked out, consider this an approval ๐
IMO it's fine if we keep a git alias. As Python Discord is entirely on GitHub, it's nice to have a shortcut that just does what you expect it to.
Hi, any resolution on what we should do here?
Connected!
GitHub Actions run 1672221316 succeeded.
Hassan my beloved
After Mark's comments are addressed, this looks good to me.
Sentry Issue: SIR-LANCEBOT-7N
OverflowError: Python int too large to convert to C int
(1 additional frame(s) were not displayed)
...
File "bot/exts/utilities/epoch.py", line 37, in convert
return arrow.utcnow().dehumanize(argument)
Unhandled command error: Python int too large to convert to C int
The epoch converter raises an overflow error if the value is too big. We should add a...
f6b50c1 Fix snekbox tests with new allowed_mentions - bsoyka
GitHub Actions run 1672289065 succeeded.
Connected!
Relevant Issues
Closes #1004
<!-- Link the issue by typing: "Closes #" (Closes #0 to close issue 0 for example). -->
Description
Ignore OverflowError when parsing relative times. BadArgument is raised in the absolute time part of the converter if it cannot be converted there
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 discor...
I grabbed nomination['user'] and then ran await self.bot.fetch_user given the ID, and it seems to work well now.
One quick question - I know that fetch_user launches an API request so would we want to pull the user from the cache first and if that fails, run an API request on the ID? or is the user object already existing within the nomination object, specifically nomination['user']
Is there a need to fetch the user at all? nomination['user'] should have the id in it, so you can just do <@id> manually.
[python-discord/bot] branch deleted: eval\-mentions
Connected!
GitHub Actions run 1672369821 succeeded.
ce16d0d Change single quote to double quote. - ChrisLovering
[python-discord/sir-lancebot] New branch created: fix\-single\-quotes
Description
This trivial change is actually to try and reproduce a bug we had with our GitHub actions.
Did you:
- [ ] Join the Python Discord Community?
- [ ] Read all the comments in this template?
- [ ] Ensure there is an issue open, or link relevant discord discussions?
- [ ] Read and agree to the contributing guidelines?
GitHub Actions run 1672372119 failed.
Wait no whatโs this? We should be using โ.
4f82334 Remove trailing whitespace - ChrisLovering
[python-discord/sir-lancebot] branch deleted: fix\-single\-quotes
GitHub Actions run 1672400082 succeeded.
Connected!
GitHub Actions run 1672402806 succeeded.
dec4c72 Change single quotes to double quotes - ChrisLovering
[python-discord/bot] New branch created: single\-quotes
This trivial change is actually to try and reproduce a bug we had with our GitHub actions.
GitHub Actions run 1672410179 failed.
Oh wait, I forgot how mentions were formatted in the first place. Thanks!
[python-discord/bot] New branch created: add\-bot\-core
This PR adds bot-core as a dependency, using a commit hash to pin to a specific version.
While it is still quite rudimentary in what it is doing, adding it in early allows us to start adding features and actually using them within the bot.
Currently bot-core only has the invite regex in it, so this PR migrates all call to the internal regex.py file to the bot-core regex instead.
This also moves the message ID regex, that's only used once, to inside file that uses it. This moves the r...
GitHub Actions run 1674324817 succeeded.
[python-discord/bot-core] New branch created: add\-code\-block\-regex
This add code block regex to bot core, used by the issue cog in lance, and snekbox in bot.
[bot-core] Branch add\-code\-block\-regex was force-pushed to `741b4f0`
1cee292 Bump furo from 2021.11.23 to 2022.1.2 - dependabot[bot]
0ba4ecb Merge pull request #7 from python-discord/depen... - HassanAbouelela
af99e10 Bump sphinx-autodoc-typehints from 1.12.0 to 1.... - dependabot[bot]
784ec57 Merge pull request #10 from python-discord/depe... - HassanAbouelela
eb78220 Bump gitpython from 3.1.24 to 3.1.25 - dependabot[bot]
[python-discord/bot-core] branch deleted: add\-code\-block\-regex
GitHub Actions run 1674469389 succeeded.
Description
The following quiz question is missing "substitution" as a valid answer:
A ____________ reaction is the one wherein an atom or a set of atoms is/are replaced by another atom or a set of atoms
The accepted answers are "displacement" and "exchange" according to the bot, but "substitution" is also a correct answer. See this excerpt from Wikipedia:
"A substitution reaction (also known as single displacement reaction or single substitution reaction) is a chemical reactio...
29189d5 Add Doc Static Previews With Netlify - HassanAbouelela
Connected!
0a191a2 Fix aoc join in date logic - ChrisLovering
[python-discord/sir-lancebot] New branch created: fix\-aoc\-join\-logic
Description
Not using .value meant it was pulling the enum name, and therefore was failing the check.
Did you:
- [ ] Join the Python Discord Community?
- [ ] Read all the comments in this template?
- [ ] Ensure there is an issue open, or link relevant discord discussions?
- [ ] Read and agree to the contributing guidelines?
[sir-lancebot] Branch fix\-aoc\-join\-logic was force-pushed to `2d4636c`
@wookie184 Sorry for the late reply. Yes, the plan was just sift through the form.
if not (
Since, the first batch of condition will result in False, and the second one as well, since it's January and 2021+1
Why should the bot say the leaderboard isn't available if it's the right month?
GitHub Actions run 1674843531 succeeded.
I'm not sure I follow, this if block is to determine if it's not current AoC, if it's not, then we send the error and return.
Current AoC is defined by the AOC_YEAR var, which we set in the env. So currently, it's set to 2021.
Both parts would fail right now, so the user invoking can join the 2021 board. Come Feb, neither of the conditionals will pass, so the error comes up and the command returns early.
I tested it out locally, and it did not work.
Must have overlooked something.
Did you set the AOC_YEAR env var to 2021 locally?
Yes, of course.
Event tested out with 2022 just to make sure it won't work. (And it will with 2021)
No wait, you are right, sorry. i need to look into this more.
[sir-lancebot] Branch fix\-aoc\-join\-logic was force-pushed to `5276045`
Oh, alright.
The logic checked out but something was off ๐
GitHub Actions run 1674902552 succeeded.
Yea, too much negation, ands and ors combined. This should read a little easier now.
GitHub Actions run 1675146504 succeeded.
Connected!
GitHub Actions run 1675159327 succeeded.
I am confused by this, why the requirement? I can't find where the discussion was held about - it's not linked anywhere on this PR.
[bot] Branch enhance/backend/time\-util\-refactor was force-pushed to `43aeb9f`
GitHub Actions run 1675422809 succeeded.
[bot] Branch enhance/backend/time\-util\-refactor was force-pushed to `5092205`
GitHub Actions run 1675432114 succeeded.
Updated the PR with changes from main since @HassanAbouelela kindly expressed interest in reviewing this. I'd still like to test things by running the bot (which the reviewer will hopefully be doing regardless). I did do that originally, but it'd be good to do it again since the "merge" operation was complicated. Anyway, will get around to testing it myself soon.
Description
A slightly different implementation of the .latex command, hopefully with no memory leaks this time.
see also: #663 #668
Proposed Implementation
Previously, we were using matplotlib to render the latex, which seemed to hold references to the data even after we were done with it if the input contained invalid latex. This led to an increase in memory usage every time there was malformed input, and ultimately the bot would come crashing down because of memory limits on th...
save the output in a cache directory, and die.
Sadder words have never been written.
Yes, this sounds like a feasible approach. You'd need to find out what the memory footprint is of the process, and what the limit on concurrent subprocesses should be.
Relevant Issues
Closes #1009
Description
(See proposed implementation in #1009)
Did you:
- [x] Join the Python Discord Community?
- [x] Read all the comments in this template?
- [x] Ensure there is an issue open, or link relevant discord discussions?
- [x] Read and agree to the contributing guidelines?
GitHub Actions run 1676458202 succeeded.
GitHub Actions run 1677216271 succeeded.
[python-discord/site] New branch created: netcup\-sponser
netcup are now sponsoring us with servers! This PR adds netcup to both the footer and the sponsers list on the homepage.
We still have credit with linode, so they will be staying for now.
I have also updated some of the css to make the logos line up a bit better.
Screenshot:

GitHub Actions run 1677794615 succeeded.
GitHub Actions run 1677862664 succeeded.
LGTM! preview looks great
5c63524 Add netcup logo to page footer - ChrisLovering
d5026f3 Use an svg for django footer logo - ChrisLovering
2384d6c Shift footer images slightly to be better in line - ChrisLovering
0bca620 Add netcup logo to sponsor block on homeapge - ChrisLovering
8223dfc Merge pull request #641 from python-discord/net... - HassanAbouelela
[python-discord/site] branch deleted: netcup\-sponser
GitHub Actions run 1677895782 succeeded.
None
None
None
None
None
None
I have not tested locally but looks good to me.
Yeah, CODEPOINT/CODEPOINT_RE/ CODEPOINT_REGEX would be clearer.
GitHub Actions run 1679486849 succeeded.
I like the code!
I have a few suggestions.
Firstly, you could delete the file immediately after it gets rendered for memory purposes or we would run into a similar problem as before.
Secondly, on line 56 of bot/exts/fun/latex/_latex_cog.py, it seems that you are dividing CACHE_DIRECTORY by {query_hash}.png. This will raise an exception.
Other than that, I like the code so far.
I think you meant to do py image_path = f"CACHE_DIRECTORY/{query_hash}.png". Right now, you're dividing 2 strings by each other, which will cause an exception.
CACHE_DIRECTORY is a pathlib.Path instance, which supports the dividing operator.
I could not find the documentation for this, but the source for this is here: https://github.com/python/cpython/blob/2e6798f35260ff90129861ef1f289ac40c0396c2/Lib/pathlib.py#L851-L861
If you're curious, the docs are the first entry under the operators heading,
GitHub Actions run 1680601799 succeeded.
GitHub Actions run 1680610282 succeeded.
GitHub Actions run 1680619723 failed.
Thanks for the info! I'm excited to see this merged :) (I'll find this useful)
Doc item doc_item.symbol_id='rich.console.render_group' present in loaded documentation inventories not found on site, inventories may need to be refreshed.
[python-discord/infra] New branch created: jb3/auto\-issue\-workflow
Adds new issues to the To-do column of the Infrastructure GitHub Project.
48e3c57 Rename main.yml to projects_automation.yml - jb3
[python-discord/infra] branch deleted: jb3/auto\-issue\-workflow
Abstract
We need to migrate our PostgreSQL database to the new hosts. As per PDEP-0001 this should reside on lovelace.
Implementation
We will not be hosting the database within a container, and so should follow the regular installation processes for PostgreSQL on Debian 11. Most of this should just be interaction with the package manager, though we can use the PostgreSQL modules for Ansible t...
Everything looks good switching the regex util code location to bot-core and making it a dependency. Did not test functionality but everything looks 1 for 1.
Connected!
6b3f2e6 Inject extra public keys for DevOps members - jb3
[python-discord/infra] New branch created: jb3/wireguard\-devops\-team
This PR adds a variables file to the wireguard role and injects the keys as extra peers to the servers generated wireguard configurations.
This means that with a config file locally that includes all servers you can access the internal 10.0.0.0/8 ranges that services will be hosted on.
We could add a script for generating private wireguard configurations by automatically fetching the keys of the production servers.
[python-discord/infra] branch deleted: jb3/wireguard\-devops\-team
[python-discord/infra] New branch created: jb3/readme\-updates
Adds folder structure to README and updates some instruction formatting for local dev env.
[python-discord/infra] branch deleted: jb3/readme\-updates
We've decided to centralise the UFW rules within a single UFW role.
We need to be able to support:
- Default policy (deny all)
- Allow by port
- Allow setting comment
- Filtering by hosts (not all firewall rules make sense for every host)
- Some non-configurable sane defaults (e.g. allowing SSH)
Example of an [instance](#help-donut message) where it took us 8 minutes to unmute someone that triggered the newlines rule while getting help in a help session.
Quite often users setup a reminder, and when it gets to that time set another reminder for the same reason. This is usually because the reminder is to get them to do some task, and the user doesn't have time to do that task, so delays it.
We should support this workflow natively within the reminders, rather than having the user create a new reminder.
I propose that when the bot sends the notification for the reminder, the reminder includes some buttons that allows the user to re-schedul...
Another thing we could do for this is to have a list of titles, that get progressively more aggressive adn the bot goes through them as you snooze more an more.
For example
Your reminder has arrived!
Hey here's another reminder!
Are you actually going to do it this time?
Go do it now!
etc..
Can't you just do something like this?

Can't you just do something like this?
Edit: just saw your second comment, this isn't meant for that.
Sort of, but that requires you to type out the command again, this would just be a quick and easy button. Therefore actually supporting this common workflow within the command.
Sort of, but that requires you to type out the command again, this proposal would just be a quick and easy button. Therefore actually supporting this common workflow within the command.
Agreed, but according to your proposal, this only supports a definite set of possible re-scheduling times, in most of the cases one would need to rewrite the command to have their remind time, say 4hrs (example).
Also, for your second comment, I would love to see something like that even if this doesn...
Yea, supporting arbitrary snooze times wouldn't be included in this. Having common ones like 1 hour, 1 day, and the original reminder duration seems to be good enough though.
Please remove the trailing newline from the end of the file. It wastes space
and makes it harder for humans to read this file.
PublicKey = {{ key.pubkey }}
{% if not loop.last %}
{% endif %}
{% endfor %}
[python-discord/infra] New branch created: service/9/ufw
Rules included:
- Default deny policy
- SSH allowed
- WireGuard allowed
Other service-specific rules are loaded from roles/ufw/vars/main.yml, which will have a list of dictionaries, where each dict corresponds to options for the ufw module.

