Dateien nach "commands/info-search" hochladen

This commit is contained in:
M_Viper 2024-02-07 14:46:45 +00:00
parent cd5f32bb1c
commit a87d20e238
24 changed files with 1092 additions and 0 deletions

View File

@ -0,0 +1,52 @@
const Discord = require("discord.js");
const malScraper = require('mal-scraper');
module.exports = {
name: "anime",
category: "suchen",
description: "Informieren Sie sich über einen Anime",
usage: "[command | Anime]",
run: async (client, message, args) => {
//command
const search = `${args}`;
if (!search)
return message.reply('Bitte geben Sie eine Suchanfrage ein!');
malScraper.getInfoFromName(search)
.then((data) => {
const malEmbed = new Discord.MessageEmbed()
.setAuthor(`Meine Anime-Liste Suchergebnis für ${args}`.split(',').join(' '))
.setThumbnail(data.picture)
.setColor('RANDOM') //What ever u want color!
.addField('Premiered', `\`${data.premiered}\``, true)
.addField('Broadcast', `\`${data.broadcast}\``, true)
.addField('Genres', `\`${data.genres}\``, true)
.addField('English Title', `\`${data.englishTitle}\``, true)
.addField('Japanese Title', `\`${data.japaneseTitle}\``, true)
.addField('Type', `\`${data.type}\``, true)
.addField('Episodes', `\`${data.episodes}\``, true)
.addField('Rating', `\`${data.rating}\``, true)
.addField('Aired', `\`${data.aired}\``, true)
.addField('Score', `\`${data.score}\``, true)
.addField('Favorite', `\`${data.favorites}\``, true)
.addField('Ranked', `\`${data.ranked}\``, true)
.addField('Duration', `\`${data.duration}\``, true)
.addField('Studios', `\`${data.studios}\``, true)
.addField('Popularity', `\`${data.popularity}\``, true)
.addField('Members', `\`${data.members}\``, true)
.addField('Score Stats', `\`${data.scoreStats}\``, true)
.addField('Source', `\`${data.source}\``, true)
.addField('Synonyms', `\`${data.synonyms}\``, true)
.addField('Status', `\`${data.status}\``, true)
.addField('Identifier', `\`${data.id}\``, true)
.addField('Link', data.url, true)
.setTimestamp()
.setFooter(`Requested ${message.member.displayName}`, message.author.displayAvatarURL({ dynamic: true }))
message.channel.send(malEmbed);
})
}
};

View File

@ -0,0 +1,41 @@
const Discord = require('discord.js');
module.exports = {
name:"invites",
aliases: ["invs"],
category: "info",
accessableby: ""
,
run: async (bot, message, args) => {
try {
let member = await message.mentions.members.first() || message.guild.members.cache.get(args[0]) || message.guild.members.cache.find(r => r.user.username.toLowerCase() === args.join(' ').toLocaleLowerCase()) || message.guild.members.cache.find(r => r.displayName.toLowerCase() === args.join(' ').toLocaleLowerCase()) || message.member;
let invites = await message.guild.fetchInvites()
let memberInvites = invites.filter(i => i.inviter && i.inviter.id === member.user.id);
if (memberInvites.size <= 0) {
return message.channel.send(`**${member.displayName} hat niemanden auf den Server eingeladen!**`, (member === message.member ? null : member));
{} }
let content = memberInvites.map(i => i.code).join("\n");
let index = 0;
memberInvites.forEach(invite => index += invite.uses);
let embed = new Discord.MessageEmbed()
.setColor("GREEN")
.setFooter(message.guild.name, message.guild.iconURL())
.setAuthor(`Invite Tracker für ${message.guild.name}`)
.setDescription(`Informationen zu Einladungen von ${member.displayName}`)
.addField("**Keine. Eingeladene Personen**", index)
.addField("Invitation Codes\n\n", content);
message.channel.send(embed);
} catch (e) {
return message.channel.send(e.message)
}
}
};

View File

