@@ -15,7 +15,7 @@ async def echo(ctx, txt: Annotated[str, discord.Option()]):
15
15
bot = discord .Bot ()
16
16
bot .add_application_command (cmd )
17
17
dict_result = cmd .to_dict ()
18
- assert dict_result . get ( "options" ) [0 ].get ("type" ) == SlashCommandOptionType .string .value
18
+ assert dict_result [ "options" ] [0 ].get ("type" ) == SlashCommandOptionType .string .value
19
19
20
20
21
21
def test_typing_annotated_decorator ():
@@ -27,7 +27,7 @@ async def echo(ctx, txt: Annotated[str, discord.Option(description="Some text")]
27
27
28
28
dict_result = echo .to_dict ()
29
29
30
- option = dict_result . get ( "options" ) [0 ]
30
+ option = dict_result [ "options" ] [0 ]
31
31
assert option .get ("type" ) == SlashCommandOptionType .string .value
32
32
assert option .get ("description" ) == "Some text"
33
33
@@ -48,7 +48,7 @@ async def echo(self, ctx, txt: Annotated[str, discord.Option(description="Some t
48
48
49
49
dict_result = cog .echo .to_dict ()
50
50
51
- option = dict_result . get ( "options" ) [0 ]
51
+ option = dict_result [ "options" ] [0 ]
52
52
assert option .get ("type" ) == SlashCommandOptionType .string .value
53
53
assert option .get ("description" ) == "Some text"
54
54
@@ -71,7 +71,7 @@ async def echo(self, ctx, txt: Annotated[str, discord.Option(description="Some t
71
71
72
72
dict_result = cog .echo .to_dict ()
73
73
74
- option = dict_result . get ( "options" ) [0 ]
74
+ option = dict_result [ "options" ] [0 ]
75
75
assert option .get ("type" ) == SlashCommandOptionType .string .value
76
76
assert option .get ("description" ) == "Some text"
77
77
@@ -86,7 +86,7 @@ async def echo(ctx, txt: Annotated[Optional[str], discord.Option()]):
86
86
87
87
dict_result = cmd .to_dict ()
88
88
89
- option = dict_result . get ( "options" ) [0 ]
89
+ option = dict_result [ "options" ] [0 ]
90
90
assert option .get ("type" ) == SlashCommandOptionType .string .value
91
91
92
92
@@ -100,7 +100,7 @@ async def echo(ctx, txt: str):
100
100
101
101
dict_result = cmd .to_dict ()
102
102
103
- option = dict_result . get ( "options" ) [0 ]
103
+ option = dict_result [ "options" ] [0 ]
104
104
assert option .get ("type" ) == SlashCommandOptionType .string .value
105
105
106
106
@@ -114,5 +114,5 @@ async def echo(ctx, txt: Annotated[str, "..."]):
114
114
115
115
dict_result = cmd .to_dict ()
116
116
117
- option = dict_result . get ( "options" ) [0 ]
117
+ option = dict_result [ "options" ] [0 ]
118
118
assert option .get ("type" ) == SlashCommandOptionType .string .value
0 commit comments