-
Notifications
You must be signed in to change notification settings - Fork 97
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
39b9d33
commit e2d9696
Showing
10 changed files
with
178 additions
and
71 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import { IntentData } from "../../types"; | ||
|
||
const IMGS = [ | ||
'https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcSS815rKFCQQ7zkA8mDW5gH45sBT0Eiu7McHw&usqp=CAU', | ||
'https://i.pinimg.com/originals/05/1b/7d/051b7d93394fc94c082f1801bc4ccfb2.jpg' | ||
] | ||
// sends a random image | ||
export default { | ||
keywords: [ | ||
'image', | ||
'img', | ||
'imag' | ||
], | ||
entities: { }, | ||
answer: () => { | ||
const url = IMGS[Math.floor(Math.random()*IMGS.length)] | ||
return { | ||
text: 'here is a random image for you', | ||
image: { url } | ||
} | ||
}, | ||
meta: { | ||
userFacingName: [ 'random image' ], | ||
description: 'Replies with a random image', | ||
examples: [ | ||
'image pls', | ||
'send a random image' | ||
] | ||
} | ||
} as IntentData |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,20 @@ | ||
import greeting from './greeting.json' | ||
import timings from './timings.json' | ||
import docAccess from './doc-access' | ||
import imgAccess from './img-access' | ||
import help from './help' | ||
|
||
import { createLanguageProcessor } from '../../LanguageProcessor' | ||
import docAccess from './doc-access' | ||
|
||
export default createLanguageProcessor( | ||
[ | ||
greeting, | ||
timings, | ||
docAccess, | ||
help([greeting, timings]) // generate help for our two intents | ||
imgAccess, | ||
help([greeting, timings, docAccess, imgAccess]) // generate help for our intents | ||
], | ||
{ | ||
parsingFailedText: "Sorry we couldn't understand {{input}}" | ||
parsingFailedText: "Sorry we couldn't understand '{{input}}'" | ||
} | ||
) |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters