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:
parent
d23964848a
commit
46fd6ab38e
@ -1,6 +1,6 @@
|
|||||||
[chen]
|
[chen]
|
||||||
jid = chen@example.com
|
jid = chen@example.com
|
||||||
password = b0TPA55W0rD
|
password = b0TPA55W0rD
|
||||||
|
prefix = !
|
||||||
nick = Chen
|
nick = Chen
|
||||||
autojoin = room1@muc.example.com room2@muc.example.com room3@muc.example.com
|
autojoin = room1@muc.example.com room2@muc.example.com room3@muc.example.com
|
||||||
prefix = !
|
|
||||||
|
25
main.py
25
main.py
@ -136,7 +136,7 @@ class ChenBot(ClientXMPP):
|
|||||||
fname = filename if filename else f"file{ext}"
|
fname = filename if filename else f"file{ext}"
|
||||||
await self.embed_file(url, sender, mtype, ftype, fname, outfile)
|
await self.embed_file(url, sender, mtype, ftype, fname, outfile)
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
print(e)
|
print(e)
|
||||||
|
|
||||||
async def embed_file(self, url, sender, mtype, ftype, fname, outfile):
|
async def embed_file(self, url, sender, mtype, ftype, fname, outfile):
|
||||||
"""Embed a file and send the result to the sender."""
|
"""Embed a file and send the result to the sender."""
|
||||||
@ -295,24 +295,29 @@ class ChenBot(ClientXMPP):
|
|||||||
if ctx:
|
if ctx:
|
||||||
return
|
return
|
||||||
bot.send_message(
|
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
|
||||||
|
def repo(msg, ctx, sender):
|
||||||
|
if ctx:
|
||||||
|
return
|
||||||
|
bot.send_message(
|
||||||
|
mto=sender,
|
||||||
|
mbody=f"{msg.get_from().bare}: https://git.chaotic.ninja/usr/yakumo_izuru/chen",
|
||||||
|
mtype="chat",
|
||||||
)
|
)
|
||||||
|
|
||||||
@self.word
|
|
||||||
def repo(msg, ctx, sender):
|
|
||||||
if ctx:
|
|
||||||
return
|
|
||||||
bot.send_message(
|
|
||||||
mto=sender, mbody=f"{msg.get_from().bare}: https://git.chaotic.ninja/usr/yakumo_izuru/chen", mtype="chat",
|
|
||||||
)
|
|
||||||
|
|
||||||
2
|
2
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
config = configparser.ConfigParser()
|
config = configparser.ConfigParser()
|
||||||
config.read("config.ini")
|
config.read("config.ini")
|
||||||
jid = config["chen"]["jid"]
|
jid = config["chen"]["jid"]
|
||||||
prefix = config["chen"]["prefix"]
|
|
||||||
password = config["chen"]["password"]
|
password = config["chen"]["password"]
|
||||||
|
prefix = config["chen"]["prefix"]
|
||||||
nick = config["chen"]["nick"]
|
nick = config["chen"]["nick"]
|
||||||
autojoin = config["chen"]["autojoin"].split()
|
autojoin = config["chen"]["autojoin"].split()
|
||||||
bot = ChenBot(jid, password, nick, prefix, autojoin=autojoin)
|
bot = ChenBot(jid, password, nick, prefix, autojoin=autojoin)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user