@ -0,0 +1,39 @@
const Discord = require("discord.js");
const { MessageEmbed } = require("discord.js");
const { Color } = require("../../config.json");
module.exports = {
name: "avatar",
aliases: ["icon", "pfp"],
category: "fun",
description: "Mitglieder-Avatar anzeigen!",
usage: "Avatar | <Mention Member>",
accessableby: "everyone",
run: async (client, message, args) => {
//Start
let Member = message.mentions.users.first() || message.guild.member(args[0]) || message.author;
let embed = new Discord.MessageEmbed()
.setColor(Color)
.addField(
"Links",
`[Png](${Member.displayAvatarURL({
format: "png",
dynamic: true
})}) | [Jpg](${Member.displayAvatarURL({
format: "jpg",
dynamic: true
})}) | [Webp](${Member.displayAvatarURL({
format: "webp",
dynamic: true
})})`
)
.setImage(Member.displayAvatarURL({ dynamic: true }))
.setTimestamp();
message.channel.send(embed);
//End
}
};

View File

@ -0,0 +1,21 @@
const { Client, Message, MessageEmbed } = require('discord.js');
module.exports = {
name: 'badges',
category: 'info',
/**
* @param {Client} client
* @param {Message} message
* @param {String[]} args
*/
run: async(client, message, args) => {
const user = message.mentions.users.first() || message.author;
const flags = user.flags.toArray();
console.log(flags);
message.channel.send(`${user}'s badges: ${flags.join(', ')}`)
}
}

View File

@ -0,0 +1,33 @@
const db = require("quick.db");
const Discord = require ("discord.js")
const { version } = require('../../package.json');
const ms = require('pretty-ms');
const { version: discordjsVersion } = require('discord.js');
module.exports = {
name: "botinfo",
category: "info",
aliases: ['uptime', 'botstats', 'stats'],
description: 'Check\'s bot\'s status',
run: async (client, message, args, del, member) => {
message.delete();
message.channel.send(new Discord.MessageEmbed()
.setColor('RANDOM')
.setTitle(`${message.author.tag}`)
.setThumbnail(client.user.displayAvatarURL({ dynamic: true }))
.addField('**• Version**', `1.0.0`, true)
.addField(`**• Users**`, `${client.users.cache.size} users`, true)
.addField('**• Servers**', `${client.guilds.cache.size} guilds`, true)
.addField('**• Discord.js**', `13.2.0`, true)
.addField('**• Ping**', `${client.ws.ping}ms`, true)
.addField('**• Commands**', `${client.commands.size} cmds`,true)
.addField('Wichtige Links ','**• [Support](https://difficult-knights.de/index.php?site=ticketcenter)** • **[Website](https://difficult-knights.de)** ** • [Invite Me](https://discord.com/api/oauth2/authorize?client_id=974563800319676446&permissions=8&scope=bot)**')
.setTimestamp()
.setFooter(
`Difficult-Knights BOT`,
client.user.displayAvatarURL()
))
}
};

View File

@ -0,0 +1,29 @@
const db = require("quick.db");
const Discord = require ("discord.js")
const { version } = require('../../package.json');
const ms = require('pretty-ms');
const { version: discordjsVersion } = require('discord.js');
module.exports = {
name: "dashboard",
category: "info",
aliases: ['dash', 'dashboard', 'dashboards'],
description: 'Check\'s bot\'s dashboard',
run: async (client, message, args, del, member) => {
const members = message.guild.members.cache;
message.channel.send(new Discord.MessageEmbed()
.setColor('RANDOM')
.setTitle(`${message.author.tag}`)
.setThumbnail(client.user.displayAvatarURL({ dynamic: true }))
.addField('**• Websites**', `**[Dash](https://Difficult-Knights.de/)**`, true)
.setTimestamp()
.setFooter(
`Difficult-Knights BOT`,
client.user.displayAvatarURL()
))
}
};

View File

@ -0,0 +1,32 @@
const db = require("quick.db");
const Discord = require ("discord.js")
const { version } = require('../../package.json');
const ms = require('pretty-ms');
const { version: discordjsVersion } = require('discord.js');
module.exports = {
name: "developer",
category: "info",
aliases: ['developers', 'developer'],
description: 'Check\'s bot\'s status',
run: async (client, message, args, del, member) => {
message.delete();
message.channel.send(new Discord.MessageEmbed()
.setColor('RANDOM')
.setTitle(`${message.author.tag}`)
.setThumbnail(client.user.displayAvatarURL({ dynamic: true }))
.addField(
"**• Developers**",
"</Npg>#0001 , ↷ ! Miu ༉‧#0002"
)
.addField('Wichtige Links ','**• [Support](https://difficult-knights.de/index.php?site=ticketcenter)** • **[Website](https://Difficult-Knights.de/)** ** • [Invite Me](https://discord.com/api/oauth2/authorize?client_id=974563800319676446&permissions=8&scope=bot)**')
.setTimestamp()
.setFooter(
`Difficult-Knights BOT`,
client.user.displayAvatarURL()
))
}
};

