-
-
Notifications
You must be signed in to change notification settings - Fork 94
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
Add guides to docs #1522
base: master
Are you sure you want to change the base?
Add guides to docs #1522
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some small ideas for improvements
You may also put the event's type in the decorator instead of a type annotation: | ||
|
||
```py | ||
@bot.listen(hikari.MessageCreateEvent) | ||
async def message_listener(event) -> None: | ||
print(f"I have received a message from {event.author} in {event.channel_id}!") | ||
``` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Although this is possible, does the guide need to show this?
You may also put the event's type in the decorator instead of a type annotation: | |
```py | |
@bot.listen(hikari.MessageCreateEvent) | |
async def message_listener(event) -> None: | |
print(f"I have received a message from {event.author} in {event.channel_id}!") | |
``` | |
You may also put the event's type in the decorator instead of a type annotation: | |
```py | |
@bot.listen(hikari.MessageCreateEvent) | |
async def message_listener(event) -> None: | |
print(f"I have received a message from {event.author} in {event.channel_id}!") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it is important to note in scenarios where type annotation usage may not be feasible or possible, yes.
async def message_listener(event: hikari.MessageCreateEvent) -> None: | ||
print(f"I have received a message from {event.author} in {event.channel_id}!") | ||
|
||
# -- Snip -- |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are the # -- Snip --
's necessary here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'd say yes.
Co-authored-by: Nova <[email protected]> Signed-off-by: Hyper <[email protected]>
This can most probably be merged into #1810 |
Summary
Add a "Guides" section to the documentation where users new to the library are introduced to core concepts and features of the library.
The guides should be written with the assumption that the user is already familiar with Python, but not the Discord API or hikari.
Progress
If you feel like more topics should be covered, feel free to leave a comment below or create a PR to this branch!