• 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 Controling volume with ephemeral

Status
Not open for further replies.

omano

Member
Hi all! I'm using the latest Sinusbot beta build. I have a problem with a script. I would like to know if it is possible to control the volume at which a track plays with the ephemeral parameter on true?

I mean when I play a track with my script
Code:
play('track://de440f2a-74df-40df-acc7-b3704b1d0052');
it plays the track with the sound volume which is set in the bot (let say 15%). That's is what I want.

But when I play a track with my script with ?ephemeral=true
Code:
play('track://de440f2a-74df-40df-acc7-b3704b1d0052?ephemeral=true');
the track which is playing has the sound volume set to maximum from what I ear, it does not use the parameter for the sound volume set in the bot.

Is it possible to add a parameter to the play command to force the volume of the ephemeral=true track to the same of the general sound volume parameter of the bot? Something like that
Code:
play('track://de440f2a-74df-40df-acc7-b3704b1d0052?ephemeral=true?volume=15');

Here is what we have for information in the bot help /help/scripting :
track:// urls may contain additional parameters that can affect the playback (e.g. track://uuid?ephemeral=true)


parameter
value
ephemeral (bool) if set to true, this will play the track "on top" of the current track
loop the track will be looped until another track is being started; this will work almost gapless
callback this will specify a string that will be added to the trackEnd event - using this you can be informed on the end of playback of a specific file


Maybe it is just a bug which need fixing?

Anyway I hope someone can help. Thank you!
 

flyth

is reticulating splines
Staff member
Developer
Contributor
Actually, this made it to the latest beta release (0.9.12.3) - not sure if I covered all cases, but most should work.
Add &volume=VOLUME where VOLUME is -100 <= VOLUME <= 100. Still needs proper testing (which I sadly haven't found the time for to do, yet).
 

omano

Member
Just for my knowledge, is there a variable for the current volume in the bot, or is there a way to grab the current bot volume value to put it in a variable (and use it then with the ephemeral thing)?


//edit: what I needed was getVolume()
 
Last edited:

omano

Member
OK from my testing, it seems that &volume=-90 in my script means the same volume as !volume 10 in the bot chat.
&volume=-80
seems to be like !volume 20

&volume=-50
seems to be very loud and above seems to be the same volume (LOUD lol)
 
Status
Not open for further replies.
Top