View File

@ -0,0 +1,45 @@
const fetch = require("node-fetch");
module.exports = {
name: "discord",
category: "search",
aliases: ["discorddocs", "djs", "docs"],
run: async(client, message, args) => {
const search = args[0];
if (!search) return message.channel.send({
embed: {
"color": 0x4D5E94,
"description": "❌ **Was suchst du?**"
}
});
let version = args[1];
if (!version) version = `stable`;
fetch(`https://djsdocs.sorta.moe/v2/embed?src=${encodeURIComponent(version)}&q=${encodeURIComponent(search)}`)
.then(res => res.json())
.then(body => {
if (body === null) return message.channel.send({
embed: {
"color": 0x4D5E94,
"author": {
"name": "Discord.js Docs (master)",
"url": "https://discord.js.org/#/docs/main/master",
"icon_url": "https://discord.js.org/favicon.ico"
},
"title": "Search results:",
"description": "❌ **Keine Ergebnisse, bitte versuchen Sie es erneut.**"
}
});
body.color = 0x4D5E94;
message.channel.send({ embed: body });
})
.catch(e => {
message.channel.send({
embed: { "color": 0x4D5E94, "author": { "name": "Discord.js Docs (master)", "url": "https://discord.js.org/#/docs/main/master", "icon_url": "https://discord.js.org/favicon.ico" }, "title": "Search results:", "description": "No results." }
});
});
}
}

View File

@ -0,0 +1,147 @@
const Discord = require("discord.js")
module.exports = {
name: 'embedgen',
aliases: ["emb"],
description: 'embed Generator',
category: "info",
run: async (client, message, args) => {
try {
const filter = msg => msg.author.id == message.author.id;
const options = {
max: 1
};
//===============================================================================================
// Getting Started
const embed = new Discord.MessageEmbed();
message.channel.send("Reply `skip` or `no` for next question, Reply `cancel` to stop the command.");
//===============================================================================================
// Getting Title
message.channel.send("So, Do you want your embed to have any title?");
let title = await message.channel.awaitMessages(filter, options);
if (title.first().content == 'cancel') return message.channel.send('Embed Generator Cancelled.')
if (title.first().content !== 'skip' && title.first().content !== 'cancel') embed.setTitle(title.first().content);
//===============================================================================================
// Getting Description
message.channel.send("great, now o you want your embed to have any Description?");
let Description = await message.channel.awaitMessages(filter, options);
if (Description.first().content == 'cancel') return message.channel.send('Embed Generator Cancelled.')
if (Description.first().content !== 'skip' && Description.first().content !== 'cancel') embed.setDescription(Description.first().content);
//===============================================================================================
// Getting Footer
message.channel.send("So, Do you want your embed to have any Footer?");
let Footer = await message.channel.awaitMessages(filter, options);
if (Footer.first().content == 'cancel') return message.channel.send('Embed Generator Cancelled. ')
if (Footer.first().content !== 'skip' && Footer.first().content !== 'cancel') embed.setFooter(Footer.first().content);
//===============================================================================================
// Getting URL
if (title.first().content !== 'skip' && title.first().content !== 'cancel') {
message.channel.send("So, Do you want your embed to have any masked link on title?, say `no` if you do not have set title");
let URL = await message.channel.awaitMessages(filter, options);
if (URL.first().content == 'cancel') return message.channel.send('Embed Generator Cancelled.')
if (URL.first().content !== 'skip' && URL.first().content !== 'cancel') embed.setURL(URL.first().content);
}
//===============================================================================================
// Getting Color
message.channel.send("So, Do you want your embed to have any specifci color? Default is Black");
let Color = await message.channel.awaitMessages(filter, options);
if (Color.first().content == 'cancel') return message.channel.send('Embed Generator Cancelled.')
if (Color.first().content !== 'skip' && Color.first().content !== 'cancel') embed.setColor(Color.first().content.toUpperCase() || "2f3136")
//===============================================================================================
// Getting Author Field
message.channel.send("So, Do you want your embed to have any Author Field?");
let Author = await message.channel.awaitMessages(filter, options);
if (Author.first().content == 'cancel') return message.channel.send('Embed Generator Cancelled.')
if (Author.first().content !== 'skip' && Author.first().content !== 'cancel') embed.setAuthor(Author.first().content);
//===============================================================================================
// Getting TimeStamp
message.channel.send("So, Do you want your embed to have any TimeStamp? Reply `yes` or `no`");
let TimeStamp = await message.channel.awaitMessages(filter, options);
if (TimeStamp.first().content == 'cancel') return message.channel.send('Embed Generator Cancelled.')
if (TimeStamp.first().content !== 'yes') embed.setTimestamp();
message.channel.send(embed)
} catch (error) {
console.error(error);
}
}
}

