#dev-log

1 messages ยท Page 78 of 1

regal archBOT
#
[python-discord/site] branch deleted: cj/minor\-adjustments
odd spireBOT
oak estuaryBOT
regal archBOT
#

Could we possibly add the python-discord/site GHCR package to docker-compose.yml?

I also thought about that, but decided against it, due to the docker initialization steps required to get the site up and running. I don't really want to duplicate postgres/init.sql across the repositories (albeit not sure if it's required in the first place), and if you have the site development set up locally, it's very straightforward to use it.

regal archBOT
#

Relevant Issues

Closes #782

Description

Adds a cog to run Duck Duck Duck Goose games. It randomly chooses cards for the game, then crops the corresponding card images from a pregenerated PNG file of every possible card and pastes them together into a board with index labels.

It listens for comments in channels with a currently running game for those that contain three numbers, and parses them as potential answers. The game ends either when the time limit is up (set at 3 minut...

odd spireBOT
oak estuaryBOT
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
regal archBOT
regal archBOT
oak estuaryBOT
regal archBOT
regal archBOT
#

This is an interesting approach. Why did you not go for a single "wait for", but one that requires the original initiatior of the action to respond? The current approach has no way of resetting the "certainty" counter for if you decide that you're not sure after the bot's additional questions (unless you reload the cog/restart the bot).

It could be that someone took it up to "2", decided to not go through with it, leaving the command already "locked and loaded" for someone else.

regal archBOT
#
[python-discord/site] New branch created: smarter\-database\-usage\-in\-repository\-metadata
#

These changes mainly aim to prevent multiple concurrent requests from
deadlocking the table due to the lazy evaluation imposed by objects.all(),
and introduce some quality of life changes whilst doing so.

To prevent unwanted locks, the following is done:

  • Instead of evaluating the first item of objects.all() only in order to
    determine when the table was most recently updated, we query for the least
    recent updated entry and use that instead. As we use .first(), the model
    ...
odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
#
[python-discord/site] New branch created: Update\-replit\-links\-for\-new\-branding
odd spireBOT
odd spireBOT
regal archBOT
regal archBOT
#

I thought about this initially but decided against it due to flake8 then wanting to wrap the line. I ended up with something like:

last_update = (
    RepositoryMetadata.objects.order_by("last_updated")
    .values_list("last_updated", flat=True).first()
)

or

last_update = (
    RepositoryMetadata
    .objects
    .order_by("last_updated")
    .values_list("last_updated", flat=True)
    .first()
)

and I think the current approach is much more readable....

regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] branch deleted: vcokltfre/tag/for\-else
oak estuaryBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

@MarkKoz I think the current duplicated functions should remain where they are for now. If we do decide to move these functions somewhere else, it should be within a different PR focused on refactoring.

The functions themselves in my own attempt of refactoring ended up taking a bit too many variables as arguments. That may have just been me though, and it was quite a while since said last attempt. Although at this point in time it seems to be still the same case.

Thanks fo...

regal archBOT
#
regal archBOT
regal archBOT
odd spireBOT
odd spireBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] New branch created: feat/mod/1664/resend\-infraction
#

Resolves #1664

The command added is !infraction resend . It uses the same ID converter that the other commands in the !infraction group use. It has the following aliases: !infraction send, !infraction dm, and !infraction rs (short for "resend").

Unlike the automatic DM, this command does not send the full reason for superstarify infractions. Instead, it sends the reason stored in the database, which is f"Old nickname: {old_nick}. {reason}'", where reason is the reason giv...

odd spireBOT
regal archBOT
#

According to the type annotation, the user argument may be a discord.Object. This does not have a mention attribute. This will lead to an exception when trying to send the confirmation message or log message. I don't remember why user can be discord.Object but I think it's related to users that aren't in the guild. I haven't tested to see if it's a bug in practice, but this should be looked into.

regal archBOT
#

I've seen it brought up a few times now, and I disagree with the notion that "advanced" users don't find templates helpful.

Templates have a few benefits:

  1. They guide beginners about what they should add,
    but 2. They also guide any user about what they should add.

