Adding weed search stuff
This commit is contained in:
parent
4c669b90ad
commit
85b0eb7c5c
22
commands/strain.js
Normal file
22
commands/strain.js
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
const axios = require('axios').default;
|
||||||
|
const options = {
|
||||||
|
method: 'GET',
|
||||||
|
url: 'https://brianiswu-otreeba-open-cannabis-v1.p.rapidapi.com/strains',
|
||||||
|
headers: {
|
||||||
|
'x-rapidapi-key': '0b3f85bcb7msh1e6e80e963c9914p1d1934jsnc3542fc83520',
|
||||||
|
'x-rapidapi-host': 'brianiswu-otreeba-open-cannabis-v1.p.rapidapi.com'
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
module.exports = {
|
||||||
|
name: 'strain',
|
||||||
|
description: 'Search for information about a cannabis strain. Powered by Otreeba',
|
||||||
|
execute(message, file) {
|
||||||
|
options.url = options.url + '?name=' + file.name;
|
||||||
|
axios.request(options).then(function (response) {
|
||||||
|
console.log(response.data);
|
||||||
|
}).catch(function (error) {
|
||||||
|
console.error(error);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
@ -1,7 +1,9 @@
|
|||||||
|
const axios = require('axios').default;
|
||||||
|
|
||||||
module.exports = {
|
module.exports = {
|
||||||
name: '',
|
name: 'strain',
|
||||||
description: '',
|
description: 'Search for information about a cannabis strain. Powered by Otreeba',
|
||||||
execute(message, args) {
|
execute(message, file) {
|
||||||
message.channel.send('');
|
|
||||||
}
|
}
|
||||||
}
|
}
|
@ -14,7 +14,8 @@
|
|||||||
"savegif",
|
"savegif",
|
||||||
"truth",
|
"truth",
|
||||||
"joint",
|
"joint",
|
||||||
"ping"
|
"ping",
|
||||||
|
"strain"
|
||||||
],
|
],
|
||||||
"emoji": {
|
"emoji": {
|
||||||
"joint": "<:joint:862082955902976000>",
|
"joint": "<:joint:862082955902976000>",
|
||||||
|
13
package-lock.json
generated
13
package-lock.json
generated
@ -223,6 +223,14 @@
|
|||||||
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
"resolved": "https://registry.npmjs.org/asynckit/-/asynckit-0.4.0.tgz",
|
||||||
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
|
"integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k="
|
||||||
},
|
},
|
||||||
|
"axios": {
|
||||||
|
"version": "0.21.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/axios/-/axios-0.21.1.tgz",
|
||||||
|
"integrity": "sha512-dKQiRHxGD9PPRIUNIWvZhPTPpl1rf/OxTYKsqKUDjBwYylTvV7SjSHJb9ratfyzM6wCdLCOYLzs73qpg5c4iGA==",
|
||||||
|
"requires": {
|
||||||
|
"follow-redirects": "^1.10.0"
|
||||||
|
}
|
||||||
|
},
|
||||||
"balanced-match": {
|
"balanced-match": {
|
||||||
"version": "1.0.2",
|
"version": "1.0.2",
|
||||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
||||||
@ -816,6 +824,11 @@
|
|||||||
"integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==",
|
"integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==",
|
||||||
"dev": true
|
"dev": true
|
||||||
},
|
},
|
||||||
|
"follow-redirects": {
|
||||||
|
"version": "1.14.1",
|
||||||
|
"resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.14.1.tgz",
|
||||||
|
"integrity": "sha512-HWqDgT7ZEkqRzBvc2s64vSZ/hfOceEol3ac/7tKwzuvEyWx3/4UegXh5oBOIotkGsObyk3xznnSRVADBgWSQVg=="
|
||||||
|
},
|
||||||
"fs.realpath": {
|
"fs.realpath": {
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
"description": "Nods and Nod Accessories.",
|
"description": "Nods and Nod Accessories.",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
"axios": "^0.21.1",
|
||||||
"discord.js": "^12.5.3",
|
"discord.js": "^12.5.3",
|
||||||
"dotenv": "^10.0.0",
|
"dotenv": "^10.0.0",
|
||||||
"giphy-api": "^2.0.2",
|
"giphy-api": "^2.0.2",
|
||||||
|
Loading…
Reference in New Issue
Block a user