|
|
|
@ -244,14 +244,14 @@ def banner(update: Update, context: CallbackContext) -> None: |
|
|
|
if select_user(conn, user.username): |
|
|
|
if select_user(conn, user.username): |
|
|
|
daten[user.username] = {} |
|
|
|
daten[user.username] = {} |
|
|
|
update.message.reply_text( |
|
|
|
update.message.reply_text( |
|
|
|
'Moin, lasst uns anfang ein Banner zu deiner Liste hinzu zufügen.\n\n' |
|
|
|
'Moin, let\'s start by adding a banner to your list.\n\n' |
|
|
|
'Wie willst Banner Daten hinzufügen?', |
|
|
|
'How will Banner add data?', |
|
|
|
reply_markup=ReplyKeyboardMarkup( |
|
|
|
reply_markup=ReplyKeyboardMarkup( |
|
|
|
reply_keyboard, one_time_keyboard=True, input_field_placeholder='Wie willst Banner Daten hinzufügen?' |
|
|
|
reply_keyboard, one_time_keyboard=True, input_field_placeholder='How will Banner add data?' |
|
|
|
), |
|
|
|
), |
|
|
|
) |
|
|
|
) |
|
|
|
else: |
|
|
|
else: |
|
|
|
context.bot.send_message(chat_id=user.id, text="Bitte setz dich mit @r3f1Zul in Verbindung.") |
|
|
|
context.bot.send_message(chat_id=user.id, text="Please get in touch with @r3f1Zul.") |
|
|
|
|
|
|
|
|
|
|
|
return OPTION |
|
|
|
return OPTION |
|
|
|
|
|
|
|
|
|
|
|
@ -292,8 +292,7 @@ def option(update: Update, context: CallbackContext) -> int: |
|
|
|
user = update.message.from_user |
|
|
|
user = update.message.from_user |
|
|
|
logger.info("Gender of %s: %s", user.first_name, update.message.text) |
|
|
|
logger.info("Gender of %s: %s", user.first_name, update.message.text) |
|
|
|
update.message.reply_text( |
|
|
|
update.message.reply_text( |
|
|
|
'I see! Please send me a photo of yourself, ' |
|
|
|
'Now send me the data', |
|
|
|
'so I know what you look like, or send /skip if you don\'t want to.', |
|
|
|
|
|
|
|
reply_markup=ReplyKeyboardRemove(), |
|
|
|
reply_markup=ReplyKeyboardRemove(), |
|
|
|
) |
|
|
|
) |
|
|
|
|
|
|
|
|
|
|
|
@ -396,7 +395,7 @@ def fileParser(update: Update, context: CallbackContext) -> int: |
|
|
|
|
|
|
|
|
|
|
|
daten[user.username]['json-file'] = context.bot.getFile(update.message.document.file_id) |
|
|
|
daten[user.username]['json-file'] = context.bot.getFile(update.message.document.file_id) |
|
|
|
|
|
|
|
|
|
|
|
update.message.reply_text("Sende mir Banner Bild") |
|
|
|
update.message.reply_text("Now send me the banner image") |
|
|
|
|
|
|
|
|
|
|
|
return PHOTO |
|
|
|
return PHOTO |
|
|
|
|
|
|
|
|
|
|
|
@ -561,7 +560,7 @@ def uploadJsonToGDrive(daten): |
|
|
|
gauth.SaveCredentialsFile("GoogleDriveCredentials.txt") |
|
|
|
gauth.SaveCredentialsFile("GoogleDriveCredentials.txt") |
|
|
|
drive = GoogleDrive(gauth) |
|
|
|
drive = GoogleDrive(gauth) |
|
|
|
|
|
|
|
|
|
|
|
file1 = drive.CreateFile({'parents': [{'id': '1cp3wfWLDB-BcY7ji-X-_HOW75ODISbzR'}], 'title': daten[user.username]['bannerInfos']['json_filename'], 'mimeType':'application/json'}) |
|
|
|
file1 = drive.CreateFile({'parents': [{'id': agent['gd-json']}], 'title': daten[user.username]['bannerInfos']['json_filename'], 'mimeType':'application/json'}) |
|
|
|
|
|
|
|
|
|
|
|
file1.SetContentFile(daten[user.username]['bannerInfos']['json_file_path']) |
|
|
|
file1.SetContentFile(daten[user.username]['bannerInfos']['json_file_path']) |
|
|
|
file1.Upload() |
|
|
|
file1.Upload() |
|
|
|
|