vi

Results 137 comments of vi

my 2c on this issue: This is definitely something users should be made aware of, but I'm not fully on board with the proposed implementation yet. Overall it only concerns...

Looks like the assumption that `parent_id` is included in threads doesn't always hold for `interaction.channel`, unlike `interaction.data.resolved.channels`: https://github.com/discord/discord-api-docs/discussions/6270 I can't reproduce it, but I was afraid this might happen. It...

> Recently I've realized there are few ways of passing stuff around that doesn't involve slapping said stuff as bot attribute. I could see a system where apart from accepting...

I don't know about this - as pyright already complains, this breaks a few places that expect `bytes` but now receive `bytes | str`. Making `disnake.File` generic over the `self.fp`...

> So you suggest not to change the typing, and instead have the user do something like `disnake.File(BytesIO(text_file.read().encode()))`? I can't think of many scenarios where one can get a string...

Since this topic came up again yesterday, I looked into this more; somehow missed the last comment here, sorry. I've partially implemented both approaches (generic file/encode bytes->str) [here](https://gist.github.com/shiftinv/1c6b4b3bc3a3aacb22afe160f54d3002), and the...

Instead of string operations and regex matching, it would be easier (and probably more reliable) to make use of the structured error data received from the API, which is [documented](https://discord.com/developers/docs/reference#error-messages)....

> Do we really need the index checks in this case? We assume the index should be valid since the error is from the passed in commands, but if we...

Looks like this change was lost in one of the merges: https://github.com/DisnakeDev/disnake/pull/889/files/b187544b929a62d5ab8070e7c4d54124291ea5e5#diff-0ee295c29def16f570f86378eff8ba37315e464d415e731d5d8ea2e67ce16f68R5593 Other than that, testing this is unfortunately a bit difficult right now, since there's no general rollout yet...

As expected, the API for this has changed slightly: https://github.com/discord/discord-api-docs/pull/6464/files#diff-9c0465597400a1bfff16968024a03ed3e42f9f35b43b9d4419bb0156d47ff9d2 While we have no immediate use for the `sku_id` field, storing the raw `avatar_decoration_data` dict (instead of just the `asset`...