diff --git a/sweebot.py b/sweebot.py index 443e2d2..ccd0468 100644 --- a/sweebot.py +++ b/sweebot.py @@ -674,9 +674,9 @@ while True: request = youtube.videos().list(part='snippet,statistics', id=video_id) details = request.execute() title = details['items'][0]['snippet']['title'] - channel = details['items'][0]['snippet']['channelTitle'] - channel = details['items'][0]['statistics'][''] - multiline("(" + nick + ") [▶️ YouTube] {title} | Author: {channel}", channel) + channel_yt = details['items'][0]['snippet']['channelTitle'] + channelviews = details['items'][0]['statistics']['viewCount'] + multiline(f"(" + nick + ") [▶️ YouTube] {title} | Author: {channel_yt} | {views} Views", channel) except Exception as ex: multiline("(" + nick + ") [YouTube Error, is it a valid YouTube URL?]", channel) print(traceback.format_exc())