synzen / MonitoRSS

MonitoRSS RSS bot (formerly known as Discord.RSS) with customizable feeds. https://monitorss.xyz
https://monitorss.xyz
MIT License
1.08k stars 240 forks source link

how to install on rasberry serveur Debian ? #40

Closed gamersalpha closed 6 years ago

gamersalpha commented 6 years ago

Hello there,

i need exatly this, to push some news on my discord channel, can u explain me how to install it on my serveur web please

synzen commented 6 years ago

Instructions are already provided on on the wiki which is linked on the main page README.md.

https://github.com/synzen/Discord.RSS/wiki/Starting-the-Bot

gamersalpha commented 6 years ago

i see, but i don"t understand nothing :/

Install Node.js.

    IMPORTANT: Check and make sure the version installed is not an outdated one. Do NOT neglect this step.

can u please tell us what version node u program works ? u have so many version with node, i really don't like node

too many steps kill the apps !

edit :

This all step u need with frech ubuntu 16.04 server install :

sudo add-apt-repository ppa:ubuntu-toolchain-r/test sudo apt-get update sudo apt-get install gcc-5 g++-5 nodejs-legacy nodejs npm git clone https://github.com/synzen/Discord.RSS.git npm install

do some stuff here ---> https://discordapp.com/developers/applications/me get this config : image

ok i m stuck here :

Click "Generate OAuth2 URL" on the same page where you got your token, check the Bot scope and check whatever permissions you want it to have to generate the invite link, and invite the bot to your server.

can u elase give more information what token is ???? please add screenshoot ?

and finaly when i lunch :

stagiaire@ubuntu:/var/www/html/discord_rss_bot/Discord.RSS$ nodejs -v
v4.2.6
stagiaire@ubuntu:/var/www/html/discord_rss_bot/Discord.RSS$ sudo nodejs server.js
/var/www/html/discord_rss_bot/Discord.RSS/server.js:17
    let c = 0
    ^^^

SyntaxError: Block-scoped declarations (let, const, function, class) not yet supported outside strict mode
    at exports.runInThisContext (vm.js:53:16)
    at Module._compile (module.js:374:25)
    at Object.Module._extensions..js (module.js:417:10)
    at Module.load (module.js:344:32)
    at Function.Module._load (module.js:301:12)
    at Function.Module.runMain (module.js:442:10)
    at startup (node.js:136:18)
    at node.js:966:3

another try :

stagiaire@ubuntu:/var/www/html/discord_rss_bot/Discord.RSS$ nodejs -v
v9.4.0
stagiaire@ubuntu:/var/www/html/discord_rss_bot/Discord.RSS$ sudo nodejs server.js
module.js:557
    throw err;
    ^

Error: Cannot find module '/var/www/html/discord_rss_bot/Discord.RSS/node_modules/sqlite3/lib/binding/node-v59-linux-x64/node_sqlite3.node'
    at Function.Module._resolveFilename (module.js:555:15)
    at Function.Module._load (module.js:482:25)
    at Module.require (module.js:604:17)
    at require (internal/module.js:11:18)
    at Object.<anonymous> (/var/www/html/discord_rss_bot/Discord.RSS/node_modules/sqlite3/lib/sqlite3.js:4:15)
    at Module._compile (module.js:660:30)
    at Object.Module._extensions..js (module.js:671:10)
    at Module.load (module.js:573:32)
    at tryModuleLoad (module.js:513:12)
    at Function.Module._load (module.js:505:3)

webologie : https://doc.ubuntu-fr.org/nodejs https://github.com/synzen/Discord.RSS/wiki/Starting-the-Bot https://github.com/mapbox/node-sqlite3/issues/895 https://github.com/mapbox/node-sqlite3/issues/901

gamersalpha commented 6 years ago

need help please

synzen commented 6 years ago

token image

Make sure you let sqlite3 finish installing with npm install or npm install sqlite3. Do not interrupt the process when it's not done. This may take a long time for some environments. You may switch to mysql if you don't want to use sqlite.

gamersalpha commented 6 years ago

sory but node is really i big mysteri for me :

what that's means please :

` stagiaire@ubuntu:/var/www/html/discord_rss_bot/Discord.RSS$ sudo npm install

sqlite3@3.1.13 install /var/www/html/discord_rss_bot/Discord.RSS/node_modules/sqlite3 node-pre-gyp install --fallback-to-build

[sqlite3] Success: "/var/www/html/discord_rss_bot/Discord.RSS/node_modules/sqlite3/lib/binding/node-v59-linux-x64/node_sqlite3.node" is installed via remote npm notice created a lockfile as package-lock.json. You should commit this file. npm WARN discord.js@11.3.0 requires a peer of bufferutil@^3.0.3 but none is installed. You must install peer dependencies yourself. npm WARN discord.js@11.3.0 requires a peer of erlpack@discordapp/erlpack but none is installed. You must install peer dependencies yourself. npm WARN discord.js@11.3.0 requires a peer of node-opus@^0.2.7 but none is installed. You must install peer dependencies yourself. npm WARN discord.js@11.3.0 requires a peer of opusscript@^0.0.6 but none is installed. You must install peer dependencies yourself. npm WARN discord.js@11.3.0 requires a peer of sodium@^2.0.3 but none is installed. You must install peer dependencies yourself. npm WARN discord.js@11.3.0 requires a peer of libsodium-wrappers@^0.5.4 but none is installed. You must install peer dependencies yourself. npm WARN discord.js@11.3.0 requires a peer of uws@^9.14.0 but none is installed. You must install peer dependencies yourself.

`

