mirror of
https://github.com/ION606/selmerBot.git
synced 2026-05-14 21:26:54 +00:00
Changed the layout of the econ system (removed two files that weren't needed) and added the anime/manga section
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
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);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,12 @@
|
||||
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,4 +1,3 @@
|
||||
const { db } = require('./guild');
|
||||
const { MongoClient, ServerApiVersion } = require('mongodb');
|
||||
// const { update } = require('apt');
|
||||
const { Collection, Client, Formatters, Intents } = require('discord.js');
|
||||
@@ -1,11 +0,0 @@
|
||||
const { Schema, model } = require('mongoose');
|
||||
|
||||
const Guild = Schema({
|
||||
id: String,
|
||||
prefix: {
|
||||
default: '?',
|
||||
type: String
|
||||
}
|
||||
});
|
||||
|
||||
module.exports = model('Guild', Guild);
|
||||
@@ -1,8 +0,0 @@
|
||||
module.exports = {
|
||||
name: 'Init',
|
||||
async execute(bot, message, args, command, GuildModel, Discord, connect) {
|
||||
if (!message.guild) { return console.log("NO GUILD"); }
|
||||
const doc = new GuildModel( {id: message.guild.id });
|
||||
await doc.save();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user