#dev-log

1 messages · Page 12 of 1

odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/king-arthur] branch deleted: add\-pre\-commit\-hooks
odd spireBOT
odd spireBOT
odd spireBOT
regal archBOT
regal archBOT
regal archBOT
regal archBOT
#
[python-discord/bot] New branch created: fix\-2486
#

Completes the bot-side of #2486.

NB: Currently in draft state since there's a known issue where the incidents message scraper will still raise an error that doesn't get handled due to it being inside a scheduler. Currently not sure how to fix this, but going to look into it.

What

When the bot fails to add a reaction to a message because the user has the bot blocked (e.g. creating an incident, editing an eval invocation, etc.) the bot handles this via a log.debug statement, and if ...

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

Description

When using .help command the signature of the command has extra space when there are no params

Steps to Reproduce

use .help command and look at the command signatures

Expected Behaviour

Display signature without extra space

Actual Behaviour

Displays signature with extra space

Known Impacted Platforms

  • [x] Web
  • [x] Desktop
  • [ ] Android App
  • [ ] iOS App

Would you like to implement a fix?

  • [x] I'd like to implement the bug ...
odd spireBOT
oak estuaryBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
oak estuaryBOT
odd spireBOT
oak estuaryBOT
regal archBOT
regal archBOT
#

It’s still valuable for anyone running outside poetry, is there a downside to including it?

Dear Scaleios,

Thank you for reaching out to us regarding running our bot. Please be advised that we do not support running our bot outside of either Poetry or Docker.

Poetry is a tool for dependency management and packaging in Python that we use to manage our bot's dependencies. Docker, on the other hand, is a containerization platform that allows us to package our bot and all its dependenc...

odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
#
[python-discord/bot] New branch created: Prepend\-closed\-to\-closed\-help\-channels
odd spireBOT
regal archBOT
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
#
[python-discord/bot-core] New branch created: log\-when\-waiting\-for\-guild\-to\-be\-available
regal archBOT
#
[python-discord/bot-core] branch deleted: log\-when\-waiting\-for\-guild\-to\-be\-available
#
[python-discord/site] New branch created: update\-sir\-lancebot\-contrib\-guide
odd spireBOT
regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
odd spireBOT
regal archBOT
#

Sentry Issue: SIR-LANCEBOT-9W

AttributeError: module 'bot.constants' has no attribute 'codejam_categories_name'
(7 additional frame(s) were not displayed)
...
  File "bot/utils/decorators.py", line 256, in predicate
    result = in_whitelist_check(ctx, fail_silently=True, **kwargs)
  File "bot/utils/checks.py", line 77, in in_whitelist_check
    if category and category.name == constants.codejam_categories...
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
odd spireBOT
regal archBOT
#

Description

A command that will fetch information about a certain day (can be filtered by the year too) for AOC puzzles.

Reasoning

I've seen a lot of people including myself have trouble remembering what day had what. Especially with puzzles from past years when people didn't participate, you have to look up the day every time to see what happened on that day.

In addition, being able to pull up the day from Discord rather than exiting into your browser to search up the day every...

regal archBOT
regal archBOT
#
[python-discord/sir-lancebot] New branch created: migrate\-to\-ruff
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

#
Sir Lancebot

Connected!

regal archBOT
#

b4e843e feat: Edit on GitHub button for content articles - hedyhli
1bed135 Edit on GitHub link instead of button - hedyhli
a34ebfa Use content articles source url in django.conf.... - hedyhli
7bf2766 Put 'Edit on GitHub' on breadcrum row with Sub-... - hedyhli
e3dcb3e Simplify line in page_src_url template filter - hedyhli

#
[python-discord/site] branch deleted: hedyhli\-edit\-on\-github
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

scheduling is something that is handled by bot-core, so the fix would need to be there. The error handler should probably be ported there first, so we don't have to duplicate this in multiple places.

So are you suggesting to merge this PR as-is, and add the schedule handling to bot-core at a later time? I'd be okay with this, as long as the exceptions raised aren't going to cause sentry alerts etc.

regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/bot-core] New branch created: ruff\-migration
#

