mirror of
https://github.com/ION606/selmerBot.git
synced 2026-05-14 21:26:54 +00:00
Chenged the command get format (removed the switch statement) and added the react command
This commit is contained in:
+2
-2
@@ -1,7 +1,7 @@
|
||||
module.exports = {
|
||||
name: 'EC',
|
||||
name: 'extracredit',
|
||||
description: "Selmer Bot Dm's you for some *AHEM* extra credit",
|
||||
execute(message) {
|
||||
execute(message, args, Discord, Client, bot) {
|
||||
let dm;
|
||||
let num = Math.floor(Math.random() * 10);
|
||||
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
const scraper = require('mal-scraper');
|
||||
module.exports = {
|
||||
name: 'search',
|
||||
description: 'Selmer bot gives you either an explanation or a list of stats',
|
||||
async execute() {
|
||||
scraper.getInfoFromName('Fullmetal Alchemist').then((data) => {
|
||||
//If the user didn't specify, give a stat list
|
||||
if (args.length < 1) {
|
||||
let s = `Title: ${s.title}\n`;
|
||||
s += ``
|
||||
} else if (args[0] != 'full') {
|
||||
|
||||
} else {
|
||||
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
@@ -1,24 +0,0 @@
|
||||
module.exports = {
|
||||
name: 'top_anime',
|
||||
description: 'Get the top anime of all time (according to MyAnimeList)',
|
||||
execute(message, args) {
|
||||
const axios = require('axios');
|
||||
const cheerio = require('cheerio')
|
||||
//Genre list area (not set up yet)
|
||||
if (args.length != 0) {
|
||||
return;
|
||||
}
|
||||
const url = "https://myanimelist.net/topanime.php?type=bypopularity";
|
||||
axios(url)
|
||||
.then(response => {
|
||||
const html = response.data;
|
||||
const $ = cheerio.load(html);
|
||||
data = $('.top-ranking-table').text();
|
||||
breakbar = "---------------------------------------------";
|
||||
|
||||
// message.channel.send(breakbar + "\n" + lyrics + "\n" + breakbar);
|
||||
console.log(data);
|
||||
})
|
||||
.catch(console.error);
|
||||
}
|
||||
}
|
||||
@@ -1,12 +0,0 @@
|
||||
const { top } = require('./all_time_top_anime');
|
||||
|
||||
module.exports = {
|
||||
name: 'anime',
|
||||
description: 'a-anime....',
|
||||
execute(command, message, args, bot) {
|
||||
switch(command) {
|
||||
case 'topanime': top.execute(message, args);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
module.exports = {
|
||||
name: 'arrow',
|
||||
description: 'Engage in a trademarked activity and throw an arrow at a trash can',
|
||||
async execute(message, args) {
|
||||
async execute(message, args, Discord, Client, bot) {
|
||||
let counter = 0;
|
||||
arrow = '>';
|
||||
while (true) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
module.exports ={
|
||||
name: "help",
|
||||
description: "Gets help for all of Selmer Bot's commands",
|
||||
execute(message, Client) {
|
||||
execute(message, args, Discord, Client, bot) {
|
||||
const newEmbed = new Discord.MessageEmbed()
|
||||
.setColor('#002eff')
|
||||
.setTitle('My professional resume')
|
||||
|
||||
@@ -262,6 +262,4 @@ module.exports = {
|
||||
//Close the database
|
||||
client.close();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -1,7 +1,7 @@
|
||||
module.exports = {
|
||||
name: "Hello World",
|
||||
name: "test",
|
||||
description: "HI SELMER",
|
||||
execute(message, args) {
|
||||
execute(message, args, Discord, Client, bot) {
|
||||
message.channel.send("HI SELMER!!!");
|
||||
}
|
||||
}
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
module.exports ={
|
||||
name: 'kareoke',
|
||||
description: 'Sing your least-favorite song with your favorite person, me!',
|
||||
execute(message, args) {
|
||||
execute(message, args, Discord, Client, bot) {
|
||||
const axios = require('axios');
|
||||
const cheerio = require('cheerio')
|
||||
const url = args[0];
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
module.exports = {
|
||||
name: "links",
|
||||
description: "A helpful list of links to all of Selmer's wonderful websites",
|
||||
execute(message, args, Discord) {
|
||||
execute(message, args, Discord, Client, bot) {
|
||||
const newEmbed = new Discord.MessageEmbed()
|
||||
.setColor('#002eff')
|
||||
.setTitle("Selmer's Links")
|
||||
|
||||
@@ -12,8 +12,8 @@ const player = createAudioPlayer();
|
||||
|
||||
|
||||
module.exports = {
|
||||
name: "playaudio",
|
||||
async execute(message, args, bot) {
|
||||
name: "audio",
|
||||
async execute(message, args, Discord, Client, bot) {
|
||||
// message.channel.send("This command has not been set up yet\nSorry!");
|
||||
// return;
|
||||
if (args[0] == "play") {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
module.exports = {
|
||||
name: "profile",
|
||||
description: "Posts a description of Monsieur Sleemer himself",
|
||||
execute(message, args, Discord) {
|
||||
execute(message, args, Discord, Client, bot) {
|
||||
const newEmbed = new Discord.MessageEmbed()
|
||||
.setColor('#002eff')
|
||||
.setTitle('My professional resume')
|
||||
|
||||
+1
-1
@@ -1,7 +1,7 @@
|
||||
module.exports = {
|
||||
name: 'quotes',
|
||||
description: "A public version of Extra Credit",
|
||||
execute(message) {
|
||||
execute(message, args, Discord, Client, bot) {
|
||||
let dm;
|
||||
let num = Math.floor(Math.random() * 10);
|
||||
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
module.exports = {
|
||||
name: 'r',
|
||||
description: "Reacts with a phrase or single emoji",
|
||||
async execute(message, args, Discord, Client, bot) {
|
||||
|
||||
// if (!message.reference) { return; }
|
||||
let msg;
|
||||
if (message.reference) {
|
||||
msg = await message.channel.messages.fetch(message.reference.messageId);
|
||||
} else { msg = message; }
|
||||
|
||||
for (let i = 0; i < args.length; i ++) {
|
||||
try {
|
||||
await msg.react(args[i]);
|
||||
} catch(err) {
|
||||
//The emoji wasn't a valid one
|
||||
message.reply("Please enter a valid emoji");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -1,9 +1,9 @@
|
||||
const hastebin = require("hastebin-gen");
|
||||
|
||||
module.exports ={
|
||||
name: "scraper",
|
||||
name: "scrape",
|
||||
description: ".....",
|
||||
async execute(message, args) {
|
||||
async execute(message, args, Discord, Client, bot) {
|
||||
const axios = require('axios');
|
||||
const cheerio = require('cheerio')
|
||||
const url = args[0];
|
||||
|
||||
Reference in New Issue
Block a user