Splamy / TS3AudioBot

Advanced Musicbot for Teamspeak 3
https://splamy.de/TSAudioBot/Home
Open Software License 3.0
702 stars 140 forks source link

Multi instances - history, rights, command, alonemode, move #444

Open zmechu opened 6 years ago

zmechu commented 6 years ago

Hello! Got ts3audiobot working, but have small questions about multi instances mode:

  1. Is there a way to every instance under one bot have separated history file? I've found old info, that history file is shared between instances - maybe it is done :-)
  2. Is there a way to every instance under one bot have separated rights file? Yes, it is possible to prepare different rights for many instances using one rights.toml file, fut looking for solution one instance = one rights file
  3. Is there AloneMode ready or to be done in a future? Means: bot play, but stops/pause when is alone in a channel, and starts/unpause play when someone connect to a channel?
  4. Have problem with bot moving, "!bot move XXX" return with "missing permissions. Which permission should be applied? "onidle = "!bot move XXX" doesn't work either

Thank you for great work :-)

INFO [============ TS3AudioBot started =============] INFO [=== Date/Time: Saturday, 24 November 2018 20:22:20 INFO [=== Version: 0.9.1/master/bf376396 INFO [=== Platform: (64bit) INFO [=== Runtime: Mono (5.16.0.179 (tarball Thu Oct 4 10:24:32 UTC 2018)) INFO [=== Opus: libopus 1.2~alpha2 (x64) INFO [==============================================]

Splamy commented 6 years ago

for 1. and 2. that is both planned, but not yet implemented. I've planned two changes for that. One internal, and one external to the folder structure. I hope to make a little announcement post for it, but more or less each bot will get an own folder.

  1. I've heard this request a few times already, and for now left it for someone to write as a plugin. But if there's enough request I could add this features as a default. The problem as with all requests is that my backlog is huge and my time not. ergo idk when I get to a new feature.

  2. The bot is probably missing the ts3 permission i_channel_join_power It should be printed in the log what is missing.

THis is what we assign in our automated setup;

Ts3Permission.b_channel_join_ignore_password, // + The noble bot will not abuse this power
Ts3Permission.b_channel_join_permanent, // + Allow joining to all channel even on strict servers
Ts3Permission.b_channel_join_semi_permanent, // + Allow joining to all channel even on strict servers

Ts3Permission.b_channel_join_temporary, // + Allow joining to all channel even on strict servers
Ts3Permission.b_channel_join_ignore_maxclients, // + Allow joining full channels
Ts3Permission.i_channel_join_power, // + Allow joining to all channel even on strict servers
zmechu commented 6 years ago

Thank you for answer! About 1. and 2. - nice to hear :-) About 3. - request request request request request request request request request request request request request request request request request request request request request request :-D In my opinion it should be as core option, and it is VERY important, it will save a lot of CPU and bandwidth use and will be very helpful. For me, it in one of coolest feature of sinusbot, which be nice to see in ts3audiobot About 4. For future generations: at mine TS it helps to set "b_client_ignore_sticky" permision - and works as should.

Another question: I.m planning to set "bot for rent", similar to https://github.com/Splamy/TS3AudioBot/issues/338#issuecomment-416557366 It works: client can take bot (!bot come) and play (!play [stream]). After "idletime" bot runs "onidle" command. But I'd like to remove "bot come" needs, so:

My question is: to do such "send_mode = "!xecute (!bot move (!getmy channel))" is needed. To play "send_mode = "voice" is need. But how to configure "send mode" to command AND voice?

And, is there a way to play mp3 every time when bot connects to channel? "onconnect" runs when bot connects to server. Kind of "onconnect_channel "play=info.mp3"" ?

dzinks2009 commented 6 years ago

And, is there a way to play mp3 every time when bot connects to channel? "onconnect" runs when bot connects to server. Kind of "onconnect_channel "play=info.mp3"" ?

[events]
#Called when the bot is connected.
onconnect = "!play https://www.youtube.com/watch?v=Mf9WroOPCwI"
zmechu commented 6 years ago

Not really :-) "onconnect" runs once when bot connects to server. I need a "onconnect_channel" event, which allow to run every time bot connect to channel. An "ad" option which allow to play .mp3 file when bot connect to client channel, where .mp3 file will be "Hello, I'm music bot, use me ad you wish using !play command" or sth like that.

Bluscream commented 6 years ago

Thats called "moving", "switching" or "joining" rather than "connecting"

zmechu commented 6 years ago

whatever, it can be named in a different way. "joining" seems to be perfect!

Splamy commented 5 years ago

To 3: The bot now has events to freely configure when left alone or joined again.

[events]
#...

#Called when the last client leaves the channel of the bot. Delay can be specified
onalone = "!stop"
#Specifies how long the bot has to be alone until the 'onalone' event gets fired.
#You can specify the time in the ISO-8601 format with quotation marks "PT30S" or like: 15s, 1h, 3m30s
alone_delay = "10s"
#Called when the bot was alone and a client joins his channel. Delay can be specified.
onparty = "!play"
#Specifies how long the bot has to be alone until the 'onalone' event gets fired.
#You can specify the time in the ISO-8601 format with quotation marks "PT30S" or like: 15s, 1h, 3m30s
party_delay = "0s"
zmechu commented 5 years ago

Great! It works :-D

Mezir commented 4 years ago

@Splamy is it possible for each instance to have its own permission file "rights.toml"?

Flakebi commented 4 years ago

@Mezir, this is not yet possible. This feature is tracked in #651.