IRC channel keys, minor patch

This commit is contained in:
osmarks 2021-05-12 17:32:52 +01:00
parent 9ff2b0b8b6
commit a68317668a
2 changed files with 7 additions and 6 deletions

View File

@ -113,10 +113,11 @@ def setup(bot):
@bot.command(help="Get some information about the bot.", aliases=["invite"])
async def about(ctx):
await ctx.send("""**AutoBotRobot: The least useful Discord bot ever designed.**
AutoBotRobot has many features, but not necessarily any practical ones.
It can execute code via TIO.run, do reminders, print fortunes, and not any more!
AutoBotRobot is open source - the code is available at <https://github.com/osmarks/autobotrobot> - and you could run your own instance if you wanted to and could get around the complete lack of user guide or documentation.
You can also invite it to your server: <https://discordapp.com/oauth2/authorize?&client_id=509849474647064576&scope=bot&permissions=68608>
AutoBotRobot has many features, but not necessarily any practical ones.
It can execute code via TIO.run, do reminders, print fortunes, and not any more!
AutoBotRobot is open source - the code is available at <https://github.com/osmarks/autobotrobot> - and you could run your own instance if you wanted to and could get around the complete lack of user guide or documentation.
You can also invite it to your server: <https://discordapp.com/oauth2/authorize?&client_id=509849474647064576&scope=bot&permissions=68608>
AutoBotRobot is operated by gollark/osmarks.
""")
@bot.command(help="Roll simulated dice (basic NdX syntax, N <= 50, X <= 1e6).")

View File

@ -65,7 +65,7 @@ async def initialize():
def connect(conn, event):
for channel in util.config["irc"]["channels"]:
conn.join(channel)
conn.join(channel, key=util.config["irc"]["channel_keys"].get(channel, ""))
logging.info("Connected to %s on IRC", channel)
joined.add(channel)
@ -83,4 +83,4 @@ def setup(bot):
def teardown(bot):
if global_conn: global_conn.disconnect()
if unlisten: unlisten()
if unlisten: unlisten()