From 86f12cabc32e1e1b6fa5672a7dde7855b542f59e Mon Sep 17 00:00:00 2001 From: HyperGH <46067571+HyperGH@users.noreply.github.com> Date: Sat, 25 Feb 2023 02:30:16 +0100 Subject: [PATCH] Implement some suggestions --- docs/guides/events/advanced.md | 6 +++--- docs/guides/events/basics.md | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/guides/events/advanced.md b/docs/guides/events/advanced.md index 289ef675ec..128a667c78 100644 --- a/docs/guides/events/advanced.md +++ b/docs/guides/events/advanced.md @@ -12,7 +12,7 @@ with execution. With `wait_for()` you can block until you receive an event with a given predicate and timeout. In the example below, the bot prompts the user to play a number guessing game. -Each iteration, the bot waits for the user to input a number, evaluates it and gives an +Each iteration, the bot waits for the user to input a number, evaluates it, then gives an appropiate response. ```py @@ -27,7 +27,7 @@ import hikari @bot.listen() async def guessing_game(event: hikari.MessageCreateEvent) -> None: - if event.is_bot: + if not event.is_human: return me = bot.get_me() @@ -86,7 +86,7 @@ In the example below, we query the user for their 3 most favorite movies and gat @bot.listen() async def favorite_movie_collector(event: hikari.MessageCreateEvent) -> None: - if event.is_bot: + if not event.is_human: return me = bot.get_me() diff --git a/docs/guides/events/basics.md b/docs/guides/events/basics.md index 6ea3cbbb4c..ef94738b67 100644 --- a/docs/guides/events/basics.md +++ b/docs/guides/events/basics.md @@ -55,7 +55,7 @@ async def message_listener(event: hikari.MessageCreateEvent) -> None: ```py @bot.listen() async def message_listener(event: hikari.MessageCreateEvent) -> None: - if event.is_bot: # Ignore messages from bots + if not event.is_human: # Ignore messages from bots return await event.message.respond("Hi!")