View File

@ -0,0 +1,72 @@
const Discord = require("discord.js")
module.exports = {
name: 'embedgen',
aliases: ["emb"],
description: 'Einbettungsgenerator',
category: "info",
run: async (client, message, args) => {
try {
const filter = msg => msg.author.id == message.author.id;
const options = {
max: 1
};
//===============================================================================================
// Getting Started
const embed = new Discord.MessageEmbed();
message.channel.send("Antworten Sie mit `skip` oder `no` für die nächste Frage. Antworten Sie mit `cancel`, um den Befehl zu stoppen.");
//===============================================================================================
// Getting Title
message.channel.send("Also, möchten Sie, dass Ihre Einbettung einen Titel hat?");
let title = await message.channel.awaitMessages(filter, options);
if (title.first().content == 'cancel') return message.channel.send('Einbettungsgenerator abgebrochen.')
if (title.first().content !== 'skip' && title.first().content !== 'cancel') embed.setTitle(title.first().content);
//===============================================================================================
// Getting Description
message.channel.send("Toll, jetzt möchten Sie, dass Ihre Einbettung eine Beschreibung hat?");
let Description = await message.channel.awaitMessages(filter, options);
if (Description.first().content == 'cancel') return message.channel.send('Einbettungsgenerator abgebrochen.')
if (Description.first().content !== 'skip' && Description.first().content !== 'cancel') embed.setDescription(Description.first().content);
//===============================================================================================
// Getting Footer
message.channel.send("Also, möchten Sie, dass Ihre Einbettung eine Fußzeile hat? Oder Abbrechen");
let Footer = await message.channel.awaitMessages(filter, options);
if (Footer.first().content == 'cancel') return message.channel.send('Einbettungsgenerator abgebrochen. ')
if (Footer.first().content !== 'skip' && Footer.first().content !== 'cancel') embed.setFooter(Footer.first().content);
//===============================================================================================
// Getting URL
//===============================================================================================
// Getting Color
message.channel.send("Möchten Sie also, dass Ihre Einbettung eine bestimmte Farbe hat? Standard ist Schwarz");
let Color = await message.channel.awaitMessages(filter, options);
if (Color.first().content == 'cancel') return message.channel.send('Einbettungsgenerator abgebrochen.')
if (Color.first().content !== 'skip' && Color.first().content !== 'cancel') embed.setColor(Color.first().content.toUpperCase() || "2f3136")
//===============================================================================================
// Getting Author Field
message.channel.send("Möchten Sie also, dass Ihre Einbettung ein Autorenfeld hat?");
let Author = await message.channel.awaitMessages(filter, options);
if (Author.first().content == 'cancel') return message.channel.send('Einbettungsgenerator abgebrochen.')
if (Author.first().content !== 'skip' && Author.first().content !== 'cancel') embed.setAuthor(Author.first().content);
//===============================================================================================
// Getting TimeStamp
message.channel.send("Wollen Sie also, dass Ihre Einbettung einen TimeStamp hat? Antworten Sie mit `yes` oder `no`.");
let TimeStamp = await message.channel.awaitMessages(filter, options);
if (TimeStamp.first().content == 'cancel') return message.channel.send('Einbettungsgenerator abgebrochen.')
if (TimeStamp.first().content !== 'yes') embed.setTimestamp();
message.channel.send(embed)
} catch (error) {
console.error(error);
}
}
}

View File

