add nick to config

This commit is contained in:
Czar 2023-02-19 23:40:30 -03:00
commit 494fc21f35
Signed by: czar
GPG key ID: 2DBA9558E9277C37
2 changed files with 8 additions and 3 deletions

View file

@ -2,3 +2,4 @@
jid = angel@example.com
password = b0TPA55W0rD
autojoin = room1@muc.example.com room2@muc.example.com room3@muc.example.com
nick = angel-from-underworld

View file

@ -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)