Commit Graph

35 Commits

Author SHA1 Message Date
ef06d7d9db Add Interaction.filesize_limit 2025-06-20 14:30:37 -04:00
e177b4a705 Fix EmbedMediaProxy boolean check 2025-06-20 14:30:10 -04:00
e84edf473c Add colours for new Discord themes 2025-06-20 14:28:59 -04:00
0298f81a5c Add more tests for colour, embeds, files, buttons and modals 2024-10-09 17:15:37 -04:00
59f877fcf0 Fix and add test for missing discord.Permission bits 2024-09-02 10:53:31 -04:00
97ca618570 Fix incorrect Select max option condition 2024-07-05 16:18:01 -04:00
5c5ccc4e82 [commands] Fix hybrid command wrapped instances being out of sync 2023-09-30 14:28:18 -04:00
69e9bc9454 [commands] Fix nested hybrid groups inserting manual app commands 2023-08-24 14:34:01 -04:00
c8e2644497 Fix custom attributes not being copied over for subclassed Group 2023-05-02 20:13:10 -04:00
9ed5fbecea [commands] Add support for NumPy style docstrings for commands 2022-09-04 00:34:17 -04:00
1c7747fe9d Fix nested Annotated calls not resolving 2022-08-17 10:41:57 -04:00
a9025ca3d1 Remove public CommandTree.call method and make it private 2022-08-12 10:57:54 -04:00
57efb5a5a0 Fix failing tests to use new get_parameter function 2022-08-09 08:02:41 -04:00
99d2ecac54 Fix and add tests for new autocomplete regression 2022-08-03 20:21:13 -04:00
89ee05c03f Add tests by bryanforbes for app commands within cogs
Co-authored-by: Bryan Forbes <bryan@reigndropsfall.net>
2022-07-27 22:27:37 -04:00
40176bb71b Fix bound method autocomplete callbacks not working
This also adds some regression tests
2022-05-09 17:24:48 -04:00
f4c5d37c8f [commands] Rework Cog + Group inheritance to requite GroupCog
This is an attempt to fix the MRO issues present in the current
implementation. The previous implementation of using both Cog and
app_commands.Group in the inheritance chain caused issues with things
such as walk_commands due to it potentially shadowing the app_commands
version of the call.

In this particular case it's better to use composition instead of
inheritance to avoid these bugs entirely. Especially as more things are
added that could conflict with each other.
2022-05-01 14:01:21 -04:00
de941ababe Add Colour.from_str factory method
This moves the command extension parsing code over to the main library
since it can be potentially useful for others.
2022-04-20 06:49:28 -04:00
e541be0427 Fix tests from failing 2022-04-14 06:46:33 -04:00
526ed46d7a Add tests for command descriptions 2022-04-12 18:23:26 -04:00
abeea73734 Fix remaining things not explicitly passing the intents kwarg 2022-04-05 23:15:40 -04:00
01e2c69b20 Add tests for validating command signature mismatch error handling 2022-04-02 04:57:05 -04:00
25ad5b675c Ensure explicitly set parents on nested groups are respected
This had a multiple layer bug that needed to be squashed. The first
issue was that setting `parent=...` inside a `Group` wouldn't actually
add the `Group` into the `parent` children mapping. This meant that
it didn't actually end up copying the children when it came time to
within e.g. a Cog.

The second issue was that even if it was added into the children
listing, it wouldn't properly set the attribute.

This commit fixes both of these issues.

Fix #7818
2022-04-01 09:13:27 -04:00
c11363f037 Rework File.spoiler to synchronise with the filename
Co-authored-by: Danny <Rapptz@users.noreply.github.com>
2022-03-31 09:18:36 -04:00
0a8065606a Update parent reference of Group children 2022-03-30 19:12:39 -04:00
8524bfb54d Fix caching of UnionType instead of resolved typing.Union 2022-03-28 16:24:03 -04:00
abcec5da9d [tasks] Use the local timezone when comparing for the start time
Fix #7676
2022-03-14 04:54:56 -04:00
2da6415008 Add more tests for JST regression case 2022-03-14 01:07:49 -04:00
f2586e9fe7 [tasks] Handle imaginary or ambiguous times due to DST transitions 2022-03-13 22:45:18 -04:00
6a43d60acf [tasks] Refactor tasks to not store a time index state
It's better to recompute it every time rather than suffer from
maintaining the extra state.
2022-03-13 06:20:44 -04:00
caa816a636 Add more tests for utils
Co-authored-by: Nadir Chowdhury <chowdhurynadir0@outlook.com>
2022-03-07 17:10:28 -05:00
3c78b03aa3 Test regressions for the task extension
* tests for testing regression of 19ad64a
* fix edge case for test running within 3 minutes of the start of the hour
2022-03-07 17:09:30 -05:00
bb5ed4947d Add regression test for optional normalisation
Also runs black on the tests file
2022-03-01 05:54:26 -05:00
3d0c506124 Fix test_resolve_invite due to changed type 2022-03-01 01:07:13 -05:00
28c7cdca99 Baseline tests, basically just parts of utils right now 2022-03-01 01:02:36 -05:00