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 = {
|
||||
name: '',
|
||||
description: '',
|
||||
execute(message, args) {
|
||||
message.channel.send('');
|
||||
name: 'strain',
|
||||
description: 'Search for information about a cannabis strain. Powered by Otreeba',
|
||||
execute(message, file) {
|
||||
|
||||
}
|
||||
}
|
@ -14,7 +14,8 @@
|
||||
"savegif",
|
||||
"truth",
|
||||
"joint",
|
||||
"ping"
|
||||
"ping",
|
||||
"strain"
|
||||
],
|
||||
"emoji": {
|
||||
"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",
|
||||
"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": {
|
||||
"version": "1.0.2",
|
||||
"resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz",
|
||||
@ -816,6 +824,11 @@
|
||||
"integrity": "sha512-zAoAQiudy+r5SvnSw3KJy5os/oRJYHzrzja/tBDqrZtNhUw8bt6y8OBzMWcjWr+8liV8Eb6yOhw8WZ7VFZ5ZzA==",
|
||||
"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": {
|
||||
"version": "1.0.0",
|
||||
"resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz",
|
||||
|
@ -4,6 +4,7 @@
|
||||
"description": "Nods and Nod Accessories.",
|
||||
"main": "index.js",
|
||||
"dependencies": {
|
||||
"axios": "^0.21.1",
|
||||
"discord.js": "^12.5.3",
|
||||
"dotenv": "^10.0.0",
|
||||
"giphy-api": "^2.0.2",
|
||||
|
Loading…
Reference in New Issue
Block a user