Skip to content

Removed self as first parameter to functions (not methods) in Guides. #1571

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions docs/src/Guides/03 Creating Commands.md
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,7 @@ In there, you have three seconds to return whatever choices you want to the user
from interactions import AutocompleteContext

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

Expand Down Expand Up @@ -507,7 +507,7 @@ import traceback
from interactions.api.events import CommandError

@listen(CommandError, disable_default_listeners=True) # tell the dispatcher that this replaces the default listener
async def on_command_error(self, event: CommandError):
async def on_command_error(event: CommandError):
traceback.print_exception(event.error)
if not event.ctx.responded:
await event.ctx.send("Something went wrong.")
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "interactions.py"
version = "5.9.2"
version = "5.10.0"
description = "Easy, simple, scalable and modular: a Python API wrapper for interactions."
authors = [
"LordOfPolls <[email protected]>",
Expand Down