#Response for ratelimit should be an f-string

1 messages · Page 1 of 1 (latest)

indigo galleon
#

I got ratelimited and the logger sent this:
WARNING:interactions:PUT /applications/{app_id}/guilds/{guild_id}/commands Has exceeded it's ratelimit (2)!

If this is not the right place to report an issue like this, please let me know so I don't do this again 🙂

safe herald
#

It should not be an f string

#

But it should be formatted - I'll fix it shortly

mellow forge
indigo galleon
#

also not really on topic, but is there any way to access the command_name of a CommandCompletion without using protected variables?

I find myself having to do event.ctx._command_name in order to get the command name.

Also just a heads up, the LSP on my IDE is not reading the args/kwargs as valid arguments for the event.ctx (still same CommandCompletion event) even though they are they work perfectly fine and as intended while running the bot. same with the send() method on the BaseContext class which is the type of ctx on event.ctx from above

safe herald
#

ctx.command.[...]

#

from there you have a few kinds of name to grab resolved_name localised_name and name. resolved_name is probably what you want

#

re typehints. we're aware - itll be fixed for the next version

safe herald
sharp irisBOT
# safe herald #1360 should resolve this, if so please review

• Pull Request Type: Feature addition
• Created: <t:1682253313:R>

Description

As requested, this pr makes http logging messages include the major params of the route
[IMAGE]
This intentionally does not format any param not considered major by the API

Changes
  • Add major_params property to Route
  • Add resolved_endpoint property to Route
  • Add resolved_path to Route
  • Route.url now uses Route.resolved_path for assembly
  • Update logging messages in HttpClient.request
Related Issues

N/A

Test Scenarios

[CODEBLOCK]
Run this and look at the logs

Python Compatibility
  • ❌ I've ensured my code works on Python 3.10.x
  • ✅ I've ensured my code works on Python 3.11.x
Checklist
  • ✅ I've run the pre-commit code linter over all edited files
  • ✅ I've tested my changes on supported Python versions
  • ❌ I've added tests for my code, if applicable
  • ❌ I've updated / added documentation, where applicable