コード例 #1
0
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))
コード例 #2
0
def grant_access_sql(message, server, reason):
    """Request SQLjobs access in a server."""
    hf.grant(message, server.lower(), reason, "sqljobs")
コード例 #3
0
def grant_access_rw(message, db, reason):
    """Request read/write access to a database."""
    hf.grant(message, db.lower(), reason, "readwrite")
コード例 #4
0
def grant_access(message, db, reason):
    """Request read only access to a database."""
    hf.grant(message, db.lower(), reason, "readonly")