Skip to content

Commit

Permalink
Merge pull request #84 from DeltaCoderr/develop
Browse files Browse the repository at this point in the history
📦 3.0.2
  • Loading branch information
DeltaCoderr authored Sep 18, 2021
2 parents 6ca0afc + 77c95ac commit 06f8042
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 10 deletions.
16 changes: 11 additions & 5 deletions Commands/Anime/fact.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
const { MessageEmbed } = require("discord.js");
const AnimeFact = require("anime-facts");
const api = new AnimeFact(config.FACT_API)
const fetch = require("node-fetch");

module.exports = {
help: {
Expand All @@ -11,8 +10,15 @@ module.exports = {
},
run: async (client, message, args) => {

api.getFact().then((r) => {
const embed = new MessageEmbed()
let url = "https://airi.kyoyo.me/api/fact";

fetch(url, {
headers: {
'Auth': config.FACT_API
}
}).then(res => res.json())
.then(r => {
const embed = new MessageEmbed()
.setColor(config.embedcolor)
.setTitle("Did you know?")
.setThumbnail(
Expand All @@ -25,4 +31,4 @@ module.exports = {
message.channel.send(embed);
});
},
};
};
5 changes: 3 additions & 2 deletions Commands/Fun/reddit.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
const { MessageEmbed } = require('discord.js');
const Discord = require("discord.js");
const redditimage = require('reddit.images');

module.exports = {
Expand All @@ -14,7 +15,7 @@ module.exports = {
if (!args[0]) return message.reply("**Please provide a subreddit.**")
const subreds = args[0]

redditimage.FetchSubreddit(subreds).then((data) => {
redditimage.reddit.FetchSubreddit(subreds).then((data) => {
const reddit = new MessageEmbed()
.setTitle(data.title)
.setURL(data.postLink)
Expand Down Expand Up @@ -78,4 +79,4 @@ module.exports = {
return message.channel.send('Invalid subreddit.')
}
}
}
}
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 1 addition & 2 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "karmabot",
"version": "3.0.0",
"version": "3.0.2",
"description": "",
"main": "index.js",
"scripts": {
Expand All @@ -11,7 +11,6 @@
"dependencies": {
"@discordjs/opus": "^0.5.3",
"amethyste-api": "^1.1.5",
"anime-facts": "^4.3.8",
"axios": "^0.21.1",
"canvacord": "^5.2.1",
"chalk": "^4.1.1",
Expand Down

0 comments on commit 06f8042

Please sign in to comment.