93bbdbd Bump pip-licenses from 4.3.0 to 4.3.1 (#2579) - dependabot[bot]
1cf9b6c Message content intent tag (#2566) - Canttuchdiz
fd9e765 Bump regex from 2023.3.23 to 2023.5.5 (#2578) - dependabot[bot]
c269df9 Bump pre-commit from 3.3.0 to 3.3.1 (#2577) - dependabot[bot]
f20212f Merge branch 'main' into fix-2500 - RohanJnr

odd spireBOT
regal archBOT
regal archBOT
#
[python-discord/bot-core] New branch created: add\-done\_callbacks\-to\-schedules
odd spireBOT
regal archBOT
#

Description

On Pygen, we love to joke about how often ChatGPT and Mojo come up in conversation. In fact, we've even started keeping track of how long we can go without mentioning them!
My suggestion is to add a timer to track how long we can last without mentioning them. The timer would let us know when someone finally brings them up again, and it would announce the new record for the longest time Pygen has gone without them coming up on the conversation.

Reasoning

The addition of...

regal archBOT
#

... has long been used in UI yes, however you're taking that symbol and expanding it to potentially appearing several times at the same point, each time for a different reason.

I understand that this may seem obvious to the person who wrote the code, but I purposefully didn't look at the code when trying to understand the examples, and it wasn't obvious what's going on until I did. Your explanation in the latest comment is clear (although again I'm already "tainted" having already read t...

regal archBOT
#

Thanks for the suggestion. How is this better than searching the channel for those words? It gives all the information while involving only the person interested in it. Making it a feature of the already chaotic python-general chat doesn't seem desirable, not to mention the possible implication of potentially making the person who mentioned those words feel they're being made fun of.

Thanks for the feedback!
While it is true that one could manually search through the channel to track ...

regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

I don't understand how the bot-core PR would help. Would we have to change all uses of create_task to add an error handler? That doesn't seem great, compared to just handling it there directly.

Yeah, you're right, in reality we'd want the handle_forbidden_from_block function to be in bot-core ,and automatically added in create_task. I'll make that change to the bot-core PR :+1:

#

When executing the command /tag without any arguments, a list of all tags is displayed. However, for some reason there's a random bullet point at the top of the list:

Similarly, when the "Did you mean" message comes up for a non-exact multi-match, such as /tag name:f-str, the "Did you mean ..." has a space before the ... that shouldn't be there:

The relevant lines of code appear to be here and [here]...

regal archBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/site] branch deleted: update\-sir\-lancebot\-contrib\-guide
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] branch deleted: Prepend\-closed\-to\-closed\-help\-channels
oak estuaryBOT
regal archBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
oak estuaryBOT
odd spireBOT
regal archBOT
#

Also, the reroll command does not work if the channel name is not found in the database. This can be a super rare edge case but we can handle it. Under the re_roll_command function, you can catch the Exception on the await self.de_activate_ot_name(ctx, old_ot_name) and log it. After that the function will continue to rename the channel.

That seems unrelated to this work, so should probably go in a separate PR?

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

Connected!

odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/sir-lancebot] branch deleted: migrate\-to\-ruff
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/snekbox] branch deleted: file\-scan\-recursion\-fix
#

9952110 Ensure mp Pool is not reused to avoid broken pi... - ionite34
3ea786f Reduce file parse timeout from 8 to 5 seconds - ionite34
2abd6cd Handle recursion error cases from glob - ionite34
46dd830 Add timeout to MemFS.files and MemFS.files... - ionite34 [99d6b96](https://github.com/python-discord/snekbox/commit/99d6b969587be7d276c1aa980d9304474e9d1494) Provide files_timeout to MemFS.files_list` call - ionite34

regal archBOT
regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/site] New branch created: ruff
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/site] branch deleted: ruff
#
[python-discord/site] New branch created: psycopg3
odd spireBOT
regal archBOT
#
[python-discord/site] New branch created: django\-rules\-ruff
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
#
[python-discord/site] branch deleted: no\-duplicate\-tag\-page\-github\-edit\-tag
regal archBOT
regal archBOT
regal archBOT
regal archBOT
#
[python-discord/site] branch deleted: django\-rules\-ruff
odd spireBOT
regal archBOT
#

5eada1e Add Django-specific rules for ruff - jchristgit
3cc0dc3 Do not duplicate "Edit on GitHub" link for tags - jchristgit
5778017 Merge pull request #971 from python-discord/no-... - HassanAbouelela
3def0dd Merge branch 'main' into django-rules-ruff - Xithrius
30a744d Merge pull request #970 from python-discord/dja... - Xithrius

#
[python-discord/site] branch deleted: psycopg3
odd spireBOT
regal archBOT
#
[python-discord/site] New branch created: fix\-psycopg3\-compatibility\-in\-metricity
odd spireBOT
regal archBOT
#
[python-discord/site] branch deleted: fix\-psycopg3\-compatibility\-in\-metricity
regal archBOT
regal archBOT
#

Description

