def no_reason(message, db): """Display error when no reason given trying to 'grantrw' access, unless extending time.""" #message.reply(Strings['GRANT_EXAMPLE'].format(db)) try: hf.grant(message, db.lower(), "[EXTENDING ACCESS TIME]", False) except Exception as e: message._client.send_message(errors_channel, "```{}```".format(e))
def grant_access_sql(message, server, reason): """Request SQLjobs access in a server.""" hf.grant(message, server.lower(), reason, "sqljobs")
def grant_access_rw(message, db, reason): """Request read/write access to a database.""" hf.grant(message, db.lower(), reason, "readwrite")
def grant_access(message, db, reason): """Request read only access to a database.""" hf.grant(message, db.lower(), reason, "readonly")