Skip to content

Commit

Permalink
Add files via upload
Browse files Browse the repository at this point in the history
  • Loading branch information
Max2408 authored Feb 26, 2021
1 parent 624d53d commit 82b525a
Show file tree
Hide file tree
Showing 25 changed files with 318 additions and 62 deletions.
20 changes: 9 additions & 11 deletions commands/Fun Commands/chunk.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,8 @@
const Chuck = require('chucknorris-io'),
chunk = new Chuck();
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const discord_akairo_1 = require("discord-akairo");
const Discord = require('discord.js')
const meme = require('random-jokes-api');
class PrequelCommand extends discord_akairo_1.Command {
constructor() {
super('chucknorris', {
Expand All @@ -20,15 +19,14 @@ class PrequelCommand extends discord_akairo_1.Command {
});
}
async exec(message , args) {
chunk.getRandomJoke().then(function (response) {
let embed = new Discord.MessageEmbed()
.setTitle('👊Chuck Norris👊')
.setColor('RANDOM')
.setDescription(response.value)
message.channel.send(embed)
}).catch(function (err) {
console.log(err)
});

let chunk = meme.chuckNorris()

let embed = new Discord.MessageEmbed()
.setTitle('👊Chuck Norris👊')
.setColor('RANDOM')
.setDescription(chunk)
message.channel.send(embed)
}
}
exports.default = PrequelCommand;
76 changes: 38 additions & 38 deletions commands/Fun Commands/coinflip.js
Original file line number Diff line number Diff line change
@@ -1,39 +1,39 @@
"use strict";

Object.defineProperty(exports, "__esModule", { value: true });

const discord_akairo_1 = require("discord-akairo");
const { MessageEmbed } = require("discord.js");
const Discord = require('discord.js')

class coinFlipCommand extends discord_akairo_1.Command {
constructor() {
super('coinflip', {
aliases: ['coinflip', 'coin', 'roll', 'flip', 'headsortails'],
category: 'Fun Commands',
description: {
content: 'Coinflip, return head or tails to the use',
usage: 'coinflip',
examples: [
'coinflip'
]
},
ratelimit: 3
});
}
async exec(message , args) {

let coinArray = [
'heads',
'tails'
]

let answer = Math.floor(Math.random() * coinArray.length);

let Embed = new MessageEmbed()
.setColor('RANDOM')
.setDescription(`I flipped a coin and it landed on **${coinArray[answer]}**`)
await message.channel.send(Embed)
}
}
"use strict";

Object.defineProperty(exports, "__esModule", { value: true });

const discord_akairo_1 = require("discord-akairo");
const { MessageEmbed } = require("discord.js");
const Discord = require('discord.js')

class coinFlipCommand extends discord_akairo_1.Command {
constructor() {
super('coinflip', {
aliases: ['coinflip', 'coin', 'roll', 'flip', 'headsortails'],
category: 'Fun Commands',
description: {
content: 'Coinflip, return head or tails to the use',
usage: 'coinflip',
examples: [
'coinflip'
]
},
ratelimit: 3
});
}
async exec(message , args) {

let coinArray = [
'heads',
'tails'
]

let answer = Math.floor(Math.random() * coinArray.length);

let Embed = new MessageEmbed()
.setColor('RANDOM')
.setDescription(`I flipped a coin and it landed on **${coinArray[answer]}**`)
await message.channel.send(Embed)
}
}
exports.default = coinFlipCommand;
29 changes: 29 additions & 0 deletions commands/Fun Commands/compliment.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const discord_akairo_1 = require("discord-akairo");
const Discord = require('discord.js')

const meme = require('random-jokes-api')

class RoastCommand extends discord_akairo_1.Command {
constructor() {
super('compliment', {
aliases: ['compliment'],
category: 'Fun Commands',
description: {
content: 'Get complimented by Max Bot.',
usage: 'compliment',
examples: [
'compliment'
]
},
ratelimit: 10
});
}
async exec(message , args) {

let com = meme.copmliment()
message.channel.send(`<@${message.author.id}> ${com}`)
}
}
exports.default = RoastCommand;
36 changes: 36 additions & 0 deletions commands/Fun Commands/dare.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const discord_akairo_1 = require("discord-akairo");
const Discord = require('discord.js')
const meme = require('random-jokes-api')
class MemeCommand extends discord_akairo_1.Command {
constructor() {
super('dare', {
aliases: ['dare'],
category: 'Fun Commands',
description: {
content: 'Generate dares from public API',
usage: 'dare',
examples: [
'dare'
]
},
ratelimit: 3
});
}
async exec(message , args) {
let dare = meme.dare()

const memberName = message.mentions.users.first()
? message.mentions.users.first().username
: message.author.username

let embed = new Discord.MessageEmbed()
.setTitle(`${message.author.username} dared ${memberName}`)
.setColor('RANDOM')
.setDescription(dare)

message.channel.send(embed)
}
}
exports.default = MemeCommand;
1 change: 0 additions & 1 deletion commands/Fun Commands/say.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
Object.defineProperty(exports, "__esModule", { value: true });
const discord_akairo_1 = require("discord-akairo");
const Discord = require('discord.js')
const fetch = require('node-fetch')
class MemeCommand extends discord_akairo_1.Command {
constructor() {
super('say', {
Expand Down
49 changes: 49 additions & 0 deletions commands/Fun Commands/trivia.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const discord_akairo_1 = require("discord-akairo");
const Discord = require('discord.js')
const meme = require("random-jokes-api")
class TriviaCommand extends discord_akairo_1.Command {
constructor() {
super('trivia', {
aliases: ['trivia'],
category: 'Fun Commands',
description: {
content: 'Test Your Knowledge by A Quiz',
usage: 'trivia',
examples: [
'trivia'
]
},
ratelimit: 10
});
}
async exec(message , args) {

let i = 0

let trivia = meme.trivia();

const Embed = new Discord.MessageEmbed()
.setTitle(trivia.question)
.setDescription(trivia.options.map(opt=>{
i++;
return `${i} - ${opt}\n`
}))
.setColor('RANDOM')
.setFooter(`Category: ${trivia.category} | Difficulty : ${trivia.difficulty}`)
message.channel.send(Embed)
try{
let msgs = await message.channel.awaitMessages(u2=>u2.author.id===message.author.id,{ time: 15000, max: 1, errors: ["time"] })
if(parseInt(msgs.first().content)==trivia.correct_option){
return message.channel.send('Bingo! You got it correct!')
}else{
return message.channel.send(`Oh No! Incorrect Answer. Write Answer Was ` + '`' +`${trivia.answer}`+ '`')
}
}catch(e){
console.log(e)
return message.channel.send("Time's Up. Try Again")
}
}
}
exports.default = TriviaCommand;
36 changes: 36 additions & 0 deletions commands/Fun Commands/truth.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const discord_akairo_1 = require("discord-akairo");
const Discord = require('discord.js')
const meme = require('random-jokes-api')
class MemeCommand extends discord_akairo_1.Command {
constructor() {
super('truth', {
aliases: ['truth'],
category: 'Fun Commands',
description: {
content: 'Generate truths from public API',
usage: 'truth',
examples: [
'truth'
]
},
ratelimit: 3
});
}
async exec(message , args) {
let truth = meme.truth()

const memberName = message.mentions.users.first()
? message.mentions.users.first().username
: message.author.username

let embed = new Discord.MessageEmbed()
.setTitle(`${message.author.username} asked ${memberName}`)
.setColor('RANDOM')
.setDescription(truth)

message.channel.send(embed)
}
}
exports.default = MemeCommand;
8 changes: 4 additions & 4 deletions commands/Image Commands/achievement.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
const discord_akairo_1 = require("discord-akairo");
const Discord = require('discord.js')
const Canvas = require('canvas')
let jokes = require('../../logo_ran').jokes;
let jokes = require('../../Assets/logo_ran').jokes;
class ripCommand extends discord_akairo_1.Command {
constructor() {
super('achievement', {
Expand All @@ -20,20 +20,20 @@ class ripCommand extends discord_akairo_1.Command {
});
}
async exec(message , args) {
Canvas.registerFont("./font/MineC.otf", { family: "minecraft" })
Canvas.registerFont("./Assets/font/MineC.otf", { family: "minecraft" })

const achievementText = message.content.slice(13)
if(!achievementText) return message.channel.send('What achievement do you want lol')

const canvas = Canvas.createCanvas(802 , 188);
const ctx = canvas.getContext('2d')

const b = await Canvas.loadImage('./Images/ac.png')
const b = await Canvas.loadImage('./Assets/Images/ac.png')
ctx.drawImage(b, 0, 0 ,canvas.width , canvas.height);

let q = jokes[Math.floor(Math.random() * jokes.length)]

const l = await Canvas.loadImage(`./Images/Minecraft/${q.title}.png`)
const l = await Canvas.loadImage(`./Assets/Images/Minecraft/${q.title}.png`)
ctx.drawImage(l, 45, 57 , 75 , 75);

ctx.font = '40px "minecraft"'
Expand Down
50 changes: 50 additions & 0 deletions commands/Image Commands/banner.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const discord_akairo_1 = require("discord-akairo");
const { MessageEmbed } = require("discord.js");
const Discord = require('discord.js')
const Canvas = require('canvas')
class ripCommand extends discord_akairo_1.Command {
constructor() {
super('banner', {
aliases: ['banner'],
category: 'Image Commands',
description: {
content: 'Generate a banner image of some user.',
usage: 'banner <User>',
examples: [
'banner @user'
]
},
ratelimit: 10
});
}
async exec(message , args) {
const memberLogo = message.mentions.users.first()
? message.mentions.users.first().displayAvatarURL({ format: 'jpg' })
: message.author.displayAvatarURL({ format: 'png' })

const canvas = Canvas.createCanvas(489 , 481);
const ctx = canvas.getContext('2d')

const background = await Canvas.loadImage('./Assets/Images/banner.png')
ctx.drawImage(background, 0, 0 ,canvas.width , canvas.height);

ctx.strokeStyle = '#740';
ctx.strokeRect(0, 0, canvas.width, canvas.height);

const avatar1 = await Canvas.loadImage(memberLogo);
ctx.rotate(-8 * Math.PI / 180);
ctx.drawImage(avatar1 , 5 , 284, 110, 110);

const avatar2 = await Canvas.loadImage(memberLogo);
ctx.drawImage(avatar2 , 440 , 105 , 110, 110);

const avatar3 = await Canvas.loadImage(memberLogo);
ctx.drawImage(avatar3 , 305 , 305 , 110, 110);

const attachment = new Discord.MessageAttachment(canvas.toBuffer(), 'welcome-image.png');
message.channel.send(attachment)
}
}
exports.default = ripCommand;
5 changes: 3 additions & 2 deletions commands/Image Commands/delete.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@
Object.defineProperty(exports, "__esModule", { value: true });
const discord_akairo_1 = require("discord-akairo");
const Discord = require('discord.js')
const DIG = require("discord-image-generation");

const Dig = require("discord-memer")
class ripCommand extends discord_akairo_1.Command {
constructor() {
super('delete', {
Expand All @@ -25,7 +26,7 @@ class ripCommand extends discord_akairo_1.Command {
: message.author.displayAvatarURL({ format: 'png' , size: 2048 })


let img = await new DIG.Delete().getImage(memberLogo)
let img = await new Dig.Delete().getImage(memberLogo)

let attach = new Discord.MessageAttachment(img, "delete.png");;

Expand Down
2 changes: 1 addition & 1 deletion commands/Image Commands/egg.js
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ class UlgyCommand extends discord_akairo_1.Command {
const canvas = Canvas.createCanvas( 300 , 300);
const ctx = canvas.getContext('2d')

const background = await Canvas.loadImage('./Images/egg.png')
const background = await Canvas.loadImage('./Assets/Images/egg.png')
ctx.drawImage(background, 0, 0 ,canvas.width , canvas.height);

ctx.strokeStyle = '#740';
Expand Down
2 changes: 1 addition & 1 deletion commands/Image Commands/goggles.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ class ripCommand extends discord_akairo_1.Command {
const canvas = Canvas.createCanvas(463 ,516);
const ctx = canvas.getContext('2d')

const b = await Canvas.loadImage('./Images/goggles.png');
const b = await Canvas.loadImage('./Assets/Images/goggles.png');
ctx.drawImage(b, 0, 0 ,canvas.width , canvas.height);

const avatar1 = await Canvas.loadImage('https://p.kindpng.com/picc/s/21-217710_white-fade-corner-png-corner-black-fade-png.png')
Expand Down
Loading

0 comments on commit 82b525a

Please sign in to comment.