• 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 PHP API questions

Status
Not open for further replies.

Yop

Member
Hi everyone,

I'm currently writing a script that will allow me to move the bot in any channel and chat with clients.
The problem is that I can't find the commands to send private/channel/server messages or move the bot in another channel.
I know they exist in the scripting API but I'd need them available in PHP. Do they exist and are not listed in the PHP Api ?

Do you know any work around ?


Thanks in advance,
 

Yop

Member
Thanks, didn't know about that one. But still, looks like there is no way to send messages or change channel.

Could this get added to the PHP Api ?

I know I could do it with the script by checking every sec the commands I'd want to execute stored with the PHP, but it would be way more complicated and not that smooth :(.

EDIT : Also, the http://127.0.0.1:8087/api/v1/bot/i/:instanceId/channels API returns the list of Channels with an order field, but it seems that it's often equal to 0. I can't make a correct ts3webviewer with channels in the correct order. Any idea ?
 
Last edited:

Xuxe

Containerholic
Staff member
is awesome!
V.I.P.
Contributor
Insider
up!
No one has a way to do this ?

I don't know why this should added to the Bot API, you could do this via Query / TS3-PHPFRAMEWORK.
But it should be possible via Script Hooks.

// POST /api/v1/bot/i/:instanceId/scriptEvent/test => api:test

Create a Script and make a sinusbot on event with "api:test" - a call to the Path via POST should trigger your script event.
 

Yop

Member
I don't know why this should added to the Bot API, you could do this via Query / TS3-PHPFRAMEWORK.
But it should be possible via Script Hooks.

// POST /api/v1/bot/i/:instanceId/scriptEvent/test => api:test

Create a Script and make a sinusbot on event with "api:test" - a call to the Path via POST should trigger your script event.

Well I didn't know we could do that. Thanks !

I guess I'll end up using the ts3 query for the channel matter, I just wanted to make it work with only sinusbot.

Anyway, thanks for your help !
 
Status
Not open for further replies.
Top