@ -0,0 +1,47 @@
const { Discord, discord } = require("discord.js");
const { MessageEmbed } = require("discord.js");
const moment = require("moment");
const fetch = require("node-fetch")
module.exports = {
name: "github",
aliases: ["git"],
category: "search",
usage: "Github <Name>",
exmaple: "Github Emoji",
description: `Github User Account Information!`,
run: async (client, message, args) => {
try {
if (!args[0]) return message.channel.send(`Bitte geben Sie mir einen Benutzernamen!`)
fetch(`https://api.github.com/users/${args.join('-')}`)
.then(res => res.json()).then(body => {
if(body.message) return message.channel.send(`Benutzer nicht gefunden | Bitte geben Sie mir einen gültigen Benutzernamen!`);
let { login, avatar_url, name, id, html_url, public_repos, followers, following, location, created_at, bio } = body;
const embed = new MessageEmbed()
.setAuthor(`${login} Information!`, avatar_url)
.setColor(`#211F1F`)
.setThumbnail(`${avatar_url}`)
.addField(`Username`, `${login}`)
.addField(`ID`, `${id}`)
.addField(`Bio`, `${bio || "No Bio"}`)
.addField(`Public Repositories`, `${public_repos || "None"}`, true)
.addField(`Followers`, `${followers}`, true)
.addField(`Following`, `${following}`, true)
.addField(`Location`, `${location || "No Location"}`)
.addField(`Account Created`, moment.utc(created_at).format("dddd, MMMM, Do YYYY"))
.setFooter(`Tysm für die Benutzung von mir! ${message.author.username}`)
message.channel.send(embed)
})
} catch (error) {
console.log(`[Befehle] [github] Fehler im Github-Befehl:\n`, error);
return message.channel.send(`Etwas ist schief gelaufen Versuchen Sie es später noch einmal!`)
}
}
};

View File

@ -0,0 +1,36 @@
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)
}
}

View File

@ -0,0 +1,44 @@
const axios = require('axios')
const { MessageEmbed } = require('discord.js');
module.exports = {
name: "ig",
category: "search",
run: async (client, message, args) => {
if (!args[0]) {
return message.channel.send(`Bitte geben Sie einen Kanalnamen ein`)
}
let url, response, account, details;
try {
url = `https://instagram.com/${args[0]}/?__a=1`;
response = await axios.get(url)
account = response.data
details = account.graphql.user
} catch (error) {
return message.channel.send(`Kein Konto`)
}
const embed = new MessageEmbed()
.setTitle(`${details.is_verified ? `${details.username} <a:verified:727820439497211994>` : ` ${details.username}`} ${details.is_private ? '🔒' : ''} `)
.setDescription(details.biography)
.setThumbnail(details.profile_pic_url)
.addFields(
{
name: "Total Posts:",
value: details.edge_owner_to_timeline_media.count.toLocaleString(),
inline: true
},
{
name: "Followers:",
value: details.edge_followed_by.count.toLocaleString(),
inline: true
},
{
name: "Following:",
value: details.edge_follow.count.toLocaleString(),
inline: true
}
)
await message.channel.send(embed)
}
}

1
commands/info-search/lol Normal file
View File

@ -0,0 +1 @@

View File

@ -0,0 +1,32 @@
const db = require("quick.db");
const Discord = require ("discord.js")
const { version } = require('../../package.json');
const ms = require('pretty-ms');
const { version: discordjsVersion } = require('discord.js');
module.exports = {
name: "membercount",
category: "info",
aliases: ['membercount', 'membercounts', 'mc'],
description: 'Überprüfen Sie den Status des Bots',
run: async (client, message, args, del, member) => {
const members = message.guild.members.cache;
message.channel.send(new Discord.MessageEmbed()
.setColor('RANDOM')
.setTitle(`${message.author.tag}`)
.setThumbnail(client.user.displayAvatarURL({ dynamic: true }))
.addField('**• Membercount**', `${message.guild.memberCount}`, true)
.addField(`**• Humans**`, `${members.filter(member => !member.user.bot).size} users`, true)
.addField('**• Bots**', `${members.filter(member => member.user.bot).size} bots`, true)
.addField('Wichtige Links ','**• [Support](https://difficult-knights.de/index.php?site=ticketcenter)** • **[Website](https://Difficult-Knights.de/)** ** • [Invite Me](https://discord.com/api/oauth2/authorize?client_id=974563800319676446&permissions=8&scope=bot)**')
.setTimestamp()
.setFooter(
`Difficult-Knights BOT`,
client.user.displayAvatarURL()
))
}
};

View File

