Lady Yukari proceeds to smack Chen with her umbrella

Signed-off-by: Izuru Yakumo <yakumo.izuru@chaotic.ninja>

git-svn-id: file:///srv/svn/repo/chen/trunk@36 32723744-9b23-0b4a-b1da-9b2e968f9461
This commit is contained in:
yakumo.izuru 2024-04-01 17:52:39 +00:00
parent d23964848a
commit 46fd6ab38e
2 changed files with 16 additions and 11 deletions

View File

@ -1,6 +1,6 @@
[chen]
jid = chen@example.com
password = b0TPA55W0rD
prefix = !
nick = Chen
autojoin = room1@muc.example.com room2@muc.example.com room3@muc.example.com
prefix = !

11
main.py
View File

@ -295,7 +295,9 @@ class ChenBot(ClientXMPP):
if ctx:
return
bot.send_message(
mto=sender, mbody=f"{msg['mucnick']}: https://git.chaotic.ninja/usr/yakumo_izuru/chen", mtype="groupchat",
mto=sender,
mbody=f"{msg['mucnick']}: https://git.chaotic.ninja/usr/yakumo_izuru/chen",
mtype="groupchat",
)
@self.word
@ -303,16 +305,19 @@ class ChenBot(ClientXMPP):
if ctx:
return
bot.send_message(
mto=sender, mbody=f"{msg.get_from().bare}: https://git.chaotic.ninja/usr/yakumo_izuru/chen", mtype="chat",
mto=sender,
mbody=f"{msg.get_from().bare}: https://git.chaotic.ninja/usr/yakumo_izuru/chen",
mtype="chat",
)
2
if __name__ == "__main__":
config = configparser.ConfigParser()
config.read("config.ini")
jid = config["chen"]["jid"]
prefix = config["chen"]["prefix"]
password = config["chen"]["password"]
prefix = config["chen"]["prefix"]
nick = config["chen"]["nick"]
autojoin = config["chen"]["autojoin"].split()
bot = ChenBot(jid, password, nick, prefix, autojoin=autojoin)