- CallbackQuery für Creds zum Löschen der Nachricht mit den ganzen Keys

- Ändere Standard-Set für API-Keys. Puh, das war vielleicht alt!
This commit is contained in:
Andreas Bielawski 2016-10-06 01:42:20 +02:00
parent b825fad114
commit 0246874f0d
2 changed files with 6 additions and 18 deletions

View File

@ -386,37 +386,21 @@ end
function create_cred() function create_cred()
cred = { cred = {
bitly_access_token = "", bitly_access_token = "",
cloudinary_apikey = "",
cloudinary_api_secret = "",
cloudinary_public_id = "",
derpibooru_apikey = "",
fb_access_token = "", fb_access_token = "",
flickr_apikey = "", flickr_apikey = "",
ftp_site = "", forecastio_apikey = "",
ftp_username = "",
ftp_password = "",
gender_apikey = "",
golem_apikey = "", golem_apikey = "",
google_apikey = "", google_apikey = "",
google_cse_id = "", google_cse_id = "",
gitlab_private_token = "",
gitlab_project_id = "",
instagram_access_token = "",
lyricsnmusic_apikey = "", lyricsnmusic_apikey = "",
mal_username = "", mal_username = "",
mal_pw = "", mal_pw = "",
neutrino_userid = "",
neutrino_apikey = "",
owm_apikey = "",
page2images_restkey = "",
soundcloud_client_id = "", soundcloud_client_id = "",
tw_consumer_key = "", tw_consumer_key = "",
tw_consumer_secret = "", tw_consumer_secret = "",
tw_access_token = "", tw_access_token = "",
tw_access_token_secret = "", tw_access_token_secret = "",
x_mashape_key = "",
yandex_translate_apikey = "", yandex_translate_apikey = "",
yandex_rich_content_apikey = "",
yourls_site_url = "", yourls_site_url = "",
yourls_signature_token = "" yourls_signature_token = ""
} }

View File

@ -87,6 +87,10 @@ function creds_manager:rename_creds(var, newvar)
end end
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) function creds_manager:action(msg, config, matches)
local receiver = msg.from.id local receiver = msg.from.id
if not is_sudo(msg, config) then if not is_sudo(msg, config) then
@ -100,7 +104,7 @@ function creds_manager:action(msg, config, matches)
end end
if matches[1] == "/creds" then 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 return
elseif matches[1] == "/creds add" then elseif matches[1] == "/creds add" then
local var = string.lower(string.sub(matches[2], 1, 50)) local var = string.lower(string.sub(matches[2], 1, 50))