matrix-music-bot

Unnamed repository; edit this file 'description' to name the repository.
Log | Files | Refs | README

commit 5205b3d7e2c8002e12fe4699f6f67b7e2f0ac61a
parent f3182eb893551c7a1b43079d314c45a53cb12923
Author: John Kubach <johnkubach@gmail.com>
Date:   Wed,  5 Aug 2020 20:07:11 -0400

Change variable naming

"words" was a bit ambiguous. Changed variable name to "message".

Diffstat:
Mmusic.py | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/music.py b/music.py @@ -32,9 +32,9 @@ def on_message(room, event): if event['type'] == 'm.room.message': if event['content']['msgtype'] == "m.text": if 'youtube.com' in event['content']['body'] or 'youtu.be' in event['content']['body']: - words = event['content']['body'] - words = words.split() - url = words[0] + message = event['content']['body'] + message = message.split() + url = message[0] title = get_title(url) artist, song = get_artist_song(title)