synzen commented 6 years ago

You can ignore those warnings.

gamersalpha commented 6 years ago

Hello so now my bot is in my discord : image

but i can make it talk

missing some thinks in my config files :


`{
  "logging": {
    "logDates": true,
    "discordChannelLog": "",
    "showLinkErrs": true,
    "showUnfiltered": true
  },
  "botSettings": {
    "token": "dqsddsqdqsdqsdqsdqsdsqdsqdsqdsqdsqdsqdqsdsqdsqdsqdsqdsqdq",
    "enableCommands": true,
    "prefix": "~",
    "defaultGame": "",
    "controllerIds": [],
    "menuColor": 7833753,
    "deleteMenus": false
  },
  "feedManagement": {
    "sqlType": "sqlite3",
    "databaseName": "rss",
    "enableBackups": true,
    "enableRestores": false,
    "cleanDatabase": false,
    "maxEntryAge": 14
  },
  "feedSettings": {
    "refreshTimeMinutes": 15,
    "checkTitles": false,
    "timezone": "Europe/Paris",
    "timeFormat": "ddd, D MMMM YYYY, h:mm A z",
    "dateFallback": false,
    "timeFallback": false,
    "maxFeeds": 5,
    "failLimit": 0,
    "notifyFail": true,
    "sendOldMessages": false,
    "defaultMaxAge": 1,
    "cycleMaxAge": 1,
    "defaultMessage": ":newspaper:  |  **{title}**\n\n{link}\n\n{subscriptions}",
    "showRegexErrs": true,
    "imagePreviews": true,
    "imageLinksExistence": true,
    "checkDates": true
  },
  "advanced": {
    "shards": 1,
    "batchSize": 300,
    "restrictCookies": false,
    "restrictWebhooks": false,
    "processorMethod": "single",
    "minifyJSON": false
  },

"sources": {
    "name": "Github YouPHPTube - commits",
    "link": "https://github.com/DanielnetoDotCom/YouPHPTube/commits/master.atom",
    "channel": "github-youphptube",
    "message": "New commit :"
}

}

and if i try to talk to the bot, i have no response :

image

what do u think please ?`

gamersalpha commented 6 years ago

ok so now missing, one information

how add rss on the bot and make the bot talk in the channel :/

Edit :

so first i create a file :

sudo nano sources/youphptube_01_here.json

`

  "name": "my guild name",
  "id": "123456",
  "sources": {
    "WarframeTwitter": {
      "link": "https://queryfeed.net/tw?q=%40PlayWarframe",
      "channel": "34523124455",
      "maxAge": 2,
      "message": "{empty}",
      "embedMessage": {
        "enabled": 1,
        "properties": {
          "color": 3447003,
          "authorTitle": "Warframe @PlayWarframe",
          "authorAvatarURL": "http://icons.iconarchive.com/icons/uiconstock/socialmedia/512/Twitter-icon.png",
          "thumbnailURL": "https://pbs.twimg.com/profile_images/797287460199862272/mG1KEwQ2.jpg",
          "message": "{description}",
          "footerText": "{date}",
          "url": ""
        }
      }
    },
    "257938647771250688_https://www.rt.com": {
      "link": "https://www.rt.com/rss/",
      "channel": "257931586721250688",
      "maxAge": 3,
      "message": "This description will be affected by the regexOps defined for description in the guild profile fil$
      "filters": {
        "title": ["first", "second"],
        "description": ["more!"]
      },
      "regexOps": {
        "description": [{
          "search": "(?:\r\n|\r|\n)",
          "replacement": {
            "type": "regex",
            "content": "",
            "matchNumber": 0
          },
          "flags": "gi"
        }]
      }
    },
    "WashingtonPost": {
      "enabled": 0,
      "link": "http://feeds.washingtonpost.com/rss/sports",
      "channel": "test",
      "message": "A new article on sports!\n{title}\n\n{description}\nBy: {author}\n\n {link}"
    }
  }
}

and i lunch my serveur :

stagiaire@ubuntu:/var/www/html/discord_rss_bot/Discord.RSS$ node server.js
[17:47:54.162] Discord.RSS has logged in, processing set to single.
[17:47:54.164] No custom schedules detected.
[17:47:54.165] RSS Guild Profile: youphptube_01_here.json was not found in bot's guild list. Skipping.
[17:47:54.165] RSS Info: There are no active feeds to initialize.
[17:47:54.167] RSS Info: Schedule 'default' has begun.
[17:47:54.167] Commands have been enabled.

now need to understand :

[17:47:54.165] RSS Guild Profile: youphptube_01_here.json was not found in bot's guild list. Skipping.

TheLovinator1 commented 6 years ago

"botSettings": { "prefix": "~", },

You have to type "~rsshelp"

synzen commented 6 years ago

Don't bother with creating JSON files... use the discord commands ~rssadd