#dev-log
1 messages ยท Page 62 of 1
dd24973 !user command says if user is "Verified" - swfarnsworth
[python-discord/bot] New branch created: swfarnsworth/info
Previously, the !user command would tell mods if a user is "Pending", which is True before they are verified and False thereafter. I think most of us are interested in whether or not they are "Verified", which is False when they are pending and True otherwise. This PR aligns the message in the embed with the expected semantics.
The context is never actually None. I don't see a reason for it to be optional. I suggest changing it to accept the msg_channel directly as an argument so the caller can pass ctx.channel on line 206. The argument should also be documented in the docstring e.g. "...success/failure message to msg_channel."
These should have error handling so it will sync as many members as possible rather than halting if it encounters a single failure.
Which category does it go to when created? Is the default satisfactory?
@ks129 I'm not familiar with the new system you have in place, but I'd like to review this since I was requested and this has been sitting for almost a month. I suspect most of the HTML is copy-pasted from existing wiki pages. Can you fill me in on what I need to look out for in the code, if anything? Would running the site locally and going through each page in my browser be a sufficient test?
Strictly speaking, a bare exception is a term attributed to except:. except Exception: is relatively much more justifiable. Anyway, I agree that the exception should be more specific in this case. In fact, the get should be using raise_for_status=True so that an exception is raised in the first place.
The log should also contain the HTTP status code from the response (which you can get by catching the correct error as mentioned in the other comment).
But when starting out with JSON
This statement could be interpreted as implying the error is a beginner issue, but that isn't really relevant. The emphasis should be on the fact that this often happens when a new empty file is created/opened, not on anything relating to the user's level of experience.
JSON is a very handy way of storing values
This introduction isn't necessary. This tag is about an error, not JSON in a generic sense.
your JSON is missing a critical character at the start
they require the following at minimum if you want to start out.
This isn't correct. The JSON standard basically expects the root element to be a "value". That term has a specific definition and that's what the error is referring to. The grammar defines a "value" as any of the following:
object
array
string
number
"true"
"false"
"null"
I don't think this tag necessarily has to go into such detail. It could jus...
While there may capitalisation inconsistencies anywhere, that's no reason to hold up the PR. Feel free to fix the rest if you wish, but you don't have to.
Thank you for this list. I have pushed a new change hopefully resolving these issues you pointed out.
611ef8b Add warning in readme to stave off hungry contribs - lemonsaurus
55d0733 Change Dockerfile to install pipenv dependencies. - lemonsaurus
Write a storage handler for Dropbox.
This should behave just like the Google Drive handler, just talk to a different API.
This should ideally be implemented via the Dropbox API, not via some client we have to install. See https://www.dropbox.com/developers/documentation
Right now I've got some extremely lazy testing inside the model classes themselves, and we'll want to move this into actual unit tests sooner or later.
I'd like to keep testing as simple as possible for this project, and am thinking this might be a good fit for pytest with no coverage requirements, and where we only test essentials
- Can all the classes be instantiated?
- Does the config system work?
- Can we use the application as intended?
- Are the utils working?
This will be part of v1.0
A storage handler that allows us to upload stuff to Google Drive, using the GDrive API.
Backups for the Redis database.
Backups for the MongoDB database.
Backups for the Postgres database.
The docker-compose should contain the images for stuff like Redis, Mongo and Postgres so that we can test this application locally. Even better would be if we could automatically set up these databases with some data, so that we can test getting some actual data.
I think it would be much more efficient to filter the repositories in SQL, using Django's ORM:
for cached_repo in RepositoryMetadata.objects.exclude(repo_name__in=self.repos):
cached_repo.delete()
Looks good to me (for the parts that I'm able to understand), besides the missing return annotations.
def __init__(self) -> None:
The item returned could be anything, but also it has the chance of returning None, hence the Optional.
def __getattribute__(cls, item: str) -> Optional[Any]:
def _patch_entries(cls, patch: _EntryMapping) -> None:
Sure, I don't mind this. The efficiency is pointless here because there's only ever like 6 rows in this table, but I think I like your code better and it's fewer lines.
cf75951 Improve the RepositoryMetadata cleanup code. - lemonsaurus
9efd0cb Include DestroyModelMixin to infractions view f... - ks129
f5ab88b Add tests for infraction deletion method - ks129
aaf7333 Increase per_page to 100 for GitHub API call. - lemonsaurus
a2992d9 Merge pull request #437 from python-discord/bug... - Den4200
13ffd12 Merge branch 'master' into ks123/infractions/de... - Den4200
13e09af Clean up stale metadata when HomeView starts. - lemonsaurus
bf5b581 Merge branch 'master' into hotfix/lemon/front-p... - lemonsaurus
cf75951 Improve the RepositoryMetadata cleanup code. - lemonsaurus
545f46c Merge branch 'master' into hotfix/lemon/front-p... - Den4200
2e6df20 Merge pull request #436 from python-discord/hot... - Den4200
[python-discord/site] branch deleted: hotfix/lemon/front\-page\-project\-sanity
[python-discord/forms-frontend] branch deleted: renovate/node\-14\.x
[python-discord/forms-backend] branch deleted: ks123/admin\-adding
[python-discord/forms-frontend] branch deleted: renovate/webpack\-cli\-4\.x
We should support webhooks to various services whenever a backup completes.
For our purposes, the most obvious webhook is to Discord. When the entire backup process completes, we want to send a webhook with a status report for the whole job.
For example, a report might look like this:
Postgres: [ok]
Redis: [ok]
Mongo: [failed]
9763dab Add bulk DELETE method to responses endpoint - ks129
f99dff1 Check does form exists in responses bulk DELETE - ks129
d41140f Let Pydantic validate bulk responses delete data - ks129
ff914d4 Merge branch 'main' into ks123/responses-bulk-d... - jb3
1760fe6 Merge pull request #46 from python-discord/ks12... - jb3
[python-discord/forms-backend] branch deleted: ks123/responses\-bulk\-delete
The tag should be named something like empty_json rather than just json.
I should've been more unequivocal. Listing out all possibilities isn't really beneficial and will likely serve to confuse people. 99% of the time people will either want an object or an array. Therefore, this tag should only mention those two cases e.g. "You probably want to use an array or object, blah blah blah..."
It should be clearer that an object is equivalent to a dictionary and an array is equivalent to a list.
Grammar
In short, this error means your JSON is invalid in its current state.
As I got into it more I realised there probably need to be some fundamental changes. Therefore, some of my earlier comments probably won't end up being relevant but I'll keep them regardless.
I stand with the others who already voiced their concerns about the YAML parser. Let's stick to using an existing YAML library.
Is there no support for references within the config file (i.e. an equivalent to my !REF constructor)?
Is there no support for something like _SUFFIX_NODES? Of cou...
This is presumably an unintentional artefact of a refactor.
I don't mind supporting multiple config files if you can get it to work right. However, I don't feel it is a necessary feature in general. Furthermore, I want to reiterate that this shouldn't be necessary for the server bootstrapping. In fact, I believe it'd be more cumbersome to have multiple files. As I stated before, it should be possible to write new values in a non-destructive manner. Furthermore, I don't foresee why it'd need to overwrite existing values.
Is it typical to define these before imports? I'm used to virtually always seeing imports first (only exceptions I can think of are module docstrings and copyright notices).
discord.py doesn't officially support 3.9 yet, because it's dependencies doesn't support it too. discord.py 1.6.0 will bring support for 3.9 (at least based on that what is said in server), so we need to wait until this.
[python-discord/bot] New branch created: ks123/raw\-fix
203454f Add check does user can see channel in raw command - ks129
Check is command invoker in message.channel.members (there is members who can see this channel) and when user is not, give feedback to user and return early. After this, I re-enabled command.
Name mangling indeed doesn't work when injecting variables inside the dictionary, which is a bit of a shame. Ideally, users should not define attributes starting with an underscore since they are resolved using the normal __dict__ attribute. Maybe we could add some code to forbid that?
Is it be possible for a .__module__ attribute to be empty?
As I stated before, it should be possible to write new values in a non-destructive manner. Furthermore, I don't foresee why it'd need to overwrite existing values.
I don't understand why (and how) we should write new values without replacing the previous ones, at least with the current setup. We don't have any needs for the old values, we can just get rid of them.
Storing and overriding defaults means that the config has to be re-patched if a default value is changed dynamically or if a module containing a class is reloaded. This can be avoided by attempting to look up the value in the config file's contents and falling back to super().getattribute if not found. This would entirely eliminate the need to patch since the user-configured values could be looked up in the global dictionary.
This is a very good point, and it has been changed in 5f8c...
Furthermore, I want to reiterate that this shouldn't be necessary for the server bootstrapping. In fact, I believe it'd be more cumbersome to have multiple files.
I'd also like to point you out to [this](#792787094468689940 message) message in the server outlining my current thoughts about the configuration, so we can share opinions on that :grin:
[python-discord/forms-backend] New branch created: ks123/sentry
[python-discord/forms-backend] Pull request opened: #47 Implement Sentry SDK and add Sentry releases
- Added Git SHA build argument consuming to
Dockerfile, what defaults todevelopment. - Inject Git SHA to Docker building in CI.
- Add Sentry SDK dependency.
- Add constants for Git SHA and Sentry DNS.
- Add Sentry SDK initialization to
__init__.py. - Add Sentry ASGI middleware.
Quick comment, how about we add a new key to the index response to return the SHA that is currently running? Literally a key called sha with the value of the environment variable or alternatively development or something.
Should we put this higher up the middleware stack to catch middleware errors? Maybe after the auth middleware.
c630355 Move Sentry middleware to higher position - ks129
We need to add the Sentry keys secret to the Kubernetes deployment. It should be as simple as adding a new entry to the envFrom list in the deployment manifest with a secret name of sentry-env.
491f228 Add Sentry DNS secrets listing to deployment - ks129
The bootstrapper only needs to write to the config the IDs of the Discord objects it creates. Neither default values nor IDs for existing Discord objects will be written. If the config already contains a given ID and it points to something valid, then no new Discord object needs to be created. Therefore, that value doesn't need to be overwritten. However, if an ID is invalid, then we can discuss the behaviour later e.g. prompting the user or overwriting invalid IDs without any prompt.
My p...
Except for manual user tampering, it's not possible as far as I know.
__module__ is already a string. Don't use __name__ .
In which cases do you think we could benefit from using a custom lookup function?
The idea was to use it to aggregate all Discord objects of the same type in the YAML config file keeping them local to their respective modules in Python. This would make it easier to manage them in the config under the presumption that they would most often be managed in tandem rather than individually.
Furthermore, keep in mind that the bootstrapper will need some way to access all the Discord objects....
The name could manually be mangled when stored in the dict. The metaclass knows what the class's name will be so this should be pretty simple.
I absolutely forgot about this. November was a mess of schoolwork on my end.
[python-discord/bot] Issue opened: #1341 Race condition resulting in a double close in help commands
It's possible for !close to fire at the exact same time as the autodormant check, which runs at a variable amount of time since the last messages. While rare, it results in a desynchronization of the bots internal management of help channel locations, and has in the wild resulted in a double-declaim of a help channel.
Essentially, the !close command can attempt to deschedule an idle check that is already running at that exact moment, resulting in both the idle check and the close command ...
I had intended to work on this after the refractor by using the lock decorator i made. However, it proved to be more complicated than it first seemed so I put it aside.
f3f75bb Add some simple unit tests instead of testing i... - lemonsaurus
Looks good to me, just one change on the error message.
await ctx.send(":x: You do not have permissions to see the channel this message is in.")
await ctx.send(
embed=discord.Embed(
title=random.choice(NEGATIVE_REPLIES),
description=f"GitHub user `{github_username}` was not found.",
colour=discord.Colour.red()
)
)
Otherwise, return empty list.
None will be returned when the GitHub user was not found.
This shouldn't use global bot's debug, but it's own environment variable instead:
debug = getenv('SPOOKNAME_DEBUG', False) # Enable if you do not want to limit the commands to October or if you do not
[python-discord/forms-backend] New branch created: ks123/optional\-questions
bf7d7f0 Add required field to question interface - ks129
[python-discord/forms-frontend] New branch created: ks123/optional\-questions
Added new required field to question model and implemented handling of optional questions to submit endpoint.
Added required field to match with backend after python-discord/forms-backend#48.
Code looks good, works well locally.
Connected!
Code OK, tested locally.
@WillDaSilva This PR have some conflicts, can you please solve them?
Connected!
4abfb4f Implements Select Input - HassanAbouelela
b1afa49 Update dependency @fortawesome/react-fontawesom... - renovate-bot
e989244 Merge pull request #53 from python-discord/reno... - jb3
32908eb Update dependency @types/node to v14.14.16 - renovate-bot
337ccc3 Update dependency webpack-cli to v4.3.0 - renovate-bot
be7c144 Merge pull request #55 from python-discord/reno... - jb3
1059bba Adds Demo Form to Main Page - HassanAbouelela
I tried to manually mangle the name, although because the attributes are looked up in ConfigEntry and ConfigEntryMeta, it will try to use one or the other to mangle the name, so it will use two names to resolve the same name, which just brings a ton of other issues.
In this case as far as I can tell there's no way to end up with an empty string. If cls._path_override is an empty string, it will have a falsy value and the module name will be used.
I believe you are looking at an older commit, this has already been solved :)
Alright, if I understand correctly, you want to put all the discord IDs under the same YAML-category, and not write it again in all the entries that use it?
If so, yeah, I don't think we should have many configuration files, that's a good idea.
Alright, I think I see what you want with the custom lookup path for Discord IDs. That said, instead of using a custom lookup path, why not do something like that?
class DiscordChannelEntry:
def __init__(self, channel_name: str):
self._channel_name = channel_name
def __get__(self):
return registry.global_configuration["discord.channels"][self._channel_name]
# Maybe use a public function?
def __set__(self, *_):
raise ...
### d...
yaml_content = yaml.full_load(file)
1dde4b2 Use yaml.full_load instead of manually giving a... - Akarys42
Connected!
10ab269 Update dependency webpack to v5.11.1 - renovate-bot
[python-discord/forms-frontend] New branch created: renovate/webpack\-5\.x
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| webpack | 5.11.0 -> 5.11.1 |
[![adopt... |
aa9fe9b Update typescript-eslint monorepo to v4.11.1 - renovate-bot
[python-discord/forms-frontend] New branch created: renovate/typescript\-eslint\-monorepo
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| @typescript-eslint/eslint-plugin | 4.11.0 -> 4.11.1 |
[, the precommit hook alerts me that I cannot continue.
This change seems to be successful for me.

Thank you for this information.
8673eff Fixes Range Wrap Bug - HassanAbouelela
6324384 Implements .env Loading - HassanAbouelela
[python-discord/forms-frontend] New branch created: add\-dotenv
Adds dotenv to project requirements, and loads environment variables in webpack config to simplify setup and usage of the application. Adds env file to gitignore.
Connected!
801f47d Update dependency webpack-dev-server to v3.11.1 - renovate-bot
[python-discord/forms-frontend] New branch created: renovate/webpack\-dev\-server\-3\.x
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| webpack-dev-server | 3.11.0 -> 3.11.1 |
[ |
It gets added to the very top of the channel list, and is only visible to admins, and possibly mods. It shouldn't matter too much either way, as that channel should only exist for a few seconds max.
I have had that exact same line of thought, but honestly, I don't feel too strongly about either case. I'll switch the order anyway because it's a lot more likely for the kick argument to not be passed.
The context is None when the wrapper is being called from the scheduler (Line). If we want to cut down on the arguments, we'd have to settle on not sending a message when the channel gets automatically unmuted/ when unmuting fails.
730979a Move code to the metaclass and use name mangling - Akarys42
8a9884f Allow customization of the lookup using _get_at... - Akarys42
6a5e2c8 Merge branch 'package-develop' of github.com:py... - Akarys42
23cc03a Add the !REF constructor - Akarys42
[python-discord/smartconfig] New branch created: ref\-constructor
730979a Move code to the metaclass and use name mangling - Akarys42
8a9884f Allow customization of the lookup using _get_at... - Akarys42
6a5e2c8 Merge branch 'package-develop' of github.com:py... - Akarys42
@MarkKoz I believe that's everything :D
I pushed a similar implementation of the !REF constructor to the ref-constructor branch, although I can't make it to work, could you please have a look? That said, I'm not sure if we need it to merge this PR or even for the first release.
Thank you for your initial code and this very good review, I don't know how I would have done it without you!
[python-discord/forms-backend] New branch created: ks123/role\-assigning
4bce323 Add default value to guild ID - ks129
Added new feature ASSIGN_ROLE (requires REQUIRES_LOGIN) and field discord_role (required when ASSIGN_ROLE flag added). Implemented assigning as background task on submit.
Note: New environment variable DISCORD_BOT_TOKEN must be added before merge.
[python-discord/forms-frontend] branch deleted: renovate/webpack\-dev\-server\-3\.x
[python-discord/forms-frontend] branch deleted: add\-dotenv
0e33f1c Add ImproperlyConfigured exception. - lemonsaurus
c6d9b52 Add support for Postgres 12. That's what we use. - lemonsaurus
571528a Add config.yaml to gitignore. - lemonsaurus
b066d72 Allow environment vars to be passed into run_co... - lemonsaurus
b7fdd14 Raise an exception if no config.yaml exists. - lemonsaurus
bf7d7f0 Add required field to question interface - ks129
10ab269 Update dependency webpack to v5.11.1 - renovate-bot
aa9fe9b Update typescript-eslint monorepo to v4.11.1 - renovate-bot
46a2912 Merge pull request #58 from python-discord/reno... - ks129
21f0b4c Merge pull request #59 from python-discord/reno... - ks129
Streaming and video permissions are currently disabled for non-staff or contributors. However, at times it's beneficial for users to share their screen to show the errors that they're getting. This currently requires an admin to apply the Video role to the person. Admins aren't always around, so this makes things difficult.
My proposal is that we should have a command to let mods+ be able to give the video role. This has a potential pitfall in that people may forget to remove it. My...
I haven't looked into it deeply but the red flag is that __getattribute__ is not checking if the value is a descriptor:
Another issue is the use of . as a delimiter. Remember, __module__ returns qualified names which also use dots as delimiters. Therefore, a YAML node's name could be one that contains dots. This is why the descriptor used a / as a delimiter in my implementation.
The documentation has some inconsistencies and needs more work, but I think I'm going to go over that after this gets merged so I'll leave the rest be for now.
This name is too verbose. The entire library is a config parser, what else could it possibly load? How about changing it to just load().
Name them root_node to help with readability. They're separate words, after all.
sub_node please. In fact, child_node would sound even better.
This was not resolved @Akarys42
8119d0d Update dependency @testing-library/jest-dom to ... - renovate-bot
[python-discord/forms-frontend] New branch created: renovate/testing\-library\-jest\-dom\-5\.x
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| @testing-library/jest-dom | 5.11.6 -> 5.11.7 |
[ | 1.2.40 -> 1.2.43 |
[ |
[python-discord/forms-frontend] branch deleted: renovate/eslint\-plugin\-react\-7\.x
@Harbys Mods and admins team have made decision that we should have this feature, so I take this out from stalled status and you can continue your work. But please read #1343 issue, because implementation should be little bit different.
We now have some basic unit tests. We should have a few more, but it's a good start.
This one is now complete.
We could just base the entire system on connstrings. For example, here's how our config might look:
databases:
- mongodb://username:password@host:port
- postgres://username:password@host:port
logging:
- ssh://username:password@host:port
storage:
- gdrive://username:token
rotation_days: 7
And based on this, it'll figure out what's enabled, what's disabled, and how to log into all these services. There's no need for enabled bools and environment variables and wh...
Allow black-box to SSH into some arbitrary linux service and fetch relevant logs.
- Logs from a specific Docker container on the local machine.
- Logs from a remote Docker container.
- Logs from a Kubernetes deployment
- Syslogs from a server
How can we boil these down to a set of simple connstrings?
docker://...?syslog://user:pass@host:portmight just SSH in and fetch the logs with a unix command.
How many of these problems can be solved by just SSHing to the target? Ca...
Before this project is 1.0, we'll need a complete readme.
- We need an example manifest that shows how to use this project with a K8 CronJob.
- We need an example crontab that shows how to use this project with crontab
- All sections need to be updated to reflect the latest design
- We should make a logo, and add it to the readme!
- Maybe add a screenshot or a gif if feasible?
- Maybe some badges? A footer?
I want a logo in the readme, so let's make one.
272d592 Reduce Margin On Closed Warning - HassanAbouelela
7c42f0b Clarify Demo Form State - HassanAbouelela
[python-discord/forms-frontend] New branch created: renovate/react\-router\-dom\-5\.x
235dc00 Update dependency @types/react-router-dom to v5... - renovate-bot
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| @types/react-router-dom | 5.1.6 -> 5.1.7 |
[:
Uncaught ReferenceError: exports is not defined
Must be solved before merging.
This shouldn't add reaction to add command invoke message, but bot response instead to avoid cases when user deletes message and then this is impossible to vote for this name, but name still exists in cache.
I've found many people in the help channels have issues caused by them having a venv active without realising, which are mostly caused by either:
1- their IDE made and activated a venv automatically, but they use pip via command line to install things (which is linked to their global env)
2- pip install ... is linked to a different interpreter than python ...
This tag is an attempt to explain what environments are, touch on the causes of these issues, and to give them a links to furt...
Connected!
Connected!
I like the idea of sending it on the first reply. It's quick and easy to navigate to again if you lost your help channel. Having a !claimed command kind of defeats the purpose for me, since it doesn't provide that "quick" feel anymore. I think a simple solution to what @/MarkKoz said would just make it opt-in / opt-out.
be0afb1 Fix the broken database tests by adding test co... - lemonsaurus
07e51bd Change the config loader to be less strict. - lemonsaurus
98ae001 Change BlackBoxDatabase abstract class spec. - lemonsaurus
6b56528 Implement new connstring methods into databases. - lemonsaurus
951bc37 Update database tests for new connstring methods. - lemonsaurus
2ede4b2 Update the readme to reflect changes in #9. - lemonsaurus
Our connstring parsers are currently too simple. We should try to adhere to the connstring specs used by Postgres and Mongo - for example, every part of the connstring is optional, so postgres:// is a valid connstring, as is postgresql://user@host.
Let's make some improvements so that these specs are at least more or less followed. Let Postgres and Mongo provide the defaults if these are not provided.
This is more or less done now, although I'll have to make some improvements to the connstrings. This will be handled in #13
We'll need some basic CI up for this project to keep a public GHCR image updated. This will be used in the k8s manifest.
Whenever we push to master, we should build this Dockerfile and push it to GHCR.
[python-discord/bot] New comment on pull request #1259: Added infraction search menu from user embed
This feature will be part of a bigger overhaul of our infraction management system.
e1a0a3e Update dependency @types/node to v14.14.19 - renovate-bot
[python-discord/forms-frontend] New branch created: renovate/node\-14\.x
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| @types/node | 14.14.17 -> 14.14.19 |
[ |
[python-discord/forms-frontend] branch deleted: renovate/swc\-core\-1\.x
[python-discord/forms-frontend] branch deleted: renovate/react\-router\-dom\-5\.x
b9d483c Watchchannel: Moved message consuming task canc... - ks129
ac302d3 Infractions: Fix cases when user leave from gui... - ks129
429cc86 Implement bot closing tasks waiting + breaking ... - ks129
177e4d4 Reddit: Remove unnecessary revoke task name cha... - ks129
1fd30fa Reddit: Don't define revoke task as variable bu... - ks129
Wait, don't merge this
c9e8340 Update discord.py to fix webhook message publis... - Den4200
[python-discord/bot] New branch created: dpy\-bump
[python-discord/bot] Pull request opened: #1345 Update discord\.py to fix webhook message publishing
This fix allows us to keep using the publish method of discord.Message.
Fully explained in #1342.
I have an inkling the failing check is due to this PR upstream
[python-discord/forms-frontend] branch deleted: renovate/node\-14\.x
#1345 should resolve the issue stated here.
ddd11e5 Oh yeah, it's called the main branch now. - lemonsaurus
This seems to be working now.
[python-discord/bot] branch deleted: fix\-webhook\-publish
94edd23 Update dependency eslint to v7.17.0 - renovate-bot
[python-discord/forms-frontend] New branch created: renovate/eslint\-7\.x
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| eslint (source) | 7.16.0 -> 7.17.0 |
[ |
[forms-frontend] Branch renovate/react\-spinners\-0\.x was force-pushed to `19d16bc`
@hedythedev Are you planning to continue working on this PR?
cf04425 Changed Python language hook to system. - Xithrius
[python-discord/sir-lancebot] New branch created: precommit\-pycharm
Exactly the same changes as PR 1334 on bot.
An old pipenv bug was eventually resolved, breaking precommit running properly within PyCharm. Setting language: system removes the need to set os.putenv('PIPENV_IGNORE_VIRTUALENVS', '1'), since it now defaults to being unset.
Success with this fix is documented within this screenshot, by adding an extra newline (for a total of 3), which flake8 rejects.
, since PIPENV_IGNORE_VIRTUALENVS now defaults to being unset.
Success with this fix is documented within this screenshot, by adding an extra newline (for a total of 3), which flake8 rejects.
, since PIPENV_IGNORE_VIRTUALENVS now defaults to being unset.
Success with this fix is documented within this screenshot, by adding an extra newline (for a total of 3), which flake8 rejects.

Looking at the icons now, I think the Sir Lancebot and Black Knight icons are probably fine and that vectorization isn't crucial, but a new icon for Zoot seems more urgent. It has far too little contrast and isn't very nice.
I think if we can produce a be...
Hi, yes! I've just been a bit busy, I will address the suggested changes
before the end of next week, I hope that's fine. Sorry for the late reply
~hedy
No problem! Do this when you can, just checking that you're still alive and well.
Have a good one!
d986277 Updates HeaderBar Tests - HassanAbouelela
[forms-frontend] Branch preview\-form\-rendering was force-pushed to `19b0267`
[python-discord/snekbox] branch deleted: precommit\-pycharm
Can you rebase to clean up the history? Four commits for this is unnecessary.
Connected!
[forms-frontend] Branch renovate/react\-spinners\-0\.x was force-pushed to `4b807af`
abd7209 Changed Python language hook to system. - Xithrius
4650188 Merge branch 'precommit-pycharm' of https://git... - Xithrius
688ffb5 Cleans Up Dependencies - HassanAbouelela
[python-discord/forms-frontend] New branch created: dev\-workflow
This PR makes a few changes to make it easier to develop the project cleanly. They are listed below:
- Updates requirements to only include the bare minimum to run. Moves things that are not strictly required into dev dependencies.
(This means deployments no longer have to install using the dev flag.) (dotenv is not disabled on deployments.) - Adds and enforces eslint on a project-wide level for ts and tsx files. Adds a workflow to enforce linting on the repository.
- Fixes pre-existin...
3649c2a Merge pull request #1078 from python-discord/su... - Den4200
239fa5f Revert "Disabled burst_shared filter temporarily" - jb3
226af0e Verification: add @Unverified role to config - kwzrd
5006105 Verification: refactor discord imports - kwzrd
8415ac8 Verification: define time constants - kwzrd
Works with long commands and their arguments.

Works with the smallest commands as well.

So far I haven't found any bugs with this command and the way that it's implemented.
Still deciding if this should exist within mod channels at all, since it may just be nois...
012f90f Removed possibility of exception via walrus. - Xithrius
f6c5136 Adds Pre-commit Hook - HassanAbouelela
de32c87 No nominaton reason blank replaced by italic None - Xithrius

Blank reason now replaced with None. This is the same as blank infraction reasons.
@WillDaSilva if you do plan on continuing to work on this, please fix the linting errors.
Remember to lint before you push via pipenv run lint!
@htudu if you happen to not want to work on this anymore, I can take over for you.
@ks129 Hello, what's the status of this PR?
If you happen to need an extra set of eyes/hands for reviewing/writing code, I'm down.
The Optional annotation still needs to be removed here, and left like it was before.
async def watch_command(self, ctx: Context, user: FetchedMember, *, reason: str = '') -> None:
I know this isn't a part of this PR, but I think these debug logs should be removed. They seem very out of place.
This should be put back to the way it was before, since there will always be a reason now.
footer = f"Added {time_delta} by {actor} | Reason: {reason}"
b336e97 Set reason to default as an empty string. - Xithrius
1757380 Removed unnecessary debugging logs. - Xithrius
@Xithrius This PR is waiting review.
@Xithrius This PR is waiting review.
I will review once I wake. Thank you for the response, have a good one!
@Den4200 Conflicts resolved.
[python-discord/bot] branch deleted: dpy\-bump
c9e8340 Update discord.py to fix webhook message publis... - Den4200
ac5c98d Merge PR #1345 - Update d.py to fix webhook me... - MarkKoz
Connected!
The unit test issues are being closed because it is no longer a priority to increase coverage. There are more important issues to tackle.
Would removing a reaction opt-out of the reminder? If so, would people spam-toggling the reaction be a concern for the reminders endpoint of our API?
I hadn't considered any extra opt-out functionality besides canceling, but if we want to implement something like that, we might have to add a cooldown. Regardless, I don't think we should necessarily react to users when they opt-in/opt-out, so the only concern would be from a bot resource standpoint.
One way to combat that would be to not run all the extra checks of whether the user has permission or not, etc, but to just add/remove users from a list. The checks would still run for the in...
Upstream reverted the PR causing the issue, so my assumptions were correct.
@ks129 if you want to re-review this we'll merge it after #72 and #54
[python-discord/forms-frontend] branch deleted: dev\-workflow
6929e66 Update dependency html-webpack-plugin to v4.5.1 - renovate-bot
[python-discord/forms-frontend] New branch created: renovate/html\-webpack\-plugin\-4\.x
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| html-webpack-plugin | 4.5.0 -> 4.5.1 |
[ |
[python-discord/forms-frontend] branch deleted: renovate/react\-spinners\-0\.x
[python-discord/forms-frontend] branch deleted: renovate/html\-webpack\-plugin\-4\.x
That seems like a good plan. After seeing the bots on the server for a while now, I agree with your observations.
As for the Zoot logo, I think lowering the value of the yellow could go a long way for increasing the contrast. The overall shape could also be refined to more clearly resemble a grail, making it easier to understand at a smaller scale. From the last two months with the icon, it has looked more like this shape )( in a circle, than a grail to me.
In short, I think that the foll...
36c7bb8 Update dependency @swc/core to v1.2.43 - renovate-bot
235dc00 Update dependency @types/react-router-dom to v5... - renovate-bot
1289d82 Update dependency webpack-cli to v4.3.1 - renovate-bot
b395569 Merge pull request #69 from python-discord/reno... - ks129
e1a0a3e Update dependency @types/node to v14.14.19 - renovate-bot
[forms-frontend] Branch preview\-form\-rendering was force-pushed to `d08f522`
Sounds reasonable to me.
[python-discord/forms-frontend] New branch created: form\-rendering
Closes this notion ticket.
- Fetches a form from the backend, and renders the question as well as the form page.
- Updates model in accordance with backend.
- Lays foundation for input validation and submission.
[python-discord/forms-frontend] branch deleted: preview\-form\-rendering
c9e8340 Update discord.py to fix webhook message publis... - Den4200
ac5c98d Merge PR #1345 - Update d.py to fix webhook me... - MarkKoz
67c971b Merge branch 'master' into Make_nomination_reas... - Den4200
Connected!
b6cb132 HelpChannels: use a more accurate lock for mess... - MarkKoz
79ebb42 HelpChannels: await init task at the start of e... - MarkKoz
4b62963 HelpChannels: prevent user from claiming multip... - MarkKoz
7a7fb02 HelpChannels: move function to the channel module - MarkKoz
31c50a7 HelpChannels: refactor stat tracking - MarkKoz
[python-discord/bot] New branch created: bug/help/1341/race\-conditions
Many other error messages in this cog use same format.
b9d483c Watchchannel: Moved message consuming task canc... - ks129
ac302d3 Infractions: Fix cases when user leave from gui... - ks129
429cc86 Implement bot closing tasks waiting + breaking ... - ks129
177e4d4 Reddit: Remove unnecessary revoke task name cha... - ks129
1fd30fa Reddit: Don't define revoke task as variable bu... - ks129
[python-discord/bot] branch deleted: ks123/raw\-fix
Connected!
2b5ec97 Update typescript-eslint monorepo to v4.12.0 - renovate-bot
[python-discord/forms-frontend] New branch created: renovate/typescript\-eslint\-monorepo
This PR contains the following updates:
| Package | Change | Age | Adoption | Passing | Confidence |
|---|---|---|---|---|---|
| @typescript-eslint/eslint-plugin | 4.11.1 -> 4.12.0 |
[.
- User's channel being unclaimed while their in the middle of claiming a new channel. This would cause their cooldown role to get incorrectly removed.
- Multiple unclaims on the same channel either from multiple
!closeinvocations or `!c...
I'd like to see seasons.py, branding.py, and the feature-specific constants all under one sub-package.
This will fail if the extension is reloaded, since that happens while the loop is already running.
Remove the names since they're obsolete.
When you were helping a user this morning, and they had screenshare on, I completely forgot that you had to have been the one to grant that permission. I'm not completely sure what that says about how obviously (or not obviously) ripe for abuse letting users screenshare is.
That being said, I think we would need to agree on what the moderation policy should be for different types of potential abuse. I think it's obvious that streaming porn would result in a permanent ban if we were able to...
We would have a command name typeface or tr. It could be multiplayer or single player.
What this would basically be is that the bot would generate text and send it in a picture which the user would have to type it and send the message, it would calculate the average wpm for of the user based on the time taken to type the text.
We should also have a leaderboard based on the time taken to type the text. There have been multiple occurrences where the members of the community wanted to type r...
I can't figure out how to get the the code jam or game jam pages. I've only managed to navigate to http://localhost:8000/events/ and the links in the event calendar are all broken.
I think we can still enforce the "there needs to be an adult in the room" theory we currently have in that we won't be giving the permissions unless we're there. Strangely enough people haven't done pinging me for the rights to stream. But I know that's anecdotal. I do see it as a valid concern.
The main thing is that I can't think of a better way to handle this. I'm typically the only admin who hangs out in there (not a rip on the others, just what I do), so I'm really the only one t...
@MrHemlock does that mean that we'd roll out this feature "silently"? That is, no announcement and with no system for requesting these temporary permissions? I suppose I'd be fine to trial that and see if we ever get an influx of users pinging the mods asking for permissions, and re-evaluate from there.
@swfarnsworth I think that'd be my preference for now. There are some features we really don't want to or need to blatantly advertise.
A user with no roles executing a moderator+ only command along with a regular command (typed incorrectly) that anyone can execute.

[forms-frontend] Branch form\-rendering was force-pushed to `eff7a95`
[forms-frontend] Branch form\-rendering was force-pushed to `996c14a`
This sounds like a good idea. If you feel up to the task, you can even use a Markov chain to generate the input and train it on something Python related.
Connected!
This is the outcome of a recent poll. I think the conclusion that I can reach here is that only helpers and below should get command suggestions.

Here are examples of a user at different roles executing commands incorrectly.
No-role user:

Helper:

Moderator:

Admin:

- Added a background task to the Games cog to re-fetch an OAuth key before the current one expires
- This is currently set to do it 2 days before expiry, but can be easily changed if we want more notice
- Changed env var from a single api token, to the client id and secret as required by the OAuth flow
Reasoning
- Instead of using a set period of time and using a `@tas...
Let me know if this is better suited to a a logger.warning, rather than error
I wasn't sure whether to unload the cog, or continue to use the current API token until it expires.
Currently set to 2. This means if renewal fails, we will have 2 days grace where the current access token will still work.
Just a couple tweaks and I think we'll be golden. I appreciate all the hard work you're doing!
Just needs some spaces to to make the role ID match the indentation of the other IDs
We'll want to add a default duration for the command. We're thinking 30 minutes would be a good one. Along with that, we'll need that default added to the config.yaml and the constants file.
The PR has been tweaked to fit both the work that has been done on the linked PR and after discussion of the needs and wants of the mods who will be using it.
This was somewhat addressed in #1333. Basically, I dropped support for clear(), which made it possible to await things instead of scheduling background tasks. There shouldn't be any more race conditions of that kind.
However, there could still be issues where cog __init__s have create_tasks that rely on one of the clients. The client will be None until the bot logs in but tasks get scheduled before client.run() is even called. The solution would be to have those tasks wait for t...
Thank you for confirming this.
Sorry, completely forgot about this PR. I will test things after reviewing the code itself.
What do you think about the suggestion below to make the code cleaner to read?
if any((
# Horizontal
board[1] == board[2] == board[3],
board[4] == board[5] == board[6],
board[7] == board[8] == board[9],
# Vertical
board[1] == board[4] == board[7],
board[2] == board[5] == board[8],
board[3] == board[6] == board[9],
# Diagonal
board[1] == board[5]...
Looks good to me besides one possible change.
I will begin testing now.
"""Tic Tac Toe game. Play against friends or AI. Use reactions to add your mark to field."""
```
Hello @scragly, what's the status of this feature?
Will you be continuing it?
Thanks!
I tried making this cleaner as it was hard to understand but for some reason comments never came to mind, should be better now. Decided to move it into a function as that also allowed to nicely loop it to make sure we avoid any symbols being overwritten in the doc_symbols dict
After looking into it further I've removed the check.
The current parsing can fetch most of them without failing, although in most cases it only spits out the hyperlink without any content, as usually the symbols only link to the page where the actual useful symbols exist; but there are things like howto/deployment/wsgi/index:configuring the settings module where it leads to actual content that's otherwise unreachable.
It adds back the couple tens of thousands symbols that'll probably ne...
@Xithrius Are you planning on finishing this? If I remember correctly, @SebastiaanZ was since he did #79 but I think he's been too busy. If you are, then the CI stuff here still needs to be migrated to GH Actions. Otherwise, I should find time to finish this myself since it is my PR after all.
By the way, why are you putting "rebase" in your commit summaries when it looks like they are merge commits, not rebases? If you were to actually rebase master, that would have required a force push.
@Xithrius Are you planning on finishing this?
I don't know how to properly test this PR, so it would probably be best for you to finish this up.
By the way, why are you putting "rebase" in your commit summaries when they look like they are merge commits, not rebases?
I've accidentally used the wrong terminology, thank you for pointing that out.
[forms-frontend] Branch renovate/webpack\-5\.x was force-pushed to `8401c0b`
https://pythondiscord.com/pages/contributing/sir-lancebot/sir-lancebot-env-var-reference/#tokensapis
Will need to be updated, The env var there has been replaced with 2 env vars. The current link in that table correctly explains how to get them.
https://pythondiscord.com/pages/contributing/sir-lancebot/sir-lancebot-env-var-reference/#tokensapis
Will need to be updated to reflect these env var changes.
The current link in the reference table correctly explains how to get them.
The old env var is not used anywhere now, so it has been deleted.
These 2 new env vars will need to be available within the bot's environment when this goes live (preferably before).
Currently, we create embeds from scratch every time we need them (ignoring paginators). I'm proposing that we creat an embed helper, that will help make embed creation simpler and increase the DRYness of our code.
In #1136, I proposed adding a trash icon to bot messages by default, and allowing commands to opt out. With an embed helper, this would be as simple as passing an optional no-delete argument set to True.
We've also discussed the possibility of making the embed colors more cons...
Discord py 1.6 was released yesterday, with Better support for 3.9 by bumping the dependencies. Probably worth investigating this now.
I have already slowly started upgrading Python and discord.py.
Relevant Issues
Close #431
Description
Removed default parameter override.
Reasoning
The default option for colors is 256, the number of colours 8-bit graphics has.
Screenshots
Before:

After:

Did you:
- [X] Join the [**P...
[python-discord/snekbox] New branch created: feat/deps/site\-isolation
Swapping out for a hostPath for pseudo-persistence.
hostPath:
path: /snekbox_dep_cache
type: Directory
9e78e3b Swap out configMap for a hostPath for psuedo-pe... - MarkKoz
Connected!
7446cea Document how to install additional packages - MarkKoz
dd307c7 Use a custom directory for exposed Python packages - MarkKoz
66e7a2e Install exposed packages separately during depl... - MarkKoz
89f7185 Add a Docker volume for the user base - MarkKoz
445c7ef Swap out configMap for a hostPath for psuedo-pe... - MarkKoz
7446cea Document how to install additional packages - MarkKoz

