Ts3audiobot: Change bot name

Created on 22 Jun 2020  Ā·  22Comments  Ā·  Source: Splamy/TS3AudioBot

Hello

Can I turn off the change of bot name from the settings of an installed bot? For example, through the rights.toml file

question

All 22 comments

Sure, every command has an associated permission, so if you remove the cmd.bot.name permission (or don’t grant it in the first place), nobody can change the name.

More information can be found in the wiki: https://github.com/Splamy/TS3AudioBot/wiki/Rights

These are written in the rights file. Which exactly do I need to delete?

"+" = [
# Basic stuff
"cmd.help.",
"cmd.pm",
"cmd.subscribe",
"cmd.unsubscribe",
"cmd.kickme.
",
"cmd.version",

# Getting song info
"cmd.song",
"cmd.repeat",
"cmd.random",

# Conditionals and basic scripting
"cmd.if",
"cmd.print",
"cmd.rng",
"cmd.eval",
"cmd.take",
"cmd.xecute",
"cmd.getmy.*",
"cmd.json.*",
"cmd.bot.use",
"cmd.rights.can",

"+" = [
# Play controls
"cmd.play",
"cmd.pause",
"cmd.stop",
"cmd.seek",
"cmd.volume",
"cmd.yt",

    # Playlist management
    "cmd.list.*",
    "cmd.add",
    "cmd.clear",
    "cmd.previous",
    "cmd.next",
    "cmd.random.*",
    "cmd.repeat.*",

    # History features
    "cmd.history.add",
    "cmd.history.from",
    "cmd.history.id",
    "cmd.history.last",
    "cmd.history.play",
    "cmd.history.till",
    "cmd.history.title",

I don’t see cmd.bot.name in the excerpt you posted, so people should not be able to change the bot name.
(Did I misunderstand your question?)

You got my question right. it doesn't have a name command, but it can change it. What should I do ?

Are you in the admin group?
By default there is a rule that allows * (everything), if that matches for you, you are allowed to change the name.

Admin rule

[[rule]]
# Set your admin Group Ids here, ex: [ 13, 42 ]
groupid = [2216]
# And/Or your admin Client Uids here
useruid = [ "" ]
# By default treat requests from localhost as admin
ip = [ "127.0.0.1", "::1" ]

I guess I had tried userid before and the commands didn't work

So, do you still have a problem?

And if so, are you in the admin group? And can you upload your whole rights.toml, e.g. on https://gist.github.com?

Yeah I'm still having the problem

https://gist.github.com/farfik1/a32ea4aae0865333cfda194dccc1dced

I uploaded the rights file

Thanks, I tried out your rights.toml. Line 41 in there grants all rights ("+" = "*").
So the people that have rights to rename the bot (and do everything else) fulfill at least one of the following points (block from line 41 onwards):

  • groupid = [ 4273 ]: Members of the group 4273: I guess you are in that group
  • useruid = [ "" ]: People with an empty userid: That makes no sense, you can change that to useruid = [] or just remove this line
  • ip = [ "127.0.0.1", "::1" ]: Api requests from localhost: Allowed by default
  • isapi = true: All api requests: You need to have a firewall that disallows outside requests to the bot, otherwise, you should remove this line. It means everyone that can access the api interface of the bot can completely control it. Access from localhost are allowed by the line above

So, with your current settings, people can change the bot name over api or over TS if they are in group 4273.

I did not understand anything. Can you set the rights file that I throw at you accordingly? I just want the users not to change the Bot name. They can use other standard commands

Ok, do you want that people in group 4273 can change the name?
If not, you can just delete line 41 (`"+" = "*") and changing the bot name is not possible any more.

I did this, yes, it does not work, change name but it is closed in many command. For example, youtube search does not work

Not sure if I understood you, changing the name still works? How do you change the name?

For youtube search, you need to add "cmd.search.*", "cmd.param" to your rights.toml so it looks like this:


"+" = [

...

    "cmd.json.*",
    "cmd.bot.use",
    "cmd.rights.can",
    "cmd.search.*",
    "cmd.param",
]

The name has not changed. However, the youtube search command was also canceled. I will try the commands you gave

Yes, thank you for your help. But I have one more question. How can I give a user the right to change their name? When I open a song, it opens the song, but it says I am not authorized. We need to solve this too :) I share the current rights file with you

https://gist.github.com/farfik1/c333caafd00cb05c142378472ebcefcd

@Flakebi

This looks like its going to get a lost-in-translation issue

Another problem is that I can't login to the bot panel when I set this setting

"Error getting bot list"

@Bluscream @Flakebi

"Error getting bot list" can be solved by adding the cmd.bot.list permission. You probably also want cmd.system.info for the webinterface.

What do you mean with ā€˜change their name’? And what means ā€˜it says I am not authorized’?

I haven't tried what you said but it's still the same. What am I doing wrong?

https://gist.github.com/farfik1/a074a457c3cdd30374e8b2e2bfefe68e

I guess the ā€œhave notā€ in your sentence is a translation error.

Can you try to remove this whole section?

# Admin rule
[[rule]]
    # Set your admin Group Ids here, ex: [ 13, 42 ]
    groupid = [ 4273 ]
    # And/Or your admin Client Uids here
    useruid = [ "K+eJlnYaLh8jBaty+NoBlfJn6M4=", ]
    # By default treat requests from localhost as admin
    ip = [ "127.0.0.1", "::1" ]
    isapi = true
    "-" = "*"

I did what she said but this didn't happen

After making these settings, the bot does not announce the songs. How can I fix this? Shows the song that plays only when I use this command !song

Was this page helpful?
0 / 5 - 0 ratings

Related issues

ManuPlaysLP picture ManuPlaysLP  Ā·  5Comments

bennetgallein picture bennetgallein  Ā·  4Comments

iiAlphaWolf01 picture iiAlphaWolf01  Ā·  4Comments

Americanu picture Americanu  Ā·  3Comments

officialtaxz picture officialtaxz  Ā·  6Comments