Carbowix / rockstar-newswire

Bring Rockstar's newswire feed to your discord server.
MIT License
18 stars 24 forks source link

webhooks working? #9

Open Sz4by opened 3 days ago

Sz4by commented 3 days ago

Hmm?

Sz4by commented 3 days ago

Where should I enter?

Carbowix commented 3 days ago

Hi @Sz4by , The installation is pretty simple.

Example of using gtav as the type

 const newswire = require('./newswire');
 const latestNews = new newswire("gtav", "https://...");

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.

Sz4by commented 2 days ago

And it doesn't matter where I enter it?

Carbowix commented 2 days ago

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.

Sz4by commented 2 days ago

Thank you, and one more question, it's not possible to put Hungarian language, right?

Carbowix commented 2 days ago

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) image

Sz4by commented 2 days ago

It's ok thanks

Sz4by commented 2 days ago

Is it okay if I put it at the beginning? Screenshot_20241027-123820~2

Carbowix commented 2 days ago

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

Sz4by commented 2 days ago

[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

Carbowix commented 2 days ago

[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

Sz4by commented 2 days ago

I think it only works on Windows and not on hosting?

Sz4by commented 2 days ago

Isn't there one that works on Linux?

Carbowix commented 2 days ago

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.

Sz4by commented 2 days ago

It would be nice if Linux worked