hangoutsbot / hangoutsbot

Google Hangouts bot
GNU Affero General Public License v3.0
571 stars 269 forks source link

telesync plugin config #693

Closed brealorg closed 7 years ago

brealorg commented 7 years ago

Hello!

I can't seem to get the "telesync" plugin working. Followed the wiki: https://github.com/hangoutsbot/hangoutsbot/wiki/telesync-Plugin

config.json

{ "admins": [ "10783000388641196XXX", "106980774372531796XX" ], "autoreplies": [ [ [ "hi bot", "hello bot" ], "Hello world!" ], [ [ "cola" ], "Cola er reseptfri medisin!" ], [ [ "sucks" ], "\u253b\u2501\u253b \ufe35\u30fd(`\u0414\u00b4)\uff89\ufe35 \u253b\u2501\u253b" ] ], "autoreplies_enabled": true, "commands_enabled": true, "commands_user": [], "conversations": { "CONV_ID": { "autoreplies_enabled": false, "commands_enabled": false, "silentmode": true } }, "link_to_guide": "https://github.com/hangoutsbot/hangoutsbot/wiki/User-Guide", "mentionall": true, "mentionallwhitelist": [], "mentionerrors": true, "mentionquidproquo": false, "plugins": [ "default", "mentions", "telesync" : {"api_key": "3140.....KEY", "enabled": true, "admins": [ "111111111" "], "do_not_keep_photos": true, "enable_sticker_sync": false}, "tldr", "subscribe", "autoreply", "dnd", "starter", "remind" ], "silentmode": false }

Edited out admin-id and api-key for "obvious" reasons.

Trying to run the bot up again:

user@xxx:~/.local/share/hangupsbot$ python3 ~/hangoutsbot/hangupsbot/hangupsbot.py Traceback (most recent call last): File "/home/b-real/hangoutsbot/hangupsbot/hangupsbot.py", line 997, in main() File "/home/b-real/hangoutsbot/hangupsbot/hangupsbot.py", line 987, in main configure_logging(args) File "/home/b-real/hangoutsbot/hangupsbot/hangupsbot.py", line 916, in configure_logging bootcfg = config.Config(args.config) File "/home/b-real/hangoutsbot/hangupsbot/config.py", line 18, in init self.load() File "/home/b-real/hangoutsbot/hangupsbot/config.py", line 59, in load self.config = json.load(open(self.filename)) File "/usr/local/lib/python3.4/json/init.py", line 268, in load parse_constant=parse_constant, object_pairs_hook=object_pairs_hook, **kw) File "/usr/local/lib/python3.4/json/init.py", line 318, in loads return _default_decoder.decode(s) File "/usr/local/lib/python3.4/json/decoder.py", line 343, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/local/lib/python3.4/json/decoder.py", line 359, in raw_decode obj, end = self.scan_once(s, idx) ValueError: Expecting ',' delimiter: line 45 column 16 (char 875)

Am I placing the plugin config wrong? Is there some other error? I can't for the life of me figure out what I am doing wrong here.

JosephBlock commented 7 years ago

It doesn't go there. { "admins": [ "10783000388641196XXX", "106980774372531796XX" ], "autoreplies": [ [ [ "hi bot", "hello bot" ], "Hello world!" ], [ [ "cola" ], "Cola er reseptfri medisin!" ], [ [ "sucks" ], "\u253b\u2501\u253b \ufe35\u30fd(\u0414\u00b4)\uff89\ufe35 \u253b\u2501\u253b" ] ], "autoreplies_enabled": true, "commands_enabled": true, "commands_user": [], "conversations": { "CONV_ID": { "autoreplies_enabled": false, "commands_enabled": false, "silentmode": true } }, "link_to_guide": "https://github.com/hangoutsbot/hangoutsbot/wiki/User-Guide", "mentionall": true, "mentionallwhitelist": [], "mentionerrors": true, "mentionquidproquo": false, "plugins": [ "default", "mentions", "telesync", "tldr", "subscribe", "autoreply", "dnd", "starter", "remind" ], "silentmode": false, "telesync": { "api_key": "3140.....KEY", "enabled": true, "admins": [ "111111111" ], "do_not_keep_photos":true, "enable_sticker_sync":false } }`

brealorg commented 7 years ago

That did the trick. Thanks!

Wiki should perhaps reflect this cause it is very misleading.