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

Fix outdated documentation - Creating a custom connector #1423

Closed
FabioRosado opened this issue Apr 7, 2020 · 1 comment · Fixed by #1461
Closed

Fix outdated documentation - Creating a custom connector #1423

FabioRosado opened this issue Apr 7, 2020 · 1 comment · Fixed by #1461

Comments

@FabioRosado
Copy link
Member

It was pointed by @igorfcardoso on #1417 that the documentation seems to be outdated. We should fix the documentation on Creating a custom connector - link

On this page there is a few things that we need to update:

The first header is broken:
#### connect connect is a method which connects to a specific chat service

our example connector class should be updated following the base connector class (which you can find on opsdroid.connector.init.py

For example the __init__ method of the connector class in the documentation should be updated from:

class MyConnector(Connector):

  def __init__(self, config):
    # Init the config for the connector
    self.name = "MyConnector" # The name of your connector
    self.config = config # The config dictionary to be accessed later
    self.default_target = "MyDefaultRoom" # The default room for messages to go

to

class MyConnector(Connector):

  def __init__(self, config, opsdroid):
    # Init the config for the connector
    self.name = "MyConnector" # The name of your connector
    self.config = config # The config dictionary to be accessed later
    self.default_target = "MyDefaultRoom" # The default room for messages to go

Hope this will give you a good idea what needs to be done. If you need any help fixing this issue please reach out to us on matrix 😄 👍

@stale
Copy link

stale bot commented May 7, 2020

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants