前提・実現したいこと
slackbotを作りたい。まずは認証されたい。
発生している問題・エラーメッセージ
start slack bot Traceback (most recent call last): File "run.py", line 11, in <module> main() File "run.py", line 6, in main bot = Bot() File "/usr/local/lib/python3.6/site-packages/slackbot/bot.py", line 21, in __init__ settings.API_TOKEN, AttributeError: module 'slackbot.settings' has no attribute 'API_TOKE N'
該当のソースコード
python
1# coding: utf-8 2 3from slackbot.bot import Bot 4 5def main(): 6 bot = Bot() 7 bot.run() 8 9if __name__ == "__main__": 10 print('start slack bot') 11 main()
python
1# coding :utf-8 2 3#botトークン 4API_TOKEN = "適するトークン" 5 6#デフォルトの返事 7DEFAULT_REPLY = "test" 8 9#プラグインスクリプトを置いてあるところ。 10PLUGINS = ['plugins']
試したこと
API_TOKENの再生成、再記入。
補足情報(FW/ツールのバージョンなど)
macです。
これは該当のソースコードのファイル名が必要ですね。
回答1件
あなたの回答
tips
プレビュー