[Change] bugFix and adding schnackedatz

master
Marcel Eggert 3 years ago
parent 79e0bd7623
commit 7511035e15
  1. 8
      agent-Schnackedatz.json
  2. 9
      agent-azraelis.json
  3. 1
      agent-r3f1Zul.json
  4. 15
      bannerDiscovery.py
  5. BIN
      bannerList.sqlite3

@ -0,0 +1,8 @@
{
"completed-mission": 0,
"banner-completed": 0,
"gd-id": "1dgO_CzsvrBTvBK9cNR-jhbpulPYAnlyU",
"gd-json": "1My6eceL0KxLEuOuvy6Wndb7W12XrfPBa",
"liste": "Meine Banner",
"channel": "-1001240326731"
}

@ -1,5 +1,8 @@
{
"completed-mission": 2682,
"banner-completed": 113,
"gd-id": "1nZJEAGh1OdzveuKdgHqA4P9yaSorDLYH"
"completed-mission": 3342,
"banner-completed": 145,
"gd-id": "1G2mSZczK8isZ2h-cgjidmV_mTL4SI-g6",
"gd-json": "1nZJEAGh1OdzveuKdgHqA4P9yaSorDLYH",
"liste": "SpecOPs - Missions",
"channel": "@KnallfroschOnTour"
}

@ -2,6 +2,7 @@
"completed-mission": 10368,
"banner-completed": 476,
"gd-id": "1TymjzUMWidVvrdTbgNy85dfEA8q7DJtg",
"gd-json": "1cp3wfWLDB-BcY7ji-X-_HOW75ODISbzR",
"liste": "Meine Banner",
"channel": "@r3f1sworld"
}

@ -244,14 +244,14 @@ def banner(update: Update, context: CallbackContext) -> None:
if select_user(conn, user.username):
daten[user.username] = {}
update.message.reply_text(
'Moin, lasst uns anfang ein Banner zu deiner Liste hinzu zufügen.\n\n'
'Wie willst Banner Daten hinzufügen?',
'Moin, let\'s start by adding a banner to your list.\n\n'
'How will Banner add data?',
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:
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
@ -292,8 +292,7 @@ def option(update: Update, context: CallbackContext) -> int:
user = update.message.from_user
logger.info("Gender of %s: %s", user.first_name, update.message.text)
update.message.reply_text(
'I see! Please send me a photo of yourself, '
'so I know what you look like, or send /skip if you don\'t want to.',
'Now send me the data',
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)
update.message.reply_text("Sende mir Banner Bild")
update.message.reply_text("Now send me the banner image")
return PHOTO
@ -561,7 +560,7 @@ def uploadJsonToGDrive(daten):
gauth.SaveCredentialsFile("GoogleDriveCredentials.txt")
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.Upload()

Binary file not shown.
Loading…
Cancel
Save