Git Product home page Git Product logo

nerdbot's Introduction

Nerd Bot

Available Commands

roll - Rolls the dice to generate a random number between 1-100.

weather - Given a zip code, get a quick weather status.

nasa_apod - Displays the Astronomy Picture of the Day from NASA.

nerdbot's People

Contributors

xdega avatar techdufus avatar brrees01 avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

nerdbot's Issues

'bot is not defined' error.

@bot.command line in each bot_command .py file errors:

2021-01-30T06:13:41.000000+00:00 app[api]: Build started by user [email protected]
2021-01-30T06:14:04.268446+00:00 app[api]: Release v17 created by user [email protected]
2021-01-30T06:14:05.097738+00:00 heroku[worker.1]: State changed from crashed to starting
2021-01-30T06:14:04.268446+00:00 app[api]: Deploy 83c07433 by user [email protected]
2021-01-30T06:14:09.623696+00:00 heroku[worker.1]: Starting process with command `python bot.py`
2021-01-30T06:14:10.325257+00:00 heroku[worker.1]: State changed from starting to up
2021-01-30T06:14:14.000000+00:00 app[api]: Build succeeded
2021-01-30T06:14:14.920087+00:00 heroku[worker.1]: Process exited with status 1
2021-01-30T06:14:14.971470+00:00 heroku[worker.1]: State changed from up to crashed
2021-01-30T06:14:14.796793+00:00 app[worker.1]: Traceback (most recent call last):
2021-01-30T06:14:14.796853+00:00 app[worker.1]:   File "/app/bot.py", line 34, in <module>
2021-01-30T06:14:14.797013+00:00 app[worker.1]:     import bot_commands
2021-01-30T06:14:14.797014+00:00 app[worker.1]:   File "/app/bot_commands/__init__.py", line 3, in <module>
2021-01-30T06:14:14.797157+00:00 app[worker.1]:     from . import help
2021-01-30T06:14:14.797193+00:00 app[worker.1]:   File "/app/bot_commands/help.py", line 1, in <module>
2021-01-30T06:14:14.797321+00:00 app[worker.1]:     @bot.command(pass_context=True)
2021-01-30T06:14:14.797401+00:00 app[worker.1]: NameError: name 'bot' is not defined

Need to investigate possible scoping issues with @bot.command from 'nested' .py files not referencing the bot definition inside bot.py line 17.

Command: Dinner

Based on, http://whatthefuckshouldimakefordinner.com/, a command that when ran will give an idea of what to make for dinner, along with a URL link for a recipe.

There is no REST API that I could find at a glance, so this may require simply hitting the URL and scraping the appropriate data from the HTML page.

Refactor Commands

The commands currently all live in a monolith bot.py file.

These commands could probably be factored out into a commands folder, and then incorporated into the main bot.py file.

Ideally, this uses an object-oriented approach. Additionally, the help command ought to be dynamically built.

Command: More from the NASA API.

Currently, we are only using NASA's Astronomy Picture of the Day data point. But the NASA API is quite diverse, and offers lots of interesting data that could be queried by a command.

Here is more information on NASA's API: https://api.nasa.gov/

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.