Skip to content

Commit

Permalink
applying standard.js
Browse files Browse the repository at this point in the history
shoxie committed Jul 13, 2020
1 parent 1fa31d7 commit e61616a
Showing 123 changed files with 4,286 additions and 4,335 deletions.
16 changes: 8 additions & 8 deletions commands/developer/deleteMap.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
module.exports = {
config: {
name: "deleteMap",
usage: "deleteMap",
name: 'deleteMap',
usage: 'deleteMap',
aliases: [],
description: "deleteMap",
description: 'deleteMap',
ownerOnly: true,
enabled: true,
enabled: true
},
async run(client, message, args) {
client.games.clear();
},
};
async run (client, message, args) {
client.games.clear()
}
}
26 changes: 13 additions & 13 deletions commands/fun/cattext.js
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
let neko = require("nekos.life");
let owo = new neko();
const { blueMessage, redMessage } = require("../../utils/message");
const neko = require('nekos.life')
const owo = new neko()
const { blueMessage, redMessage } = require('../../utils/message')
module.exports = {
config: {
name: "cattext",
usage: "cattext",
name: 'cattext',
usage: 'cattext',
aliases: [],
description: "Show random cat texts from neko.life server",
description: 'Show random cat texts from neko.life server',
ownerOnly: false,
enabled: true,
enabled: true
},
async run(client, message, args) {
let text = await owo.sfw.catText();
if (!text) return redMessage(message, "Something happened", ":sad:");
message.reply(text.cat);
},
};
async run (client, message, args) {
const text = await owo.sfw.catText()
if (!text) return redMessage(message, 'Something happened', ':sad:')
message.reply(text.cat)
}
}
28 changes: 14 additions & 14 deletions commands/fun/figlet.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
let figlet = require("figlet");
const figlet = require('figlet')
module.exports = {
config: {
name: "figlet",
usage: "figlet [text]",
description: "ASCII a text",
name: 'figlet',
usage: 'figlet [text]',
description: 'ASCII a text',
ownerOnly: false,
enabled: true
},
async run(client, message, args) {
async run (client, message, args) {
if (!args[0]) {
message.channel.send({
embed: {
color: 15158332,
title: "__***YOU THINK I'M A FOOL?***__",
description: "Input a text"
description: 'Input a text'
}
});
})
} else {
figlet(args.join(" "), function(err, data) {
figlet(args.join(' '), function (err, data) {
if (err) {
console.log("Something went wrong...");
console.dir(err);
return;
console.log('Something went wrong...')
console.dir(err)
return
}
message.channel.send("```" + data + "```");
});
message.channel.send('```' + data + '```')
})
}
}
};
}
35 changes: 17 additions & 18 deletions commands/fun/flight.js
Original file line number Diff line number Diff line change
@@ -1,30 +1,29 @@
module.exports = {
config: {
name: "flight",
usage: "flight ",
description: "Bring a user on a server tour",
name: 'flight',
usage: 'flight ',
description: 'Bring a user on a server tour',
ownerOnly: false,
enabled: true,
enabled: true
},
async run(client, message, args) {
let blacklistArray = ["155622262660268033"];
async run (client, message, args) {
const blacklistArray = ['155622262660268033']

let mention = message.mentions.users.first();
for (let id of blacklistArray) {
if (mention.id === id)
return message.reply("Doctor said: Fuck you bicc boi");
const mention = message.mentions.users.first()
for (const id of blacklistArray) {
if (mention.id === id) { return message.reply('Doctor said: Fuck you bicc boi') }
}
let user = message.guild.members.cache.get(mention.id);
const user = message.guild.members.cache.get(mention.id)
const channels = message.guild.channels.cache.filter(
(c) => c.type === "voice"
);
let original = user.voice.channel.id;
(c) => c.type === 'voice'
)
const original = user.voice.channel.id
for (const [channelID, channel] of channels) {
user.voice
.setChannel(channelID)
.then(() => console.log(`Moved ${user.user.tag}.`))
.catch(console.error);
.catch(console.error)
}
user.voice.setChannel(original);
},
};
user.voice.setChannel(original)
}
}
34 changes: 17 additions & 17 deletions commands/fun/fortune.js
Original file line number Diff line number Diff line change
@@ -1,26 +1,26 @@
const fetch = require("node-fetch");
const { MessageEmbed } = require("discord.js");
const fetch = require('node-fetch')
const { MessageEmbed } = require('discord.js')
module.exports = {
config: {
name: "fortune",
usage: "fortune",
name: 'fortune',
usage: 'fortune',
aliases: [],
description: "Send random fortune text",
description: 'Send random fortune text',
ownerOnly: false,
enabled: true,
enabled: true
},
async run(client, message, args) {
async run (client, message, args) {
try {
const res = await fetch("http://yerkee.com/api/fortune");
const json = await res.json();
const res = await fetch('http://yerkee.com/api/fortune')
const json = await res.json()
const embed = new MessageEmbed()
.setColor("RANDOM")
.setTitle("Fortune Cookie")
.setDescription(json.fortune);
return message.channel.send(embed);
.setColor('RANDOM')
.setTitle('Fortune Cookie')
.setDescription(json.fortune)
return message.channel.send(embed)
} catch (e) {
message.channel.send("Could not obtain fortune cookie :confused: ");
return console.error(e);
message.channel.send('Could not obtain fortune cookie :confused: ')
return console.error(e)
}
},
};
}
}
22 changes: 11 additions & 11 deletions commands/fun/joke.js
Original file line number Diff line number Diff line change
@@ -1,17 +1,17 @@
const DadJokes = require("dadjokes-wrapper");
const joke = new DadJokes();
const DadJokes = require('dadjokes-wrapper')
const joke = new DadJokes()

