]> PatchyGit - angel.git/commitdiff
add nick to config
authorKylie Czar <czar@kalli.st>
Mon, 20 Feb 2023 02:40:30 +0000 (23:40 -0300)
committerKylie Czar <czar@kalli.st>
Mon, 20 Feb 2023 02:40:30 +0000 (23:40 -0300)
config.ini.default
main.py

index 89a666c..3e21720 100644 (file)
@@ -1,4 +1,5 @@
 [angel]
 jid = angel@example.com
 password = b0TPA55W0rD
-autojoin = room1@muc.example.com room2@muc.example.com room3@muc.example.com
\ No newline at end of file
+autojoin = room1@muc.example.com room2@muc.example.com room3@muc.example.com
+nick = angel-from-underworld
diff --git a/main.py b/main.py
index b6dc1cb..1e883dc 100644 (file)
--- a/main.py
+++ b/main.py
@@ -292,6 +292,10 @@ class AngelBot(ClientXMPP):
         vcard = self.plugin["xep_0054"].make_vcard()
 
         vcard["URL"] = "https://gt.kalli.st/czar/angel"
+        vcard["DESC"] = "Angel is a bot that can do link previews and embeds."
+        vcard["NICKNAME"] = "Angel"
+        vcard["FN"] = "Angel"
+        vcard["PHOTO"] = info
 
         asyncio.gather(self.plugin["xep_0054"].publish_vcard(vcard))
 
@@ -356,8 +360,8 @@ if __name__ == "__main__":
     jid = config["angel"]["jid"]
     password = config["angel"]["password"]
     autojoin = config["angel"]["autojoin"].split()
-
-    bot = AngelBot(jid, password, nick="angel-from-overworld", autojoin=autojoin)
+    nick = config["angel"]["nick"]
+    bot = AngelBot(jid, password, nick=nick, autojoin=autojoin)
 
     bot.connect()
     bot.process(forever=True)