mirror of
https://gitlab.com/ceda_ei/Quadnite-Bot
synced 2026-05-12 16:50:06 +02:00
18 lines
536 B
Python
18 lines
536 B
Python
from pathlib import Path
|
|
from deltachat2 import NewMsgEvent
|
|
from quadnite_bot.command import Command, Context
|
|
|
|
|
|
class HelpCommand(Command):
|
|
command = "help"
|
|
|
|
def __init__(self):
|
|
self.responses = []
|
|
for file in sorted((Path(__file__).resolve().parent.parent / "static/help").iterdir()):
|
|
with open(file) as f:
|
|
self.responses.append(f.read())
|
|
|
|
def process_event(self, ctx: Context, event: NewMsgEvent) -> None:
|
|
for response in self.responses:
|
|
ctx.reply(response)
|