Add 3 levels of difficulty to the connect 4 AI for the user to choose from:

  • Easy: the current AI implementation
  • Medium: the AI also attempts to create 'winning corrdinates' (coordinates where placing a counter will result in a win, each player has a different set of winning coordinates which may overlap) and also attempts to prevent the user from creating such coordinates.
  • Hard: the AI will also account for 'parity' (I'm not sure what else to call it) be...
regal archBOT
#
[python-discord/site] New branch created: Python\-3\.11
#

This bumps the site up to using Python 3.11. This includes the poetry project file, within the Docker image, in CI, and the target version for ruff.

This also fixes ruff linting errors by using the new datetime.UTC alias present in 3.11.

While running the test suite locally I noticed a test that failed on a Windows host, so updated that too.

odd spireBOT
regal archBOT
oak estuaryBOT
#

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

odd spireBOT
odd spireBOT
regal archBOT
#
[python-discord/site] branch deleted: Python\-3\.11
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
oak estuaryBOT
regal archBOT
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

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

Sentry Issue: BOT-3G3

AttributeError: 'Object' object has no attribute 'mention'
  File "bot/exts/moderation/infraction/management.py", line 284, in infraction_search_group
    await self.search_user(ctx, discord.Object(query))
  File "bot/exts/moderation/infraction/management.py", line 312, in search_user
    prefix = f"{user.mention} - {user.id}"

Error executing command invoked by godlygeek#8814: !i s 4...
#
[python-discord/bot] New branch created: fix\-attr\-error\-in\-infraction
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
oak estuaryBOT
regal archBOT
#
[python-discord/site] New branch created: subclassing\_bot
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
odd spireBOT
oak estuaryBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
oak estuaryBOT
odd spireBOT
regal archBOT
regal archBOT
#

I would love to work on this issue, also i suggest to

  • Add the timeout as command input
  • Change the timeout default value to match the possible anagrams (more anagrams => less timeout, reducing by 10 second starting from the +1 anagram)

Those suggestion are of course optional, will be happy to implement just the behavior described by Wookie

odd spireBOT
regal archBOT
#
The next step would be to look into discord.py cogs as they help in organizing collections of commands into various files and folders. Refer to [the official docs](https://discordpy.readthedocs.io/en/stable/ext/commands/cogs.html) for more on them.

I don't think there's a need for the second example as the official docs do offer that IIRC.

Plus, we'll be removing it once we've made out own version :P

odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

One last comment (Sorry, I completely missed this)

IT would be nice to reference our guide that talks about subclassing context here.

Subclassing `Bot` can be very beneficial as it provides you with more control and customizability of how your bot functions, also allowing you to add extra features, such as custom bot attributes or methods. For example, the default [Context](https://discordpy.readthedocs.io/en/latest/ext/commands/api.html#discord.ext.commands.Context) can ...
odd spireBOT
odd spireBOT
odd spireBOT
regal archBOT
regal archBOT
#

Relevant Issues & Changes

Closes #1146

I've added a catch for ClientResponseError, raised a LatexServerError and handled the later to return a user message, with a tiny refactoring of the code that creates the embed (in case of error)

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 [contrib...
odd spireBOT
odd spireBOT
regal archBOT
regal archBOT
#

Currently, the new /tag command has the syntax: /tag name:<group_name> <tag_name>. To use a tag from a group, group name has to be mentioned. This could be quite unintuitive to always enter the group name for a simple tag search. Incase if we are enforcing group name, lets try to keep them as simple as possible and short as possible.
Another approach would be to invoke a tag regardless of its group. Incase there are tags with the same name in multiple groups, the user will be prompted to...

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

As Janine pointed out, the tag functionality was greatly reduced with the slash command migration. I’m guessing slash commands don’t allow you to enter invalid commands? That is in part how we were handling tag matching before slash commands (its in the error handler).

If we can’t reimplement this flexibility with the slash-commands, then I don’t think this is a good use case for them, and we might be ...

odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
oak estuaryBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
oak estuaryBOT
odd spireBOT
regal archBOT
oak estuaryBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] New branch created: build\-docker\-image\-in\-ci
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/sir-robin] New branch created: python\-311
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/sir-robin] branch deleted: python\-311
thin oysterBOT
#
Sir Robin

Connected!

regal archBOT
odd spireBOT
regal archBOT
#

I’m guessing slash commands don’t allow you to enter invalid commands?
slash commands are kinda gimmicky, like you have to explicitely tell discord that you are providing a value for the name argument and only then the error handling takes place
image

In the case below, discord correctly parses the name argument
![image](https://github.com/python-discord/bot/assets/37217450/25adf67c-11c2-4...

odd spireBOT
regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
oak estuaryBOT
odd spireBOT
odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] branch deleted: build\-docker\-image\-in\-ci
odd spireBOT
oak estuaryBOT
odd spireBOT
regal archBOT
odd spireBOT
oak estuaryBOT
odd spireBOT
odd spireBOT
odd spireBOT
odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
odd spireBOT
regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
odd spireBOT
regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
regal archBOT
odd spireBOT
night lilyBOT
#
Sir Lancebot

Connected!

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

Currently, the two exception blocks do the same thing.

  1. prepare embed
  2. send
  3. unlink.

_prepare_error_embed already takes in the error, so relay the full responsibility to what the error message would be to it (since it has all the context already)

So your try block will become

try:
    # do something
except (InvalidLatexError |  LatexServerError) as err:
     preprare_error_embed(err)
     # etc
     return

and you do an isinstance(err, exceptionClass) che...

odd spireBOT
regal archBOT
odd spireBOT
oak estuaryBOT
regal archBOT
odd spireBOT
oak estuaryBOT
odd spireBOT
regal archBOT
oak estuaryBOT
odd spireBOT
regal archBOT
odd spireBOT
oak estuaryBOT
regal archBOT
#

Currently, the !charinfo command runs unicodedata.name() to figure out what name a character should be given. However, unicodedata.name() does not support control characters like the newline characters such as \n, the null character, or a variety of other ones that have unicode names as aliases but not official "recognized" names which are often "" for some reason.

There's an open bug on cpython for a few years now, but it doesn't look like there's much activity (https://github.com/py...

odd spireBOT
odd spireBOT
regal archBOT
#

In many cases, users have been utilizing out of date packages. This would make the !pypi tag substantially more useful in visually parsing whether or not a package could be out of date for the current version of Python.

https://github.com/python-discord/bot/blob/main/bot/exts/info/pypi.py#L48-L67

Example snippet:

ver = info["version"]
releasedate = info["release"][ver]["0"]["upload_time"]
embed.description += f"\n Release Date {releasedate}"```

Should fall within the `i...
regal archBOT
regal archBOT
#

We always obtain the latest (non-dev release) version of a package with the !pypi command as I understand it now. Supplying a date in the embed serves to simply reconcile this date against our current understanding of what is considered 'outdated'.

A recent example of when this was relevant: An individual was seeking assistance with a "Jarvis" package on PyPI, specifically implementing it within their own code. !pypi was invoked to retrieve information regarding the package, and further li...

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

Connected!

odd spireBOT
regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

regal archBOT
odd spireBOT
regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

odd spireBOT
regal archBOT
#
[python-discord/bot] New branch created: inject\-settings\-in\-bot\-core
regal archBOT
#
[python-discord/bot-core] New branch created: port\-constants
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] New branch created: temp\-disable\-multi\-version
odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/site] New branch created: remove\-mentions\-of\-multiple\-snekbox\-containers
odd spireBOT
regal archBOT
#
[python-discord/site] branch deleted: remove\-mentions\-of\-multiple\-snekbox\-containers
odd spireBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#

