Giter VIP home page Giter VIP logo

bottrosian's People

Contributors

aneesh223 avatar bobbadillio avatar deserializer avatar dfannius avatar robertni avatar wuijx avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

Forkers

dfannius jalpp

bottrosian's Issues

Deploy instructions

There should be a doc detailing how the bot is set up (source location, Heroku settings, etc.) so if all the devs disappear it's straightforward to get it up and running again.

Link accounts even if rating is not stable enough for belt

When I tried to link my lichess account, the belt check correctly failed because I didn't have a stable classical rating, but it should be still be linked in my profile. Instead, my !profile results include lichess username: None. Presumably the same is true for chess.com.

Bot doesn't save any state

BotTrosian needs to remember who users in discord are, and know when they've linked chess.com or lichess.org accounts.

Database Design

Database needs to be able to store:

  • Authenticated users
  • Linked chess.com profiles
  • Linked lichess.org profiles
  • Yesterday's elo
  • Today's elo

Schema things

Authenticated Users

  • DiscordID primary key VARCHAR(63)
  • DojoBelt VARCHAR(63)
  • ModAwardedBelt VARCHAR(63)

Lichess Data

  • DiscordID foreign key VARCHAR(63)
  • lichess username primary key VARCHAR(255)
  • Most recent lichess classical elo SMALLINT
  • Yesterday's lichess classical elo SMALLINT

Chess.com Data

  • DiscordID foreign key VARCHAR(63)
  • Chess.com username primary key VARCHAR(255)
  • Most Recent Chess.com rapid elo SMALLINT
  • Yesterday's Chess.com rapid elo SMALLINT

Note: I have no idea how to do database migrations in Heroku Postgres, and there's a chance I'll have to do some database stuff by hand if this needs to be updated later.

Schema Rationale

If I want to get fancy at some point, I can probably enforce in the database that a DiscordID in the authenticated user list has at least one of lichess data, chess.com, and I can definitely enforce with this schema that if a DiscordID is deleted (which is not currently supported or roadmapped functionality) it will delete the linked profiles in a cascading way.

Making usernames a primary key ensures that two users don't grab the same profile somehow. This might not be necessary, so maybe I shouldn't enforce this.

SMALLINT supports ELOs well above 3600 which isn't really a human elo.

Storing data in site-specific tables will make it easier to add database support for other sites later if desired. This also makes daily updates pretty easy, since we'll just need to update all the data in the two site-specific tables, and then update all the belts in authenticated users.

Discord.py Guilds

Discord or discord.py appear to have some concept of "guild", and those might be relevant to this bot's effective operation. I should learn what these are!

Bot can't generate png from FEN

Given a discord message with a FEN such as:
r1bqkbnr/pp1ppppp/2n5/2p5/4P3/5N2/PPPPKPPP/RNBQ1B1R b kq - 3 3

bottrosian should be able to generate a png and post it in the linked discord

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.