and fixes for the accompanying breaking changes in default pluginsmaster
parent
09f451ed39
commit
cee3f1e465
@ -1,12 +1,12 @@ |
|||||||
hooks = ["MESSAGE_CREATE"] |
hooks = ["MESSAGE_CREATE"] |
||||||
def run(event, ctx, bot): |
def run(event, ctx, bot): |
||||||
if ctx["content"].startswith(":") and not(int(ctx["author"]["id"]) in bot.config["authed"]): |
if ctx["content"].startswith(":") and not(int(ctx["author"]["id"]) in bot.config["authed"]): |
||||||
bot.send_msg(ctx["channel_id"], "you lack the proper authentication") |
bot.api.send_msg(ctx["channel_id"], "you lack the proper authentication") |
||||||
return |
return |
||||||
if ctx["content"] == ":ops": |
if ctx["content"] == ":ops": |
||||||
bot.send_msg(ctx["channel_id"], ", ".join([str(ident) for ident in bot.config["authed"]])) |
bot.api.send_msg(ctx["channel_id"], ", ".join([str(ident) for ident in bot.config["authed"]])) |
||||||
elif ctx["content"].startswith(":op"): |
elif ctx["content"].startswith(":op"): |
||||||
for mention in ctx["mentions"]: |
for mention in ctx["mentions"]: |
||||||
bot.config["authed"].append(int(mention["id"])) |
bot.config["authed"].append(int(mention["id"])) |
||||||
bot.send_msg(ctx["channel_id"], f"added {mention['username']} to the session authed!") |
bot.api.send_msg(ctx["channel_id"], f"added {mention['username']} to the session authed!") |
||||||
bot.logger.write(f"added auth {mention['id']} {mention['username']}") |
bot.logger.write(f"added auth {mention['id']} {mention['username']}") |
Loading…
Reference in new issue