Browse Source

Initial commit of a very smol mattermost bot

master
Micke Nordin 1 year ago
parent
commit
8c6dd4ee8b
  1. 10
      abed.py
  2. 17
      bottn.py

10
abed.py

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

17
bottn.py

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