The bot can be configured by using the variables at the top of the file.
CHANNELS = ('#480390668875726850', '#642816690354257960')
DISALLOWED = ('lurklite#1029',)
TOKEN = '(Discord token)'
CRASH_LOGS_DIR = '/path/to/logs/directory'
irc = miniirc_discord.Discord(TOKEN, auto_connect=False, stateless_mode=True)
Make sure that the import statement at the top of the file has miniirc_matrix
and not miniirc_discord
.
CHANNELS = ('!room-id:example.com', '!room-id-2:example.com')
DISALLOWED = ('@baduser:example.com',)
HOMESERVER = 'matrix.example.com'
TOKEN = '(Discord token)'
CRASH_LOGS_DIR = '/path/to/logs/directory'
irc = miniirc_matrix.Matrix('matrix.example.com', token=TOKEN,
auto_connect=False)
Warning: The bot will expect to already be joined to the specified channels and won't attempt to join them itself.
It's probably possible to connect the bot to IRC as well, however this bot, along with most IRC clients and servers, doesn't support multi-line messages.
The bot's working directory must be the same directory as
update-bls-mods.sh
, don't run the bot from a directory which other users can
write to as this could allow them to run code as your user.
None of these commands require a prefix.
Do the thing
: Runs theupdate-bls-mods.sh
script in the current working directory.Give me crash logs
: Show the most recent crash logs.Give me crash log [n]
: Show the nth most recent crash log.
This bot expects that logs are stored as MMDD.txt
files. Any other file
naming scheme will likely break. I have made an attempt to handle wraparounds
properly, however I may have missed something.