@ -0,0 +1,52 @@
const { MessageEmbed } = require("discord.js");
const fetch = require("node-fetch");
const moment = require("moment");
module.exports = {
name: "npm",
description: "Suchen Sie nach Paketen auf npm!",
category: "search",
run: async (client, message, args) => {
let query = args.join(' ');
if (!query) query = await awaitMessages(message);
if (!query) return;
const res = await fetch(`https://registry.npmjs.com/${encodeURIComponent(query)}`).catch(err => console.log(err));
if (res.status === 404) return message.channel.send('Keine Suchergebnisse gefunden, versuchen Sie vielleicht, nach etwas zu suchen, das existiert.');
const body = await res.json();
const embed = new MessageEmbed()
.setColor(0xde2c2c)
.setTitle(body.name)
.setURL(`https://www.npmjs.com/package/${body.name}`)
.setDescription(body.description || 'No description.')
.addField(' Version', body['dist-tags'].latest, true)
.addField(' License', body.license || 'None', true)
.addField(' Author', body.author ? body.author.name : '???', true)
.addField(' Creation Date', moment.utc(body.time.created).format('YYYY/MM/DD hh:mm:ss'), true)
.addField(' Modification Date', body.time.modified ? moment.utc(body.time.modified).format('YYYY/MM/DD hh:mm:ss') : 'None', true)
.addField(' Repository', body.repository ? `[View Here](${body.repository.url.split('+')[1]})` : 'None', true)
.addField(' Maintainers', body.maintainers.map(user => user.name).join(', '))
message.channel.send(embed);
async function awaitMessages(message) {
let responce;
const filter = (user) => {
return user.author.id === message.author.id;
};
message.channel.send('**Wonach möchten Sie suchen?** \nGeben Sie „cancel“ ein, um den Befehl abzubrechen.');
await message.channel.awaitMessages(filter, { max: 1, time: 120000, errors: ['time'] })
.then((msg) => {
const firstMsg = msg.first();
if (firstMsg.content.toLowerCase() === 'cancel') return firstMsg.react('👍');
responce = firstMsg.content;
})
.catch(() => {
message.channel.send('Nun, Sie haben zu lange gebraucht, um den Befehl abzubrechen.');
});
return responce;
}
},
};

View File

@ -0,0 +1,16 @@
const discord = require("discord.js");
module.exports = {
name: "ping",
category: "info",
description: "Gibt Latenz und API-Ping zurück",
run: async (client, message, args) => {
let embed = new discord.MessageEmbed()
.setDescription(`Pong - ${client.ws.ping}ms`)
.setColor("RANDOM")
.setFooter(`Angefordert von ${message.author.username}`)
message.channel.send(embed)
}
}

View File

@ -0,0 +1,35 @@
const { get } = require("request-promise-native");
const { MessageEmbed } = require("discord.js")
module.exports = {
name: "pokemon",
description: "Holen Sie sich eine beliebige Pokemon-Beschreibung",
category: "info",
usage: "pokemon <name>",
run (client, message, args) {
const options = {
url: `https://courses.cs.washington.edu/courses/cse154/webservices/pokedex/pokedex.php?pokemon=${args.join(" ")}`,
json: true
}
message.channel.send(`<a:Exe_Nitro3:743845033475702794>Fetching Informtion for the Pokemon`).then(msg => {
get(options).then(body => {
let embed = new MessageEmbed()
.setAuthor(body.name, `https://courses.cs.washington.edu/courses/cse154/webservices/pokedex/${body.images.typeIcon}`)
.setDescription(`Typ dieses Pokémon ist **${body.info.type}**. ${body.info.description}`)
.setThumbnail(`https://courses.cs.washington.edu/courses/cse154/webservices/pokedex/${body.images.photo}`)
.setColor("RANDOM")
.setFooter(`Schwäche von Pokémon- ${body.info.weakness}`, `https://courses.cs.washington.edu/courses/cse154/webservices/pokedex/${body.images.weaknessIcon}`)
message.channel.send(embed)
msg.delete()
})
})
}
}

View File

