Skip to content
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

Improved grammar and typos #1889

Merged
merged 2 commits into from
Apr 17, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
11 changes: 7 additions & 4 deletions docs/examples/stocks-portfolio.md
Original file line number Diff line number Diff line change
@@ -1,20 +1,20 @@
# Stocks Portfolio

We will create a skill that will allow opsdroid to return info of specific stocks. It will also be able to store a portfolio of stocks and return each with the current market price and info of it.
We will create a skill that will allow opsdroid to return info on specific stocks. It will also be able to store a portfolio of stocks and return each with the current market price and information about them.

This example will use [YFinace](https://github.com/ranaroussi/yfinance) to get the information of the stocks and [SQLite3](https://www.sqlite.org/index.html) to keep our portfolio when we close the bot.

*If you need help or if you are unsure about something join our* [matrix channel](https://app.element.io/#/room/#opsdroid-general:matrix.org) *and ask away! We are more than happy to help you.*

## Building the Skill

We are now ready to commence building our skill! First, you will need to create a folder for the stocks portfolio skill. Choose a location and name it stocks-portfolio.
We are now ready to commence building our skill! First, you will need to create a folder for the stock portfolio skill. Choose a location and name it stocks-portfolio.

```bash
mkdir /path/to/my/stocks-portfolio
```

Inside of the directory we will be making a `configuration.yaml` file which we will be using in the next section to config our skill.
Inside of the directory, we will be making a `configuration.yaml` file which we will be using in the next section to config our skill.

### Configuration

Expand Down Expand Up @@ -57,7 +57,10 @@ c = conn.cursor()

### Receiving Input

Now we have to collect what the bot will receive, we will be doing this by first creating a class that inherits the Skill class. Inside we will be using the special opsdroid function which is `@match_regex`. This function will send the message, and to collect the input we will be using `(.*)` beside the message, like this `@match_regex(r"Stock: (.*)")`. We will then be accessing it with `message.regex.group(1)`. We can now assign what we receive from the bot.
Now we have to collect what the bot will receive and we will be doing this by first creating a class that inherits the Skill class.
Inside we will be using the special opsdroid function which is `@match_regex`.
This function will send the message, and to collect the input we will be using `(.*)` beside the message, like this `@match_regex(r"Stock: (.*)")`. We will then be accessing it with `message.regex.group(1)`.
We can now assign what we received from the bot.

The `StockSkill` class should look something like this:

Expand Down