def end_poll(args):
    """Ends a poll."""
    if not args.isadmin:
        return "Nope, not gonna do it."
    if not args.msg:
        return "Syntax: !vote end <pollnum>"
    if not args.msg.isdigit():
        return "Not A Valid Positive Integer."
    poll = get_open_poll(args.session, int(args.msg))
    if poll is None:
        return "That poll doesn't exist or has already been deleted!"
    if poll.active == 0:
        return "Poll already ended!"
    poll.active = 0
    return "Poll ended!"
def end_poll ( args ) : if not args . isadmin : return "Nope, not gonna do it." if not args . msg : return "Syntax: !vote end <pollnum>" if not args . msg . isdigit ( ) : return "Not A Valid Positive Integer." poll = get_open_poll ( args . session , int ( args . msg ) ) if poll is None : return "That poll doesn't exist or has already been deleted!" if poll . active == 0 : return "Poll already ended!" poll . active = 0 return "Poll ended!"
Ends a poll.