You can know what you should add, but still forget something. I also personally find it easier to give the required details, when it's more of a questionnaire than an open-ended response. I'd personally like to see issue t...

regal archBOT
#
[python-discord/bot] New branch created: quote\-normalization
#

I agree with Numerlor about this all at once.

Regarding hook vs flake plugin, I prefer the plugin because I don't want us to tie ourselves up in maintaining and modifying the hook. A single person's changes will probably be minimal, and hopefully, they'll drop to 0 as they become more familiar with our code style.

To get over the initial hurdle of converting everything, I made a short script to go over the output of the flake plugin, and clean everything up. I tested AST equivalence, ra...

regal archBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
#

There are several approaches I can think of. Which one should be chosen?

  1. Go through the normal unmute process, then apply a new mute as a separate infraction.
  2. Unmute without sending them a DM for being unmuted, then apply a new mute as a separate infraction.
  3. Edit the existing mute infraction (and maybe send a new DM).

I am leaning towards option 2.

regal archBOT
#
[python-discord/bot] New branch created: feat/mod/1665/override\-auto\-mute
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

Regarding hook vs flake plugin, I prefer the plugin because I don't want us to tie ourselves up in maintaining and modifying the hook. A single person's changes will probably be minimal, and hopefully, they'll drop to 0 as they become more familiar with our code style. Manual compliance with the plugin is not all that difficult.

While I agree that it is a non issue after the first run, using the hook could make it easier for contribs, where they'd use their personal style that'd then be ...

regal archBOT
#
[python-discord/site] branch deleted: fix\-docker\-link
odd spireBOT
regal archBOT
regal archBOT
#

I think it is a good idea. Some people are using test bots in larger servers where not everyone could be trusted. Also, it is possible to accidentally expose your bot.

I would say it should be easy to disable, maybe even from inside the internal eval itself (ie. run the int e bot.get_cog("Internal").allow_everyone_eval = True)? But either way, it should be disabled for non-owners by default and if it is disabled I feel like it should be reset back on restart and have a big red message on...

regal archBOT
#

Description

Discord's timestamp feature will be rolling out to all platforms soon... ish ... probably. This timestamp takes an epoch timestamp to use in a rich/dynamic updating field. More information about this can be found here. I am not Xith a bot, therefore I don't know specific epoch times off the top of my head.

This command would take a simple datetime or a duration and then Lancebot would r...

regal archBOT
regal archBOT
#
regal archBOT
regal archBOT
regal archBOT
#
jb3
[python-discord/snekbox] New branch created: jb3/increase\-available\-pids
#
jb3

This PR increases the PIDs cgroup limit to 5. Processes spawned in snekbox will have up to 5 PIDs available, each sharing the same memory limits and environment as the parent python process. As far as I could see in testing this does appear safe and processes behave as expected, even when detatching from the parent and so on.

I'd appreciate if anyone with a local setup could give this a shot and play with things like multiprocessing, subprocess and any other low level proc interfaces.

regal archBOT
#
jb3
[snekbox] Branch jb3/increase\-available\-pids was force-pushed to `43e9523`
regal archBOT
regal archBOT
#
jb3
[snekbox] Branch jb3/increase\-available\-pids was force-pushed to `096a8d2`
regal archBOT
#
[python-discord/snekbox] branch deleted: jb3/increase\-available\-pids
night lilyBOT
#
Sir Lancebot

Connected!

oak estuaryBOT
regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

night lilyBOT
#
Sir Lancebot

Connected!

#
Sir Lancebot

Connected!

regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

oak estuaryBOT
oak estuaryBOT
oak estuaryBOT
regal archBOT
odd spireBOT
oak estuaryBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/branding] New branch created: vcokltfre/chore/remove\-quackstack
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
#

Description

Since introducing inline issue resolving, i.e. quackstack#9, the .issue command has been essentially useless - it contains the same information but with confusing syntax. I propose that we make the command show more detailed information about a single issue or PR. This information would include author info, creation date, and issue tags.

Reasoning

The command is, currently, essentially useless. This would mean that we could make use of the command again for better i...

