Deprecated: Use of "parent" in callables is deprecated in /var/www/html/forum/src/vendor/league/flysystem-eventable-filesystem/src/EventableFilesystem.php on line 431
  • If you need help or want to discuss things, you now can also join us on our Discord Server!
  • A first preview of the unlimited version of SinusBot can be found in the Upcoming Changes thread. A version for Windows will follow, but we don't have a release date, yet.

EN world of tanks

Alex6868

#stayinghome
Hey guys,

I need help with that would be to write the script. I'm still very new to writing scripts and have read the script documentation, but I don't know exactly how to write a script that will display upcoming battles on the global map of world of tanks in ts or redo one that already exists. If someone helps, I will be very grateful.

The installed one returns an error.
2020-03-16T13:13:14+03:00 error on setTimeout/setInterval callback: Uncaught exception: TypeError: Cannot read property 'http' of undefined at wotcwub:46:11 sinusbot.http({ ^ Stack trace: TypeError: Cannot read property 'http' of undefined at getClanData (wotcwub:46:12) at refreshBattleList (wotcwub:128:3)
 

Attachments

  • wotcwub.js
    3.8 KB · Views: 12
Last edited:

Frizzant

Member
Contributor
You could check out other scripts to see how they do it.
For example mine where i get the data from the RIOT API for League of Legends (link).

I guess you'll have to get familiar with the Wargaming API.

It really depends on how much knowledge you got. If you don't know how to manipulate text etc. in a brower, it may be too early. If you have some API knowledge then it shouldn't be too hard. And somewhere in between should get you to your goal with enough studying. I am assuming you wrote the script yourself so far? Then you just have to stick to it :)

I'm here to help, for specific questions. Just PM me.

Why do you write sinusbot.http?
I solved the API requests like this:

Code:
http.simpleRequest({
                'method': method || 'GET',
                'url': url,
                'dataType': datatype || 'json',
                'timeout': timeout || 6000,
            }, function (error, response) {...}
 
Last edited:

Alex6868

#stayinghome
[Цитата= " Frizzant, сообщение: 44577, участник: 2467"]
Вы можете проверить другие сценарии, чтобы увидеть, как они это делают.
Например, мой, где я получаю данные из API RIOT для League of Legends ( ссылка ).

Я думаю ,вам придется ознакомиться с API Wargaming.

Это действительно зависит от того, сколько знаний вы получили. Если вы не знаете, как манипулировать текстом и т. д. в брауэре это может быть слишком рано. Если у вас есть некоторые знания API, то это не должно быть слишком трудно. И где-то в промежутке вы должны добраться до своей цели с достаточным количеством изучения. Я предполагаю, что вы сами написали сценарий до сих пор? Тогда вы просто должны придерживаться его :)

Я здесь, чтобы помочь, для конкретных вопросов. Просто ПМ меня.

Почему вы пишете sinusbot.http?
Я решил запросы API, как это:

[Код]http.simpleRequest({
'method': метод / / 'GET',
'url': url-адрес,
'dataType': datatype | | 'json',
'timeout': timeout | / 6000,
}, функция (ошибка, ответ) {...}[/КОД]
[/ЦИТАТА]
Скажите мне, как это должно быть правильно?
 

Stormi

Member
Hello Friends
I have a Problem with this script.The api key create a link with the upcomming battles.I can see these in a browser.When i fill the api key and the other Information in the Form of the bot it don`t show anything in the Channel discription. Other scripts of the bot can renamed channels so there is not a fail in the rights of the bot. Please can anybody help me to run this script.

In the log there is following error:
2020-04-10T13:01:14+02:00 error on setTimeout/setInterval callback: Uncaught exception: TypeError: Cannot read property 'http' of undefined at wotcwub:46:11sinusbot.http({^ Stack trace: TypeError: Cannot read property 'http' of undefined at getClanData (wotcwub:46:12) at refreshBattleList (wotcwub:128:3)

Any Ideas? thanks
 
Last edited:
Top