module.exports = {
config: {
name: "joke",
usage: "joke",
description: "Get random joke",
name: 'joke',
usage: 'joke',
description: 'Get random joke',
aliases: [],
enabled: true,
ownerOnly: false,
ownerOnly: false
},
async run(client, message, args) {
const dadjoke = await joke.randomJoke();
message.reply(dadjoke);
},
};
async run (client, message, args) {
const dadjoke = await joke.randomJoke()
message.reply(dadjoke)
}
}
53 changes: 26 additions & 27 deletions commands/fun/renameAll.js
Original file line number Diff line number Diff line change
@@ -1,55 +1,54 @@
const { verify } = require("../../utils/utility");
const { verify } = require('../../utils/utility')
module.exports = {
config: {
name: "renameAll",
usage: "renameAll",
name: 'renameAll',
usage: 'renameAll',
aliases: [],
description: "Rename every single member of the server",
description: 'Rename every single member of the server',
ownerOnly: false,
enabled: true
},
async run(client, message, args) {
if (!message.member.hasPermission("ADMINISTRATOR")) return;
message.channel.send("Nickname ?");
let collected = await message.channel.awaitMessages(
async run (client, message, args) {
if (!message.member.hasPermission('ADMINISTRATOR')) return
message.channel.send('Nickname ?')
const collected = await message.channel.awaitMessages(
m => m.author.id === message.author.id,
{
max: 1,
time: 30000
}
);
let nickname = collected.first().content;
)
const nickname = collected.first().content
try {
await message.reply(
`Are you sure you want to ${
nickname
? `rename everyone to **${nickname}**`
: "remove all nicknames"
: 'remove all nicknames'
}?`
);
const verification = await verify(message.channel, message.author);
if (!verification) return message.say("Aborted.");
await message.reply("Fetching members...");
await message.guild.members.fetch();
await message.reply("Fetched members! Renaming...");
let i = 0;
)
const verification = await verify(message.channel, message.author)
if (!verification) return message.say('Aborted.')
await message.reply('Fetching members...')
await message.guild.members.fetch()
await message.reply('Fetched members! Renaming...')
let i = 0
for (const member of message.guild.members.cache.values()) {
try {
await member.setNickname(nickname);
await member.setNickname(nickname)
} catch {
i++;
continue;
i++
continue
}
}
if (!nickname)
return message.reply("Successfully removed all nicknames!");
if (!nickname) { return message.reply('Successfully removed all nicknames!') }
return message.reply(
`Successfully renamed all but ${i} member${
i === 1 ? "" : "s"
i === 1 ? '' : 's'
} to **${nickname}**!`
);
)
} catch (err) {
return message.reply(`Failed to rename everyone: \`${err.message}\``);
return message.reply(`Failed to rename everyone: \`${err.message}\``)
}
}
};
}
Loading

0 comments on commit e61616a

Please sign in to comment.