Browse Source

added check for double names when creating rooms, plus some updates to printcommands

master
alpcentaur 10 months ago
parent
commit
2e5039cef3
2 changed files with 13 additions and 6 deletions
  1. +12
    -5
      fdb_spider_interface.py
  2. +1
    -1
      new_message_file.txt

+ 12
- 5
fdb_spider_interface.py View File

@ -443,8 +443,8 @@ if __name__ == '__main__':
example : `createroom room-test-1 ['giz','fdb2'] ['tag1','tag2','tag3'] 7`
-----------------------------------------------------------------------------------------
To delete a room use
command : `deleteroom <room-id>`
example : `deleteroom 6572012bebb39dd248d08320`
command : `deleteroom <room-name>`
example : `deleteroom test42`
-----------------------------------------------------------------------------------------
To print the tags of a room use
command : `printtags <room-name>`
@ -738,7 +738,7 @@ if __name__ == '__main__':
print(e)
os.remove("rooms/" + room_id_del + ".txt")
anwer = 'deleting the requested room..'
answer = 'deleting the requested room..'
if len(user_input_list) > 2:
answer = 'Die Syntax zum Löschen eines Raumes hat einen Fehler. Versuche es erneut, nach dem Muster -> deleteroom <room_id>'
@ -746,7 +746,14 @@ if __name__ == '__main__':
if user_input_list[0] == 'createroom':
try:
room_name = user_input_list[1]
room_name_from_input = user_input_list[1]
room_id = name2id(room_name_from_input)
if room_id == 'NONE':
room_name = user_input_list[1]
else:
if len(room_id) > 8:
room_name = 'NONE'
except Exception as e:
room_name = 'NONE'
print(e)
@ -771,7 +778,7 @@ if __name__ == '__main__':
answer = 'Die Syntax hat einen Fehler. Wahrscheinlich sind Leerzeichen in den Listen. Leerzeichen definieren die Syntax. Versuche es erneut, nach dem Muster -> createroom room1 ["fdb1","fdb2"] ["tag1","tag2"]'
if room_name == 'NONE' or databases == 'NONE' or filters == 'NONE' or days_to_deadline == 'NONE':
answer = 'Um einen Raum zu erstellen, in dem neueste Einträge geteilt werden, lautet die Syntax: createroom <Raumname> <Liste-Datenbanken> <Liste-Filtertags> <Tage-bis-zur-Frist>'
answer = 'Um einen Raum zu erstellen, in dem neueste Einträge geteilt werden, lautet die Syntax: createroom <Raumname> <Liste-Datenbanken> <Liste-Filtertags> <Tage-bis-zur-Frist> \n Dabei darf der Name noch nicht vergeben sein. Im Zweifel einfach nochmal printrooms ausgeben lassen..'
else:
try:

+ 1
- 1
new_message_file.txt View File

@ -1 +1 @@
printcommands§%§%ZqWKDLrEKM3vKgdSy
printrooms§%§%eoj3hTktBCRcBbrt8

Loading…
Cancel
Save