Comparing version 1.0.0 to 1.0.1
@@ -12,4 +12,4 @@ { | ||
"dependencies": { | ||
"f1bot": "^1.0.0" | ||
"f1bot": "*" | ||
} | ||
} |
@@ -44,4 +44,7 @@ const bot = require('./Bot'); | ||
let raceDate = moment(race.date).format("DD MM YYYY"); | ||
console.log(`Next race is ${race.raceName}, it will take place on ${race.Circuit.circuitName} in ${race.Circuit.Location.country} on ${raceDate}.`); | ||
console.log(`For more information check ${race.url}`); | ||
let message = `Next race is ${race.raceName}, it will take place on ${race.Circuit.circuitName} in ${race.Circuit.Location.country} on ${raceDate}. | ||
For more information check ${race.url}`; | ||
console.log(message); | ||
return message; | ||
} | ||
@@ -53,3 +56,5 @@ | ||
console.log(`${race.raceName} took place on ${circuit.circuitName} in ${circuit.Location.country} on ${raceDate}`) | ||
let message = `${race.raceName} took place on ${circuit.circuitName} in ${circuit.Location.country} on ${raceDate}`; | ||
console.log(message); | ||
return message | ||
} | ||
@@ -56,0 +61,0 @@ |
{ | ||
"name": "f1bot", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "formula 1 information bot", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -1,2 +0,30 @@ | ||
## Formula 1 data query bot: | ||
`npm i -g f1bot` | ||
## Formula 1 CLI data query bot: | ||
`npm i -g f1bot` | ||
## Bot can deal with following querries: | ||
### Next race | ||
`f1bot next` will show information about next Grand Prix. | ||
It really only needs to see word "next" for this querry, if you choose to be nice to not anger future AI you can ask | ||
`f1bit where is the next f1 race please` and it will reply. | ||
### Historic results | ||
`f1bot $YEAR $ROUND` will return location and date of the specified race | ||
## Formula 1 npm module bot | ||
`npm i --save f1bot` | ||
in your code: | ||
`const f1bot = require('f1bot')` | ||
```javascript | ||
async function askBotAboutNextRace(){ | ||
let response = await f1bot('next race'); | ||
console.log(response); | ||
} | ||
``` | ||
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9993
296
31