File tree Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Expand file tree Collapse file tree 2 files changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -13,6 +13,12 @@ The project uses semantic versioning (see [semver](https://semver.org)).
13
13
optional argument ` keep_versions=False ` for ` /zeus-upload ` can be used to
14
14
preserve the version numbers.
15
15
16
+ ### Changed
17
+
18
+ - Autocompletion in ` /zeus-set-mission ` now matches everywhere in the mission
19
+ name, not just the beginning. This makes it easier to search based on Zeus
20
+ name, for example.
21
+
16
22
## v0.5.0 - 2025-03-26
17
23
18
24
### Added
Original file line number Diff line number Diff line change 5
5
import discord
6
6
from discord .commands import option
7
7
from discord .ext import commands
8
- from discord .utils import basic_autocomplete
9
8
from pydantic import TypeAdapter , ValidationError
10
9
11
10
if typing .TYPE_CHECKING :
@@ -28,7 +27,11 @@ def _autocomplete_missions(ctx: discord.AutocompleteContext) -> list[str]:
28
27
29
28
TODO: Return list[discord.OptionChoice] instead?
30
29
"""
31
- return ctx .bot .reforger_confgen .list_missions ()
30
+ return [
31
+ mission
32
+ for mission in ctx .bot .reforger_confgen .list_missions ()
33
+ if ctx .value .lower () in mission .lower ()
34
+ ]
32
35
33
36
34
37
class ZeusUpload (commands .Cog ):
@@ -121,7 +124,7 @@ async def zeus_upload(
121
124
@option (
122
125
"filename" ,
123
126
description = "Mission filename" ,
124
- autocomplete = basic_autocomplete ( _autocomplete_missions ) ,
127
+ autocomplete = _autocomplete_missions ,
125
128
)
126
129
async def zeus_set_mission (
127
130
self ,
You can’t perform that action at this time.
0 commit comments