Open Sz4by opened 3 days ago
Where should I enter?
Hi @Sz4by , The installation is pretty simple.
npm install
through your CMD. index.js
const newswire = require('./newswire');
const latestNews = new newswire(type, webhookURL);
rdr2
, gtav
, latest
, music
, fanart
, fanvideos
, creator
, tips
, rockstar
, updates
.Example of using gtav
as the type
const newswire = require('./newswire');
const latestNews = new newswire("gtav", "https://...");
node index.js
in your CMD. It should show the news every 2 hours if there's any new articles on the newswire.Hopefully, I'll organize the project to make it more user-friendly, but that should do it for now. If you have any issues, feel free to reply to this issue or open a new one.
And it doesn't matter where I enter it?
And it doesn't matter where I enter it?
Yeah as long the library is linked correctly, you can put that piece of code anywhere, and it should run. Whether it is a bot or another script that runs all the time.
Thank you, and one more question, it's not possible to put Hungarian language, right?
Thank you, and one more question, it's not possible to put Hungarian language, right?
Library currently doesn't support language localization for news, but I'll probably give it a small update later this week to support languages and other stuff.
For now, you can change the following line with your language locale code. For example I want it to be German, so I would change it to "de_de"
But for Hungarian language "hu_hu"
there's bad news, Rockstar Newswire doesn't support Hungarian locale. It only supports the following languages. (Maybe try it, who knows it might work)
It's ok thanks
Is it okay if I put it at the beginning?
if you'll put it on the same file as the newswire.js
then you won't need the first line and to run it would be node newswire.js
[READY] Started news feed for gtav. Feed refreshes every 2 hours. This is what he says to me, but he hasn't sent anything to discord yet
[READY] Started news feed for gtav. Feed refreshes every 2 hours. This is what he says to me, but he hasn't sent anything to discord yet
If it's just freshly deployed, it should send the latest article in the category, and it'll refresh every 2 hours in case a new article is released in that time-frame. If it didn't send, make sure that webhook url is correct
I think it only works on Windows and not on hosting?
Isn't there one that works on Linux?
Yeah I think, it won't work with Linux for now. At the time of its creation, I was just making it for fun. Probably I'll update it this week with quality-of-life changes.
It would be nice if Linux worked
Hmm?