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)
|
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
|
2.TODO list
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
[bot]
|
[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
|
volume = 0.1
|
||||||
admin = Azlux;AzMobile
|
admin = User1;User2;
|
||||||
music_folder = /home/dmichel/botamusique/music/
|
music_folder = /home/azlux/botamusique/music_folder
|
||||||
tmp_folder = /tmp/
|
tmp_folder = /tmp/
|
||||||
ignored_folders = tmp
|
ignored_folders = tmp
|
||||||
ignored_files = Thumbs.db
|
ignored_files = Thumbs.db
|
||||||
@ -21,7 +21,7 @@ play_radio = radio
|
|||||||
help = help
|
help = help
|
||||||
stop = stop
|
stop = stop
|
||||||
list = list
|
list = list
|
||||||
next = next
|
next = skip
|
||||||
current_music = np
|
current_music = np
|
||||||
volume = v
|
volume = v
|
||||||
kill = kill
|
kill = kill
|
||||||
@ -38,10 +38,10 @@ jazz = http://jazz-wr04.ice.infomaniak.ch/jazz-wr04-128.mp3
|
|||||||
|
|
||||||
[strings]
|
[strings]
|
||||||
current_volume = volume : %d%%
|
current_volume = volume : %d%%
|
||||||
change_volume = volume : %d%% par %s
|
change_volume = volume : %d%% by %s
|
||||||
bad_command = Commande incorrecte
|
bad_command = Incorrect command
|
||||||
not_admin = T'es pas admin, patate !
|
not_admin = You are not an admin !
|
||||||
not_playing = Aucun stream en lecture
|
not_playing = No music right now
|
||||||
bad_file = Bad file asked
|
bad_file = Bad file asked
|
||||||
no_file = Not file here
|
no_file = Not file here
|
||||||
bad_url = Bad URL asked
|
bad_url = Bad URL asked
|
||||||
@ -51,9 +51,9 @@ queue_empty = No more music in the playlist!
|
|||||||
now_playing = Now playing %s<br />%s
|
now_playing = Now playing %s<br />%s
|
||||||
|
|
||||||
help = Command available:
|
help = Command available:
|
||||||
<br />!play_file <path>
|
<br />!file <path>
|
||||||
<br />!play_url <url> - youtube or soundcloud
|
<br />!url <url> - youtube or soundcloud
|
||||||
<br />!play_radio <url> - url of a stream
|
<br />!radio <url> - url of a stream
|
||||||
<br />!list - display list of available tracks
|
<br />!list - display list of available tracks
|
||||||
<br />!queue - display items in queue
|
<br />!queue - display items in queue
|
||||||
<br />!next - jump to the next music of the playlist
|
<br />!next - jump to the next music of the playlist
|
@ -374,7 +374,8 @@ if __name__ == '__main__':
|
|||||||
|
|
||||||
args = parser.parse_args()
|
args = parser.parse_args()
|
||||||
config = configparser.ConfigParser(interpolation=None)
|
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:
|
if len(parsed_configs) == 0:
|
||||||
print('Could not read configuration from file \"{}\"'.format(args.config), file=sys.stderr)
|
print('Could not read configuration from file \"{}\"'.format(args.config), file=sys.stderr)
|
||||||
sys.exit()
|
sys.exit()
|
||||||
|
Reference in New Issue
Block a user