|
|
@ -11,6 +11,7 @@ botname = config['Chat']['username'] |
|
|
|
botpassword = config['Chat']['password'] |
|
|
|
server_url = config['Chat']['URL'] |
|
|
|
room_id = config['Chat']['room_id'] |
|
|
|
bot_user_id = config['Chat']['bot_user_id'] |
|
|
|
|
|
|
|
# here comes the functions to talk to gpt |
|
|
|
|
|
|
@ -31,8 +32,11 @@ if __name__ == '__main__': |
|
|
|
|
|
|
|
api = RocketChatAPI(settings={'username': botname, 'password': botpassword, 'domain': server_url}) |
|
|
|
|
|
|
|
#api.send_message('Ciao, I am the fdb-spider', room_id) |
|
|
|
# api.send_message('Ciao, I am the fdb-spider', room_id) |
|
|
|
|
|
|
|
# myinfo = api.get_my_info() |
|
|
|
|
|
|
|
print(myinfo) |
|
|
|
# rooms = api.get_private_rooms() |
|
|
|
|
|
|
|
# print(rooms) |
|
|
@ -40,7 +44,7 @@ if __name__ == '__main__': |
|
|
|
# api.send_message('Ole', room_id) |
|
|
|
|
|
|
|
n = 0 |
|
|
|
|
|
|
|
''' |
|
|
|
import time |
|
|
|
import datetime |
|
|
|
from datetime import timedelta |
|
|
@ -84,7 +88,7 @@ if __name__ == '__main__': |
|
|
|
new_message_list = new_message.split('§%§%') |
|
|
|
|
|
|
|
|
|
|
|
if new_message_list[0] != latest_message and new_message_list[1] != latest_message_id and latest_message_user_id != 'bb8EfPXrviu9yB9Ja': |
|
|
|
if new_message_list[0] != latest_message and new_message_list[1] != latest_message_id and latest_message_user_id != bot_user_id: |
|
|
|
|
|
|
|
new_message_file = open('new_message_file.txt', 'w') |
|
|
|
new_message_file.write(latest_message + '§%§%' + latest_message_id) |
|
|
@ -102,3 +106,4 @@ if __name__ == '__main__': |
|
|
|
api.send_message('Ich bin wieder bereit für Konfigurationsinput : )', room_id) |
|
|
|
time.sleep(3) |
|
|
|
|
|
|
|
''' |