Skip to content

Add !iknow and !theyknow #13

@tiffafoo

Description

@tiffafoo

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');
    }
)

Metadata

Metadata

Assignees

No one assigned

    Labels

    commandWhen the issue relates to a bot commandenhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions