Initial commit of a very smol mattermost bot

master
Micke Nordin 4 years ago
parent 1d1f20ee40
commit 8c6dd4ee8b

@ -0,0 +1,10 @@
#!/usr/bin/env python3
# -*- coding: utf-8 -*-
import re
from mmpy_bot import Plugin, listen_to
from mmpy_bot import Message
class Abed(Plugin):
@listen_to(".*[Cc]ool.*")
async def wake_up(self, message: Message):
self.driver.reply_to(message, "cool, cool, cool.")

@ -0,0 +1,17 @@
#!/usr/bin/env python3.9
# -*- coding: utf-8 -*-
from mmpy_bot import Bot, Settings
from abed import Abed
bot = Bot(
settings=Settings(
MATTERMOST_URL = "http://127.0.0.1",
MATTERMOST_PORT = 8065,
BOT_TOKEN = "##TOKEN##",
BOT_TEAM = "##TEAM##",
SSL_VERIFY = False,
), # Either specify your settings here or as environment variables.
plugins=[Abed()], # Add your own plugins here.
)
bot.run()
Loading…
Cancel
Save