Skip to content

Commit ab03fb8

Browse files
fractal13silasaryLordOfPolls
authored
Removed self as first parameter to functions (not methods) in Guides. (#1571)
* chore: Version bump Signed-off-by: LordOfPolls <dev@lordofpolls.com> * Removed self as first parameter to functions (not methods) in Guides. --------- Signed-off-by: LordOfPolls <dev@lordofpolls.com> Co-authored-by: Katelyn Gigante <clockwork.singularity@gmail.com> Co-authored-by: LordOfPolls <dev@lordofpolls.com>
1 parent 78ab162 commit ab03fb8

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/src/Guides/03 Creating Commands.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ In there, you have three seconds to return whatever choices you want to the user
263263
from interactions import AutocompleteContext
264264

265265
@my_command_function.autocomplete("string_option")
266-
async def autocomplete(self, ctx: AutocompleteContext):
266+
async def autocomplete(ctx: AutocompleteContext):
267267
string_option_input = ctx.input_text # can be empty
268268
# you can use ctx.kwargs.get("name") to get the current state of other options - note they can be empty too
269269

@@ -507,7 +507,7 @@ import traceback
507507
from interactions.api.events import CommandError
508508

509509
@listen(CommandError, disable_default_listeners=True) # tell the dispatcher that this replaces the default listener
510-
async def on_command_error(self, event: CommandError):
510+
async def on_command_error(event: CommandError):
511511
traceback.print_exception(event.error)
512512
if not event.ctx.responded:
513513
await event.ctx.send("Something went wrong.")

0 commit comments

Comments
 (0)