regal archBOT
regal archBOT
regal archBOT
#
[python-discord/bot] branch deleted: new\-discord\-features
oak estuaryBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
#

PokemonGame
It would be fun if we add more games..making it intresting

Reasoning
Overall would be really fun to play with and later i will add some more features to it

Proposed Implementation
Got this idea from watching pokemon ๐Ÿ˜…..would like to implement this "who is that pokemon" from classic pokemon series..add then later people can view the stats to it

I would like to implement this feature myself

regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
#
[python-discord/bot] New branch created: utils/reminder/remove\-footer
odd spireBOT
regal archBOT
#
[python-discord/sir-lancebot] New branch created: Remove\-user\-input\-images
#

Description

Following a moderation decision, we have decided to not allow any commands that parrot arbitrary images back via the bot, or anything that members can run against other members with their permission.

Did you:

  • [ ] Join the Python Discord Community?
  • [ ] Read all the comments in this template?
  • [ ] Ensure there is an issue open, or link relevant discord discussions?
  • [ ] Read the [contributing guidelines](https://pythondisc...
odd spireBOT
odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

Abstract

The majority of the event for members was simpy placing pixels, they would implement the simple routes and authentication and then would call it a day. I am suggesting implementing several ways of authentication, this would have the member learn how to use all sorts of APIs, as well as keep them working throughout the event.

Implementation

Simply searching "How to authenticate web app" on Google is enough to find sufficient ways of authentication we could implement. Ra...

odd spireBOT
regal archBOT
#
[python-discord/bot] branch deleted: information/server/mod\_team\_role
oak estuaryBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] New branch created: fix\-reference\-role\-constant\-in\-\!server
odd spireBOT
oak estuaryBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] New branch created: ChrisLovering\-patch\-1
#
[python-discord/bot] New branch created: Akarys42\-patch\-1
#
[python-discord/bot] New branch created: ChrisLovering\-patch\-2
odd spireBOT
oak estuaryBOT
odd spireBOT
regal archBOT
#
jb3
[python-discord/snekbox] New branch created: jb3/shared\-mem
odd spireBOT
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] branch deleted: utils/reminder/remove\-footer
odd spireBOT
oak estuaryBOT
odd spireBOT
regal archBOT
regal archBOT
#

After discussion surrounding #122 it was agreed that the API should implement access tokens that members will have to use to interact with the API as well as keep track of and make sure they don't expire.

Preferrably the access tokens would have a lifetime of a couple of hours, with the refresh tokens lasting at least double the lifetime of the access tokens. One big downside of the refresh tokens having a short lifetime would be that if a member's script goes down, they would have to re...

regal archBOT
#

@RohanJnr thanks for the docstring update.

There's currently an error in CI due to conflicting migrations:

CommandError: Conflicting migrations detected; multiple leaf nodes in the migration graph: (0070_auto_20210519_0545, 0071_increase_message_content_4000 in api).
20
To fix them run 'python manage.py makemigrations --merge'

Could you look into fixing this?

It also seems the branch needs to be updated.

regal archBOT
regal archBOT
#
[python-discord/sir-lancebot] branch deleted: Remove\-user\-input\-images
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
regal archBOT
oak estuaryBOT
odd spireBOT
regal archBOT
oak estuaryBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] New branch created: Update\-docstring\-tag\-to\-have\-4\-space\-indents
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

I kind of want to include some form of note that explains that a PEP is the official specification/proposal for those that don't know.

Maybe just?

For more details about what a docstring is and its usage, check out this guide by [Real Python](https://realpython.com/documenting-python-code/#docstrings-background), or the [official docstring specification](https://www.python.org/dev/peps/pep-0257/#what-is-a-docstring).
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

We could probably uses dashes for the triple quote comment?

A [`docstring`](https://docs.python.org/3/glossary.html#term-docstring) is a string - always using triple quotes - that's placed at the top of files, classes and functions. A docstring should contain a clear explanation of what it's describing. You can also include descriptions of the subject's parameter(s) and what it returns, as shown below:
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] branch deleted: Update\-docstring\-tag\-to\-have\-4\-space\-indents
oak estuaryBOT
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
oak estuaryBOT
odd spireBOT
regal archBOT
regal archBOT
#

Discussed this in #dev-log with @Bluenix2. [Full conversation](#dev-contrib message).

Summary:

This is a nice quality of life feature as currently when the timeout expires (e.g. after 5 minutes for the !eval command), the reaction stays on the message but the bot will no longer react if the emoji is pressed. This makes it seem like the bot isn't working since there's no response. By removing the reactions after the tim...

regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

In some cases they can make the output appear quite ugly. For example, here is the result of a command I ran yesterday (this is a printed Numpy array):

001 | [0.35319467 0.03863742 0.08606454 0.08990213 0.71744555 0.43287303
002 |  0.90408936 0.13358966 0.10614465 2.138059  ]

Once you introduce line-wrapping, it can end up looking like this:

001 | [0.35319467 0.03863742 0.08606454 0.08990213 0.71744555
0.43287303
002 |  0.90408936 0.13358966 0.10614465 2.138059  ]

...

regal archBOT
regal archBOT
regal archBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
regal archBOT
#

This looks good to me.

As for your request to test breaking the memory limit, writing there using multiprocessing.shared_memory would have also been my one and only test, and since we're doing that here, I personally can't think of another possibility to break this. Since it says "File too large", what happens if multiple shared_memory.SharedMemory objects are created that exceed the limit together? I would assume that the first file exceeding the limit hit the error?

odd spireBOT
regal archBOT
#

We need to understand exactly why it has to be upped to 6. Someone showed that it spawns some extra internal threads as an implementation detail. The rest of the threads are based on os.cpu_count if the count is unspecified.

How consistent and reliable is that behaviour? Furthermore, should we be using os.cpu_count to automatically calculate what this value should be? Such feature would have to be optional, otherwise it'd force an effective minimum on the PID limit, which not all users...

#

That's just because no one noticed when reviewing the PRs which introduced those messages. Furthermore, there's an important difference: those messages are user-facing, but comments such as this one are not. Outside of readability/ambiguity reasons, I think worrying about the placement of comments is being too pedantic; someone doesn't need to go out of their way to address such issue.

regal archBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
oak estuaryBOT
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
#

guild.get_role(role_id) can return None, leading to the following error:

bot_1       | Traceback (most recent call last):
bot_1       |   File "/usr/local/lib/python3.9/site-packages/discord/ext/commands/core.py", line 85, in wrapped
bot_1       |     ret = await coro(*args, **kwargs)
bot_1       |   File "/bot/bot/exts/info/information.py", line 194, in server_info
bot_1       |     member_counts = self.get_member_counts(ctx.guild)
bot_1       |   File "/bot/bot/exts/inf...
regal archBOT
#

The main thing missing from these changes is that file reloading does not work. Webpack-dev-server by default enables the webpack watch option, but for whatever reason, it doesn't work in the docker build. I've stumbled upon this SO post multiple times in my search, but nothing I tried worked.

Ultimately, file watching is a QoL feature. I think not having it slows down development significantly, bu...

regal archBOT
#
[python-discord/forms-frontend] New branch created: beforeunload\-warning
regal archBOT
#
[python-discord/site] New branch created: kyler/smarter\-resources
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
regal archBOT
#

This means that the browser will prompt the user before it tries to close the page, that way someone cannot accidentally close the page mid-submission.

Currently this does not work for the home a element (Python Discord logo), for some reason it does not appear to trigger the beforeunload event that we subscribe to. Further investigation could be made into adding an onclick to this element that will throw a similar prompt and potentially cancel, or find a way to also trigger `beforeu...

odd spireBOT
regal archBOT
#
jb3
[python-discord/quackstack] New branch created: jb3/license
regal archBOT
#
jb3
[python-discord/quackstack] branch deleted: jb3/license
regal archBOT
#

There are some issues that come up in help channels that are usually solved by just sending a tag, the person reads it, and the problem is solved.

For example: 'python' is not recognized as an internal or external command. This problem is answered by the windows-path tag, but you need to wait for someone to come to the channel and type the command for it.

It would also be useful for if, say, someone mentions youtube-dl in their question, to automatically send the ytdl tag. This one ...

#

class School:
def init(self,rooms,floor,staff,students):
self.rooms=rooms
self.floor=floor
self.staff=staff
self.students=students
def myfunc(self):
print("This school having"+self.rooms)
s1=School(4,15,85,2500)
s1.myfunc()

Error

AttributeError Traceback (most recent call last)
in
----> 1 s1.myfunc()

AttributeEr...

regal archBOT
#
[python-discord/site] branch deleted: smarter\-database\-usage\-in\-repository\-metadata
odd spireBOT
odd spireBOT
regal archBOT
#

Removing the line numbers will only give us an extra 6 characters of width, so the above example would still be wrapped anyway.

There isn't really a good solution to this, since it fully depends on the width of your monitor, and now if you have a thread open, since that will limit width even further.

Having the line numbers can be useful when it wraps like this, since it shows where the newlines are from stdout.

We could possibly look at changing the characters we use however, as the...

regal archBOT
#
[python-discord/bot] New branch created: enhance/1683/restrict\-int\-eval
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

Resolves #1683

As mentioned in the issue, it's a security risk to let anyone in a test server have essentially full access to the host machine.

A new debug entry is introduced in the config file. This is false by default, but can be set to true in the user config. When set to true, an is_owner check is added to the internal eval command.

There isn't quite an easy way to disable this during runtime, or to disable this without disabling debug mode entirely. However, I don't feel t...

odd spireBOT
regal archBOT
regal archBOT
#
[python-discord/branding] branch deleted: vcokltfre/chore/remove\-quackstack
odd spireBOT
oak estuaryBOT
regal archBOT
odd spireBOT
oak estuaryBOT
#

Doc item doc_item.symbol_id='color' present in loaded documentation inventories not found on site, inventories may need to be refreshed.

odd spireBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
#

In some cases, newcomers are confused with how to paste/format code and ask Hey how do I send code in this server? in python-general, members need to type two commands to show, which is !paste and !code because they do not know which kind of code is the newcomer asking. However, there's slowmode in python-general so if members did the command !paste first and the newcomer is sending short code then he/she will use the wrong tool. (eh sorry bad english)

odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

Looking at it now, the code in get_member_counts that runs before the call to this function doesn't have any error handling and will raise an attribute error for non existing roles.
We should make that consistent with not handling the same error (for different roles) here, raising a common error for both cases, or providing a default so the command can be used in servers that aren't completely configured

regal archBOT
regal archBOT
odd spireBOT
regal archBOT
#

Description

The contributing guidelines also contain a part which requires contributions to follow the open source license.
This requires the user to agree that they do follow said guidelines when making a pr.

Did you:

  • [X] Join the Python Discord Community?
  • [X] Read all the comments in this template?
  • [ ] Ensure there is an issue open, or link relevant discord discussions?
  • [X] Read and agree to the [contributing guidelines](https:/...
odd spireBOT
regal archBOT
regal archBOT
#

If it's up for grabs I would love to help. If not.. I'll just leave my suggestion here anyways

After some research I found a library SQLAcodegen that works just like reflecting the current database in SQLAlchemy, except it actually generates the models. (As an additional bonus, it produces a PEP 8 compliant code). This way the API doesn't have to reflect the database every time the it starts up.
Naturally, it would still require a review to make...

regal archBOT
#

Resource name
py.checkio.org

Resource location
https://py.checkio.org/

Payment type
free, signup required

Why it should be included
Seems like a interesting interactive way to learn/improve at python with decent explanations and examples. seems to cover a wide range of topics but i couldn't check those (they're locked until i advance)

Potential limitations
Not 100% a fan of their UI, it looks neat but compromises on performance (im on a older PC righ...

regal archBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
regal archBOT
regal archBOT
regal archBOT
#
[python-discord/sir-lancebot] New branch created: more\-py\-topics
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
#
[python-discord/site] New branch created: mbaruh/cj\-links
odd spireBOT
regal archBOT
#
[python-discord/bot] New branch created: whitelist\-pydis\-partners
odd spireBOT
regal archBOT
#
[python-discord/bot] branch deleted: whitelist\-pydis\-partners
oak estuaryBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
#

I was reminded that if there is a terrible misconfiguration and those essential roles, such as helpers, or owners do not exist this bit of code would fail, so I added an additional check. In case of the other bit of code (join_role_stats) the roles that need to be joined might also not exist so I had to add another check)
I'm not sure how to get around this, the roles that needs to be joined must be handled differently than the ones that don't.

regal archBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
#

I'd agree with Xithrius that I'm not sure this tag explains enough at the moment, and may be better off as a page on the site.

For example, there may be editor specific advice people should follow. If someone using Pycharm tried to follow the instructions in this tag they might end up more confused than before.

It could be worth having a tag that explains what a venv is and then just links to other pages for how to use them, maybe including one on our site if we write one.

#

I agree with @wookie184 , but, why not make a tag that does show how to use venvs and create ones, with a comment on top suggesting for some editors that they have less confusing ways. But, if it's a lot to explain, and there are some examples to show which are important, I would suggest making some page on the pydis website(or the appropriate place) that covers almost everything needed to know about venvs. I wish I could be more of a help, but I have no idea what venv is, how do I use\create...

#

Completely agree that it's worth mentioning other IDEs that integrate venvs already, else it could prove more confusing. I'm happy to move this to site content, though I think there should be a summary tag to briefly describe their purpose, linking to the site page, which explains how to set them up -- both for PyCharm, VS Code, etc. and manually.

where we also go over poetry and/or pipenv

I imagine packaging should probably be a separate section, or at least subsection, though defini...

regal archBOT
regal archBOT
odd spireBOT
regal archBOT
#

Yeah, I think including the information in the help command is enough here, although I don't think the current link to strftime.org is actually very helpful in this case, as it actually uses a custom duration parser, https://github.com/python-discord/bot/blob/main/bot/converters.py#L296. There is overlap as it's inspired from strftime, but I don't think looking at that page makes how it works clear.
It could probably be edited to show something like this (mostly just copied from the converte...

regal archBOT
regal archBOT
#

This sort of feels a little out of scope for the tag. Would be nice if we could just link to this section in the venv docs next to the command above, although i'm not sure you can specifically link to that part. You could try linking to another page, like https://dev.to/aka_anoop/enabling-virtualenv-in-windows-powershell-ka3, may be nicer to have this info on our site at some point though,

#
For more information, take a read of the [documentation](https://docs.python.org/3/library/venv.html). Your editor may also have venv integration, in which case you should check out your editors documentation. Here's the docs for [VSCode](https://code.visualstudio.com/docs/python/environments#_select-and-activate-an-environment) and [PyCharm](https://www.jetbrains.com/help/pycharm/creating-virtual-environment.html)

There are also tools such as [poetry](https://python-poetry....
regal archBOT
regal archBOT
regal archBOT
#

Description

In https://github.com/python-discord/bot/pull/1676 we removed fuzzywuzzy from the python bot as it used GPL so is not compatible with our MIT License. I guess the same thing would apply to sir-lancebot, so we should probably replace the fuzzywuzzy module with Rapidfuzz.

Would you like to implement a fix?

Note: For high-priority or critical bugs, fixes may be implemented by staff.

  • [x] I'd like to implement the bug fix
  • [x] Anyone can implement the bug fix
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
#

I like this tag. It definitely fits the use case where a user doesn't know what a virtual environment is, or why they should need one.

However, at the moment the wording does seem a little more technical than I think it needs to be. Right now it assumes a bunch of baseline knowledge (why should the dependencies be clean, that I may need to set an execution policy, etc), and I think we can clean that up. Otherwise though, I like it. Thanks for your PR!

#

WSL is linux, technically. While you can get bash underneath windows proper with MingW, the reason to mention the OS is to catch the people who are using it (starting anew on mac, or just getting their feet wet on linux), who think of "terminal" rather than "bash".

It is a significant portion of the people likely to view the tag, rather than those who've installed powershell on something other than windows, who are unlikely to get confused on which applies since they've chosen to install ...

#

Well, I'm not sure what the best option is, but again, we're painting targets. Like how bow targets are concentric rings and the comment button here is green and on the bottom right, we want the people searching the tag for what activate command they need to have their eyes immediately go to the right spot.

I do think duplicating Windows (powershell) might be too much.. but maybe not. I'll defer to other's judgement on that.

odd spireBOT
regal archBOT
#
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

Relevant Issues

Closes #793

Description

I read the Wikipedia API docs, and noticed that when the Wikipedia API encounters some kind of error or warning, it'll send back the response with the proper error message, but regardless of that the HTTP Reponse Code still remains 200, so I added an additional check to avoid such issues in the future. Docs (the Wikipedia API uses the same API system)

Did you:

  • [x] Join the [*...
odd spireBOT
odd spireBOT
regal archBOT
#

This is a fun game, I found it quite difficult๐Ÿ˜…. The images and handling of the images is really neat.

A few thoughts:

  • I think it would be a good idea to send the scoreboard as a new message after the game has finished, imo editing the original message isn't a very clear UI, especially as channels can get very busy.
  • I think the help command could maybe be a bit clearer, it could probably do with being a bit more verbose to ensure it is clear for somebody who has no idea what the ga...
#

Many people ask a lot of times how to access some variable through all the files they have, and we have to explain many times what is a bot-var and how to use it, a tag that we can show can be a real help in #discord-bots channel, like how to use bot vars in cogs and why to use it anyway
About the cogs, also this is for the discord-bots channel, which is a was to organize your code, also about this topic many people ask, and the responses are ofc not enough, a tag could also be very useful.

#

I think we should refactor this functionality entirely.

Ideally we should check the bad path first and then return, so that we don't havea huge if/else block.

For example:

if resp.status != 200:
   ... send error message ...
   return
... carry on as normal ...

Also ideally for errors, we would raise an error and then let the error_handler cog deal with sending an error embed. Having a quick look at the error handler, we don't have a good error being handled there for ...

odd spireBOT
regal archBOT
#

I think the bit about other IDEs should be reworded. I think it should be more clear that the links relate to the corresponding editors' virtual environment documentation rather than just information about the editors itself. I also think it should be specifically recommending looking at your editors venv documentation.

For example, it is common that a user may set up a venv using a guide similar to this, and then be confused when they click the green run button in the IDE and it runs with t...

regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
#
[python-discord/bot] New branch created: bug/mod/1706/infr\-append\-no\-reason
odd spireBOT
regal archBOT
#
[python-discord/bot] New branch created: bug/bot\-1jd/backend/wait\-for\-deletion\-404
#
[bot] Branch bug/bot\-1jd/backend/wait\-for\-deletion\-404 was force-pushed to `8bfc0d7`
odd spireBOT
regal archBOT
#
[python-discord/bot] New branch created: feat/deps/sentry\-1\.x
odd spireBOT
odd spireBOT
oak estuaryBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] New branch created: bug/mod/bot\-137/defcon\-reject\-dm\-403
odd spireBOT
regal archBOT
regal archBOT
#

Wouldn't it require to handle discord.HTTPException? Or I totally misunderstood you

discord.Forbidden is a subclass of discord.HTTPException, httpexception could be any response from the api saying it didn't work, e.g. a random error with the Discord API, while Forbidden is more specific, and as in that part of the code we only want to catch disabled DMs, I believe Forbidden is correct.

If you were instead referring to replacing the general Exception with `discord.HT...

regal archBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
#
[python-discord/site] New branch created: swfarnsworth/smarter\-resources/filtering\-system
regal archBOT
#
[python-discord/site] branch deleted: swfarnsworth/smarter\-resources/new\-resources
#
[python-discord/site] branch deleted: swfarnsworth/smarter\-resources/update\_labels
regal archBOT
#
[python-discord/site] New branch created: dawnofmidnight/smarter\-resources/filtering\-system
#
[python-discord/bot] New branch created: mbaruh\-patch\-1
odd spireBOT
regal archBOT
odd spireBOT
oak estuaryBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] branch deleted: mbaruh\-patch\-1
odd spireBOT
regal archBOT
oak estuaryBOT
regal archBOT
odd spireBOT
regal archBOT