Better command,!help and custom file
This commit is contained in:
@ -36,6 +36,14 @@ chmod +x ./mumbleBot.py
|
||||
|
||||
The bot listen to the 8181 port so you should redirect to this one in you NAT configuration to let others peoples access the web interface. (DISABLED)
|
||||
|
||||
#### Custom commands
|
||||
You can copy the file `configuration.default.ini` to `configuration.ini` and customize all variable.
|
||||
you have the section :
|
||||
- bot : basic configuration of the bot : comment, folder, volume at start ....
|
||||
- command : you can customize the command you want for each action (if you put `help = helpme` , the bot will response to `!helpme` )
|
||||
- readio : here you can have a list of default radio ( I can play a jazz radio with the command `!radio jazz`)
|
||||
- strings : you can customize all string the bot can say.
|
||||
|
||||
|
||||
2.TODO list
|
||||
|
||||
|
@ -1,8 +1,8 @@
|
||||
[bot]
|
||||
comment = Coucou, Je suis née du savoir du Azlux, accès au https://azlux.fr/bot
|
||||
comment = Hi, I'm here to play radio, local music or youtube/soundcloud music. Have fun !
|
||||
volume = 0.1
|
||||
admin = Azlux;AzMobile
|
||||
music_folder = /home/dmichel/botamusique/music/
|
||||
admin = User1;User2;
|
||||
music_folder = /home/azlux/botamusique/music_folder
|
||||
tmp_folder = /tmp/
|
||||
ignored_folders = tmp
|
||||
ignored_files = Thumbs.db
|
||||
@ -21,7 +21,7 @@ play_radio = radio
|
||||
help = help
|
||||
stop = stop
|
||||
list = list
|
||||
next = next
|
||||
next = skip
|
||||
current_music = np
|
||||
volume = v
|
||||
kill = kill
|
||||
@ -38,10 +38,10 @@ jazz = http://jazz-wr04.ice.infomaniak.ch/jazz-wr04-128.mp3
|
||||
|
||||
[strings]
|
||||
current_volume = volume : %d%%
|
||||
change_volume = volume : %d%% par %s
|
||||
bad_command = Commande incorrecte
|
||||
not_admin = T'es pas admin, patate !
|
||||
not_playing = Aucun stream en lecture
|
||||
change_volume = volume : %d%% by %s
|
||||
bad_command = Incorrect command
|
||||
not_admin = You are not an admin !
|
||||
not_playing = No music right now
|
||||
bad_file = Bad file asked
|
||||
no_file = Not file here
|
||||
bad_url = Bad URL asked
|
||||
@ -51,9 +51,9 @@ queue_empty = No more music in the playlist!
|
||||
now_playing = Now playing %s<br />%s
|
||||
|
||||
help = Command available:
|
||||
<br />!play_file <path>
|
||||
<br />!play_url <url> - youtube or soundcloud
|
||||
<br />!play_radio <url> - url of a stream
|
||||
<br />!file <path>
|
||||
<br />!url <url> - youtube or soundcloud
|
||||
<br />!radio <url> - url of a stream
|
||||
<br />!list - display list of available tracks
|
||||
<br />!queue - display items in queue
|
||||
<br />!next - jump to the next music of the playlist
|
@ -374,7 +374,8 @@ if __name__ == '__main__':
|
||||
|
||||
args = parser.parse_args()
|
||||
config = configparser.ConfigParser(interpolation=None)
|
||||
parsed_configs = config.read(args.config, encoding='latin-1')
|
||||
parsed_configs = config.read(['configuration.default.ini', args.config], encoding='latin-1')
|
||||
|
||||
if len(parsed_configs) == 0:
|
||||
print('Could not read configuration from file \"{}\"'.format(args.config), file=sys.stderr)
|
||||
sys.exit()
|
||||
|
Reference in New Issue
Block a user