Compare commits
No commits in common. "c9bae6a005548871e9296815e3ee482ce27f8afb" and "520097460bd69bb49f6415d5403a20f77dc52730" have entirely different histories.
c9bae6a005
...
520097460b
2 changed files with 6 additions and 41 deletions
|
@ -1,29 +0,0 @@
|
|||
#!/sbin/openrc-run
|
||||
supervisor=supervise-daemon
|
||||
|
||||
name="tomservobot"
|
||||
description="A custom bot for the local Matrix instance"
|
||||
|
||||
pidfile="/var/run/$name.pid"
|
||||
user="tomservo"
|
||||
script_args="./main.py"
|
||||
script_exec="/srv/tomservobot/.venv/bin/python"
|
||||
workdir="/srv/tomservobot/src"
|
||||
|
||||
depend() {
|
||||
need net synapse
|
||||
}
|
||||
|
||||
start() {
|
||||
ebegin "Starting Tom Servo Bot"
|
||||
cd $workdir || exit 1
|
||||
|
||||
start-stop-daemon --start --user "$user" --make-pidfile --pidfile "$pidfile" --chdir "$workdir" --exec "$script_exec" -- $script_args >> /var/log/tomservobot/bot.log 2>&1 &
|
||||
eend $?
|
||||
}
|
||||
|
||||
stop() {
|
||||
ebegin "Stopping Tom Servo Bot"
|
||||
start-stop-daemon --stop --pidfile "$pidfile"
|
||||
eend $?
|
||||
}
|
|
@ -15,20 +15,14 @@ ATTACH_PATH = Path(config("ATTACH_PATH", default="./attachments/", cast=str))
|
|||
class ReactionsModule(niobot.Module):
|
||||
"""Specifically for reactions/replies to certain comments/events."""
|
||||
|
||||
@niobot.command()
|
||||
async def panic(self, ctx: niobot.Context):
|
||||
"""AAAAAAHHHHHHHHHHHHHH!!!!!!!"""
|
||||
attachment = await niobot.ImageAttachment.from_file(ATTACH_PATH / "panic.gif")
|
||||
await ctx.client.send_message(ctx.room, None, attachment)
|
||||
|
||||
@niobot.command()
|
||||
async def rimshot(self, ctx: niobot.Context):
|
||||
"""Ba-Dum-Tsssssssss. . ."""
|
||||
attachment = await niobot.ImageAttachment.from_file(ATTACH_PATH / "rimshot.gif")
|
||||
await ctx.client.send_message(ctx.room, None, attachment)
|
||||
|
||||
@niobot.command()
|
||||
async def weekend(self, ctx: niobot.Context):
|
||||
"""Ladies and gentlemen--the weekend. . ."""
|
||||
attachment = await niobot.VideoAttachment.from_file(ATTACH_PATH / "weekend.mp4")
|
||||
await ctx.client.send_message(ctx.room, None, attachment)
|
||||
|
||||
@niobot.command()
|
||||
async def panic(self, ctx: niobot.Context):
|
||||
"""AAAAAAHHHHHHHHHHHHHH!!!!!!!"""
|
||||
attachment = await niobot.ImageAttachment.from_file(ATTACH_PATH / "panic.gif")
|
||||
await ctx.client.send_message(ctx.room, None, attachment)
|
||||
|
|
Loading…
Reference in a new issue