From dd4cf69d4e2732f49951136326cf07207be4aaac Mon Sep 17 00:00:00 2001
From: Tagadda <36127788+Tagadda@users.noreply.github.com>
Date: Sat, 9 Jun 2018 09:29:22 +0200
Subject: [PATCH] Fix

---
 README.md           |  2 +-
 bot.js              |  2 +-
 config.json.example | 13 +------------
 index.js            |  4 ++--
 4 files changed, 5 insertions(+), 16 deletions(-)

diff --git a/README.md b/README.md
index 52d9ebd..5645e6d 100644
--- a/README.md
+++ b/README.md
@@ -33,6 +33,6 @@ vi config.json
 
 Edit the `access_token` and the `api_url` to correspond your instance.
 
-```
+```bash
 node index.js
 ```
\ No newline at end of file
diff --git a/bot.js b/bot.js
index dad7df3..f468d00 100644
--- a/bot.js
+++ b/bot.js
@@ -16,7 +16,7 @@ class Bot extends EventEmitter {
 
         this.api_url = api_url || 'https://botsin.space/api/v1/';
         this.access_token = access_token;
-        this.to_listen = to_listen || ['public'];
+        this.to_listen = to_listen;
 
         this.listeners = [];
     }
diff --git a/config.json.example b/config.json.example
index 44fb4c0..1c2ed00 100644
--- a/config.json.example
+++ b/config.json.example
@@ -1,15 +1,4 @@
 {
   "access_token": "",
-  "api_url": "https://botsin.space/api/v1/",
-
-  "listeners": [
-    {
-      "api_point": "public",
-      "events": ["update"]
-    },
-    {
-      "api_point": "user",
-      "events": ["notification"]
-    }
-  ]
+  "api_url": "https://botsin.space/api/v1/"
 }
\ No newline at end of file
diff --git a/index.js b/index.js
index 0daad9a..08d72dc 100644
--- a/index.js
+++ b/index.js
@@ -1,8 +1,8 @@
 const Bot = require("./bot");
 const config = require('./config.json');
 
-const client = new Bot(config, {to_listen: [{api_point: "public", events: ["update"]},
-                                            {api_point: "user", events: ["notification"]}]});
+const client = new Bot(config, [{api_point: "public", events: ["update"]},
+                                {api_point: "user", events: ["notification"]}]);
 
 // Following list
 const following = [];
-- 
GitLab