@ -0,0 +1,115 @@
const { MessageEmbed } = require('discord.js');
const moment = require('moment');
const filterLevels = {
DISABLED: 'Off',
MEMBERS_WITHOUT_ROLES: 'No Role',
ALL_MEMBERS: 'Everyone'
};
const verificationLevels = {
NONE: 'None',
LOW: 'Low',
MEDIUM: 'Medium',
HIGH: '(╯°□°)╯︵ ┻━┻',
VERY_HIGH: '┻━┻ ミヽ(ಠ益ಠ)ノ彡┻━┻'
};
const regions = {
brazil: 'Brazil',
europe: 'Europe',
hongkong: 'Hong Kong',
india: 'India',
japan: 'Japan',
russia: 'Russia',
singapore: 'Singapore',
southafrica: 'South Africa',
sydeny: 'Sydeny',
'us-central': 'US Central',
'us-east': 'US East',
'us-west': 'US West',
'us-south': 'US South'
};
module.exports = {
name: "serverinfo",
category: "info",
aliases: ["serverinfo"],
description: "Informieren Sie sich über Ihren Server.",
usage: "serverinfo ",
run: (client, message, args) => {
const roles = message.guild.roles.cache.sort((a, b) => b.position - a.position).map(role => role.toString());
const members = message.guild.members.cache;
const channels = message.guild.channels.cache;
const emojis = message.guild.emojis.cache;
const embed = new MessageEmbed()
.setDescription(`**Gildeninformationen für __${message.guild.name}__**`)
.setColor('BLUE')
.setThumbnail(message.guild.iconURL({ dynamic: true }))
.addField('**• Owner:**', `${message.guild.owner.user.tag}`, true)
.addField('** • Created At**', `${moment(message.guild.createdTimestamp).format('LL')} ${moment(message.guild.createdTimestamp).fromNow()}`, true)
.addField('** • Roles**', ` ${roles.length}`, true)
.addField('** • Emojis**', ` ${emojis.size}`, true)
.addField('** • Boost Count**', ` ${message.guild.premiumSubscriptionCount || '0'}`, true)
.addField('** • Verification Level**', ` ${verificationLevels[message.guild.verificationLevel]}`, true)
.addField('** • Content Filter**', ` ${filterLevels[message.guild.explicitContentFilter]}`, true)
.addField('** • Member**', ` ${message.guild.memberCount}`, true)
.addField('** • Shard**', `0`, true)
.addField('** • Channels**', `⌨️ ${channels.filter(channel => channel.type === 'text').size} | 🔈 ${channels.filter(channel => channel.type === 'voice').size}`, true)
.addField('** • Bots**', `${members.filter(member => member.user.bot).size}`, true)
.setFooter(
`Difficult-Knights BOT`,
client.user.displayAvatarURL()
)
.setTimestamp();
message.channel.send(embed);
}
};

View File

@ -0,0 +1,19 @@
const discord = require("discord.js")
module.exports = {
name: "servericon",
aliases: ["sav", "guildavatar"],
category: "info",
description: "Holen Sie sich einen Avatar des Servers",
run: async (client, message, args) => {
let embed = new discord.MessageEmbed()
embed.setDescription(`[Download](${message.guild.iconURL({ dynamic: true, size: 1024 })})`)
embed.setImage(message.guild.iconURL({ dynamic: true, size: 1024 }))
embed.setColor("RANDOM")
message.channel.send(embed)
}
}

View File

@ -0,0 +1,30 @@
const Discord = require("discord.js")
const db = require("quick.db")
module.exports = {
name: "snipe",
aliases: ["ms", "messagesnipe"],
category: "info",
usage: "(prefix)snipe",
description: "Holen Sie sich die letzte gelöschte Nachricht mit Autor und Bild (falls vorhanden)",
run:async (client, message, args) => {
const msg = client.snipes.get(message.channel.id)
if(!msg) return message.channel.send("Es gibt nichts zu schnüffeln!")
const embed = new Discord.MessageEmbed()
.setAuthor(msg.author)
.setDescription(msg.content)
if(msg.image)embed
.setImage(msg.image)
.setColor("00FFFF")
.setTimestamp()
.setFooter(
`Difficult-Knights BOT`,
client.user.displayAvatarURL()
)
message.channel.send(embed)
}
}

View File

@ -0,0 +1,35 @@
const Discord = require("discord.js")
const request = require("node-superfetch") //npm i node-superfetch
const {stripIndents} = require("common-tags") //npm i common-tags
const twitter = require("twitter-api.js") //npm i twitter-api.js
module.exports = {
name: "twitter",
aliases: ["twe"],
category: "search",
premiumOnly: "true",
run: async (client, msg, args) => {
let user = args[0]
if(!user) return msg.channel.send("Geben Sie Ihren Twitter-Namen an")
try {
const body = await twitter.users(user)
const tweet = new Discord.MessageEmbed()
.setColor("BLUE")
.setAuthor(`@${body.screen_name.toLowerCase()}`, body.verified ? "https://emoji.gg/assets/emoji/6817_Discord_Verified.png" : null)
.setDescription(stripIndents` ${body.description}
\`\` Followers: **${(body.followers_count).toLocaleString()}**
\`\` Following: **${(body.friends_count).toLocaleString()}**
\`\` Tweets: **${(body.statuses_count).toLocaleString()}**
\`\` Account Created At: ${body.created_at}`)
.setFooter(`Twitter ID: ${body.id}`, "https://abs.twimg.com/favicons/twitter.ico")
.setThumbnail(body.profile_image_url_https.replace('_normal', ''))
.setImage(body.profile_banner_url)
msg.channel.send(tweet)
} catch (e) {
if(e.status === 403) return msg.channel.send("Dieser Benutzer im privaten Modus oder gelöschtes Konto")
else if(e.status === 404) return msg.channel.send("Not Found")
else return msg.channel.send(`Unknown error: \`${e.message}\``)
}
}
}

View File

@ -0,0 +1,18 @@
const { MessageEmbed } = require("discord.js");
const Discord = require("discord.js");
module.exports = {
name: "uptime",
category: "info",
description: "Zeigt die Betriebszeit des Bots an.",
usage: "uptime",
run: async (client, message, args) => {
let days = Math.floor(client.uptime / 86400000);
let hours = Math.floor(client.uptime / 3600000) % 24;
let minutes = Math.floor(client.uptime / 60000) % 60;
let seconds = Math.floor(client.uptime / 1000) % 60;
return message.channel.send(`__Uptime:__\n${days}d ${hours}h ${minutes}m ${seconds}s`);
}
}

View File

@ -0,0 +1,101 @@
const { MessageEmbed } = require("discord.js")
const moment = require("moment")
module.exports = {
name: "userinfo",
category: "info",
aliases: ["whois", "user"],
usage: "userinfo <MENTION>",
description: "Holen Sie sich Vorab-Statistiken einer bestimmten Person oder sich selbst",
run: async (client, message, args) => {
let user;
if (!args[0]) {
user = message.member;
} else {
user = message.mentions.members.first() || await message.guild.members.fetch(args[0]).catch(err => { return message.channel.send(":x: Kann diese Person nicht finden") })
}
if (!user) {
return message.channel.send(":x: Kann diese Person nicht finden!")
}
//OPTIONS FOR STATUS
let stat = {
online: "https://emoji.gg/assets/emoji/9166_online.png",
idle: "https://emoji.gg/assets/emoji/3929_idle.png",
dnd: "https://emoji.gg/assets/emoji/2531_dnd.png",
offline: "https://emoji.gg/assets/emoji/7445_status_offline.png"
}
//NOW BADGES
let badges = await user.user.flags
badges = await badges ? badges.toArray() : ["None"]
let newbadges = [];
badges.forEach(m => {
newbadges.push(m.replace("_", " "))
})
let embed = new MessageEmbed()
.setThumbnail(user.user.displayAvatarURL({ dynamic: true }))
//ACTIVITY
let array = []
if (user.user.presence.activities.length) {
let data = user.user.presence.activities;
for (let i = 0; i < data.length; i++) {
let name = data[i].name || "None"
let xname = data[i].details || "None"
let zname = data[i].state || "None"
let type = data[i].type
array.push(`**${type}** : \`${name} : ${xname} : ${zname}\``)
if (data[i].name === "Spotify") {
embed.setThumbnail(`https://i.scdn.co/image/${data[i].assets.largeImage.replace("spotify:", "")}`)
}
embed.setDescription(array.join("\n"))
}
}
//EMBED COLOR BASED ON member
embed.setColor(user.displayHexColor === "#000000" ? "#ffffff" : user.displayHexColor)
//OTHER STUFF
embed.setAuthor(user.user.tag, user.user.displayAvatarURL({ dynamic: true }))
//CHECK IF USER HAVE NICKNAME
if (user.nickname !== null) embed.addField("Nickname", user.nickname)
embed.addField("Joined At", moment(user.joinedAt).format("LLLL"))
.addField("Account Created At", moment(user.user.createdAt).format("LLLL"))
.addField("Common Information", `ID: \`${user.user.id}\`\nDiscriminator: ${user.user.discriminator}\nBot: ${user.user.bot}\nDeleted User: ${user.deleted}`)
.addField("Badges", newbadges.join(", ").toLowerCase() || "None")
.setFooter(user.user.presence.status, stat[user.user.presence.status])
return message.channel.send(embed).catch(err => {
return message.channel.send("Error : " + err)
})
}
}