Skip to content

Instantly share code, notes, and snippets.

@LordAro
Last active August 29, 2015 14:15
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LordAro/97683b278bf4143edc21 to your computer and use it in GitHub Desktop.
Save LordAro/97683b278bf4143edc21 to your computer and use it in GitHub Desktop.
@alanbriolat
Copy link

    # ...
    except ValueError:
        num = self.fallback_search(user_str)

def fallback_search(self, value):
    try:
        search = self.bot.plugins['search']
    except KeyError:
        return None
    return do_something_with(search.search(value))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment