attzonko / mmpy_bot

A python-based chatbot for Mattermost (http://www.mattermost.org).
MIT License
265 stars 104 forks source link

what is bot email and where to create mmpy_bot_settings.py #110

Closed at4446 closed 5 years ago

at4446 commented 5 years ago

Hi All,

I have two questions: In mattermost I just created a bot but it did not require any email. ALl it asked was name and at the end it gave me a token so what should I place for bot_email?

where do I create the mmpy_bot_settings.py file?

attzonko commented 5 years ago

If you supply a token you don't need to have the email to login.

at4446 commented 5 years ago

@attzonko thank you. I provided the email address I signed up with for mattermost and my password and it was running and gave me 201 status but I get no response in matter most when I type "bot" or "bot help" or "hello bot"

attzonko commented 5 years ago

Did you add the bot account to the team?

at4446 commented 5 years ago

@attzonko yes I have added. So I crated a bot called "test2" and my mmpy_bot_settings mmpy_bot looks like

DEBUG = True BOT_URL = 'http://172.19.0.2:8065/api/v4' BOT_LOGIN = 'myusername@test.com' BOT_PASSWORD = '12345' BOT_TEAM = 'test'

after running MATTERMOST_BOT_SETTINGS_MODULE=mmpy_bot_settings mmpy_bot I get 201 and the scripts runs but nothing happens when I call the bot! also i have no incomoing or outgoing webhooks!

attzonko commented 5 years ago

So it sounds like you created a bot account, and you have the token that was generated. You should have your settings as following:

BOT_URL = 'http://example.com/api/v4' 
BOT_LOGIN = 'botusername'
BOT_PASSWORD = None
BOT_TOKEN = "theactualtokenyougotwhenyoucreatedthebotaccount" 
attzonko commented 5 years ago

This looks like the bot is up and running. What is the error you see?

at4446 commented 5 years ago

I created a new bot and it is running now!