introduce

Introduce a discord member to the channel.

   We are going to use a GoT title/alias as our intro title, because finding good APIs with fun titles is fairly rare.
   It will allow either self introduction or someone else, using a terniary operator.
   After it gets the intro and title, it should give some sort of cool comment about them.
   The comment is really a chuck norris joke with their username as the name.
   GoT Title API: https://anapioficeandfire.com/Documentation
   Chuck Norris Fact API: http://www.icndb.com/api/
Parameters:
Name Type Description
user Object

which user to introduce

Returns:
string -
  • title and fun fact introduction (as a message to discord text channel)

Members

inner, constant auth

either arg or pick the author if empty, includes the ID mention info

inner authName

grab the actual name of the user for the silly comment about them, no tag attached

inner num

randomly select from one of 500 characters to get a title

inner outputJoke

randomly chosen joke

inner, constant reqOne

object to do an axios request for the title, using the number to randomly pick

inner, constant reqTwo

object to do an axios request for the fun fact, using the authName to populate who the fact uses

inner, constant responseOne

inner, constant responseTwo

inner title

randomly selected title, if returned object had more than one

inner, constant titleList

grab the aliases and titles, concat, and remove empty entries

Methods

inner execute(message, args) → {string}

Parameters:
Name Type Description
message string

command, used to determine which channel to return results

args string

recipient of introduction info to sent to channel; optional

Returns:
string -

selected introduction infformation with correct formatting and recipient

async, inner getTitleAndFact(reqOne, reqTwo) → {Object}

perform api calls for title and fun fact

Parameters:
Name Type Description
reqOne string
reqTwo string
Returns:
Object -

response