Sentry Issue: BOT-3GC

ConnectionRefusedError: [Errno 111] Connect call failed ('10.128.79.106', 80)
(1 additional frame(s) were not displayed)
...
  File "asyncio/base_events.py", line 1085, in create_connection
    raise exceptions[0]
  File "asyncio/base_events.py", line 1069, in create_connection
    sock = await self._connect_sock(
  File "asyncio/base_events.py", line 973, in _connect_sock
    await s...
oak estuaryBOT
regal archBOT
regal archBOT
night lilyBOT
#
Sir Lancebot

Connected!

thin oysterBOT
#
Sir Robin

Connected!

oak estuaryBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] New branch created: don't\-use\-full\-stop\-in\-Filter\.\_\_str\_\_
odd spireBOT
oak estuaryBOT
regal archBOT
#
[python-discord/bot] New branch created: add\-new\-badges
odd spireBOT
odd spireBOT
odd spireBOT
regal archBOT
#
[python-discord/bot] branch deleted: add\-new\-badges
oak estuaryBOT
regal archBOT
odd spireBOT
odd spireBOT
odd spireBOT
odd spireBOT
odd spireBOT
regal archBOT
#
[python-discord/bot-core] branch deleted: ruff\-migration
regal archBOT
#
[python-discord/bot-core] New branch created: paste\-api
regal archBOT
regal archBOT
regal archBOT
regal archBOT
#
[python-discord/bot-core] New branch created: shenanigansd\-patch\-1
regal archBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
regal archBOT
odd spireBOT
regal archBOT
#
[python-discord/bot-core] branch deleted: shenanigansd\-patch\-1
odd spireBOT
odd spireBOT