diff --git a/plugins/twitter_user.lua b/plugins/twitter_user.lua index c730b56..0ea3107 100644 --- a/plugins/twitter_user.lua +++ b/plugins/twitter_user.lua @@ -46,6 +46,7 @@ function run(msg, matches) return "Twitter Access Token Secret ist leer, führe !creds add tw_access_token_secret KEY aus" end + local receiver = get_receiver(msg) local twitter_url = "https://api.twitter.com/1.1/users/show/"..matches[1]..".json" local response_code, response_headers, response_status_line, response_body = client:PerformRequest("GET", twitter_url) local response = json:decode(response_body) @@ -81,8 +82,11 @@ function run(msg, matches) local following = comma_value(response.friends_count) local statuses = comma_value(response.statuses_count) local footer = statuses..' Tweets, '..follower..' Follower, '..following..' folge ich, '..favorites..' Tweets favorisiert' + local pic_url = string.gsub(response.profile_image_url_https, "normal", "400x400") - + local file = download_to_file(pic_url) + local cb_extra = {file_path=file} + send_photo(receiver, file, ok_cb, false) return header..body..footer end