Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add !iknow and !theyknow #13

Open
tiffafoo opened this issue May 4, 2018 · 0 comments
Open

Add !iknow and !theyknow #13

tiffafoo opened this issue May 4, 2018 · 0 comments
Labels
command When the issue relates to a bot command enhancement New feature or request

Comments

@tiffafoo
Copy link
Collaborator

tiffafoo commented May 4, 2018

Detailed Description

!iknow add a self-summary of what languages/techs the user knows.
!they know @someone responds with a list of skills the user specified knows.

There are different ways to implement this. Either:

  • A poll type message that the user can react to
  • They send a comma-separated list of skills that will get added to our table + bridging table (easiest in my opinion)

Context

  • !iknow JavaScript => !theyknow @sirMerr => Bot responds with:@sirMerr knows JavaScript
  • !iknow 'Web Dev', Ruby => !theyknow @sirMerr => Bot responds with:
    |@sirMerr knows
    |  * Web Dev
    |  * Ruby
    

Possible Implementation

Pseudo code

SQL

INSERT INTO techs (id, name) VALUES (DEFAULT, [name_here]) 
  ON CONFLICT DO NOTHING 
  RETURNING id; 
...
-- ON CONFLICT DO NOTHING could also be added in the following query
INSERT INTO accounts_techs (account, tech) VALUES ([account_id_here], [tech_id_here]);
insertTech(
    discordId,
    callback = data => {},
    error = err => {
        console.log(err);
        msg.channel.send('Could not insert tech');
    }
)
@tiffafoo tiffafoo added enhancement New feature or request command When the issue relates to a bot command labels May 4, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
command When the issue relates to a bot command enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant