From 0246874f0d072a9aab96f0ed4321196343125f0a Mon Sep 17 00:00:00 2001 From: Andreas Bielawski Date: Thu, 6 Oct 2016 01:42:20 +0200 Subject: [PATCH] =?UTF-8?q?-=20CallbackQuery=20f=C3=BCr=20Creds=20zum=20L?= =?UTF-8?q?=C3=B6schen=20der=20Nachricht=20mit=20den=20ganzen=20Keys=20-?= =?UTF-8?q?=20=C3=84ndere=20Standard-Set=20f=C3=BCr=20API-Keys.=20Puh,=20d?= =?UTF-8?q?as=20war=20vielleicht=20alt!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- otouto/bot.lua | 18 +----------------- otouto/plugins/creds.lua | 6 +++++- 2 files changed, 6 insertions(+), 18 deletions(-) diff --git a/otouto/bot.lua b/otouto/bot.lua index f583b73..cf551e8 100644 --- a/otouto/bot.lua +++ b/otouto/bot.lua @@ -386,37 +386,21 @@ end function create_cred() cred = { bitly_access_token = "", - cloudinary_apikey = "", - cloudinary_api_secret = "", - cloudinary_public_id = "", - derpibooru_apikey = "", fb_access_token = "", flickr_apikey = "", - ftp_site = "", - ftp_username = "", - ftp_password = "", - gender_apikey = "", + forecastio_apikey = "", golem_apikey = "", google_apikey = "", google_cse_id = "", - gitlab_private_token = "", - gitlab_project_id = "", - instagram_access_token = "", lyricsnmusic_apikey = "", mal_username = "", mal_pw = "", - neutrino_userid = "", - neutrino_apikey = "", - owm_apikey = "", - page2images_restkey = "", soundcloud_client_id = "", tw_consumer_key = "", tw_consumer_secret = "", tw_access_token = "", tw_access_token_secret = "", - x_mashape_key = "", yandex_translate_apikey = "", - yandex_rich_content_apikey = "", yourls_site_url = "", yourls_signature_token = "" } diff --git a/otouto/plugins/creds.lua b/otouto/plugins/creds.lua index 9c19a39..6ab21b7 100644 --- a/otouto/plugins/creds.lua +++ b/otouto/plugins/creds.lua @@ -87,6 +87,10 @@ function creds_manager:rename_creds(var, newvar) end end +function creds_manager:callback(callback, msg, self, config) + utilities.delete_message(msg.chat.id, msg.message_id) +end + function creds_manager:action(msg, config, matches) local receiver = msg.from.id if not is_sudo(msg, config) then @@ -100,7 +104,7 @@ function creds_manager:action(msg, config, matches) end if matches[1] == "/creds" then - utilities.send_reply(msg, creds_manager:list_creds()) + utilities.send_reply(msg, creds_manager:list_creds(), false, '{"inline_keyboard":[[{"text":"Keys verbergen","callback_data":"creds:"}]]}') return elseif matches[1] == "/creds add" then local var = string.lower(string.sub(matches[2], 1, 50))