GithubHelp home page GithubHelp logo

annikacodes / expecto-botronum Goto Github PK

View Code? Open in Web Editor NEW
1.0 1.0 3.0 411 KB

A Pokémon Showdown chatbot written in Python.

Home Page: https://psim.us/botdevelopment

License: MIT License

Python 82.91% Shell 1.03% Rust 16.05%
hacktoberfest python

expecto-botronum's People

Contributors

annikacodes avatar dependabot[bot] avatar kalest3 avatar repu379 avatar slowpoc avatar

Stargazers

 avatar

Watchers

 avatar

expecto-botronum's Issues

Implement data.py

See v3.md for details.

  • importable way to save variables under names
  • importable way to load variable from names they're saved under in data.json

Implement superhero.py

See v3.md for details.
Most of this can probably be ported from v2, although that code is a bit hacky zzz.

  • main superhero API
  • ~superhero in PMs (depends #13)

Depends on #4 and #5 (and #13 for PM html usage).

Log messages

Could be a neat little feature extension, and potentially take over some of the functionality of the personal bot I run.

Bugs in the ~git command

Currently, there are many false "error" messages caused by git pull sending stderr data on success, and iirc the bot also repeats messages.

Implement conversation.py

See v3.md for details.

  • Way to add/remove text snippets from data.json and display a random one in chat (2a9a5eb)
  • Differentiate between commands for facts and topic while utilizing the same functions. (ffa1cc7)
  • Upload to Pastebin using an API key from config (87c1eb5)

Depends on #4 and #5.

Refactor to f-strings

Refactor .format() and string concatenation to f-strings, since we now have f-string support (Python 3.6!) on the bot host.
Skärmavbild 2020-06-24 kl  10 15 59 em

Implement base.py

See v3.md for details.
I'm not going to add any checkboxes because this module is quite simple.
Depends on #4.

Write tests

  • tests for core,py
    • Message
    • Room
    • User
    • Connection
  • tests for chatlog.py
  • Module tests
    • tests for superhero.py
    • tests for games.py
    • tests for conversation.py
    • tests for base.py
    • tests for joinphrase.py
    • tests for admin.py

core: implement user tracking

  • a Connection.userlist attribute mapping Users to lists of roomids that's modified upon receiving a Message of type join or leave. (f8324cc)
  • a Connection.getUser(id) attribute that can fetch a User object from the room's userlist (f8324cc)
  • ways to prevent duplicating User objects - a check under Connection.userlist for other rooms the user is in, perhaps? (f8324cc)
  • /userlist on joining a room + handler (e331f2e)

Implement core.py

See v3.md for more info.

  • Connection class (a58c901)
  • Message class (b0b736f)
  • Room class (3ba2080)
  • User class (d5cac12)
  • loading configuration from config.json (c45a028)
  • example/skeleton for Module class (not technically in core.py but necessary for it to function) (a093d04)

For a challenge, add logging (#12) or joinphrase stuff (#8).

User-facing documentation

While v3.md and Python's docstrings are good programmer-facing documentation, there should be some kind of documentation of commands for PS! users, and perhaps more documentation of config.json options too, since that doesn't have docstrings.

Race conditions in data

if two things use data.get() and then later data.set() there is no lock and data could be overwritten. this is bad. i am very hot and tired but future annika please deal with this

Superhero API not working

Skärmavbild 2020-05-24 kl  3 59 51 em

Probably an issue with the API but could be in Expecto's parsing code.
EDIT: it was in the parsing code.

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.