36 lines
948 B
JavaScript
36 lines
948 B
JavaScript
|
const discord = require("discord.js");
|
||
|
const imdb = require("imdb-api");
|
||
|
|
||
|
module.exports = {
|
||
|
name: "imdb",
|
||
|
description: "Informieren Sie sich über Serien und Filme",
|
||
|
category: "info",
|
||
|
usage: "imdb <name>",
|
||
|
run: async (client, message, args, color) => {
|
||
|
|
||
|
if(!args.length) {
|
||
|
return message.channel.send("Bitte geben Sie den Namen des Films oder der Serie an")
|
||
|
}
|
||
|
|
||
|
const imob = new imdb.Client({apiKey: "5e36f0db"}) //You need to paste you imdb api
|
||
|
|
||
|
let movie = await imob.get({'name': args.join(" ")})
|
||
|
|
||
|
let embed = new discord.MessageEmbed()
|
||
|
.setTitle(movie.title)
|
||
|
.setColor("RANDOM")
|
||
|
.setThumbnail(movie.poster)
|
||
|
.setDescription(movie.plot)
|
||
|
.setFooter(`Ratings: ${movie.rating}`)
|
||
|
.addField("Country", movie.country, true)
|
||
|
.addField("Languages", movie.languages, true)
|
||
|
.addField("Type", movie.type, true);
|
||
|
|
||
|
|
||
|
message.channel.send(embed)
|
||
|
|
||
|
|
||
|
|
||
|
}
|
||
|
|
||
|
}
|