You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
12 lines
710 B
12 lines
710 B
hooks = ["MESSAGE_CREATE"]
|
|
def run(event, ctx, bot):
|
|
if ctx["content"].startswith(":") and not(int(ctx["author"]["id"]) in bot.config["authed"]):
|
|
bot.api.send_msg(ctx["channel_id"], "you lack the proper authentication")
|
|
return
|
|
if ctx["content"] == ":ops":
|
|
bot.api.send_msg(ctx["channel_id"], ", ".join([str(ident) for ident in bot.config["authed"]]))
|
|
elif ctx["content"].startswith(":op"):
|
|
for mention in ctx["mentions"]:
|
|
bot.config["authed"].append(int(mention["id"]))
|
|
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']}") |