Skip to content

Commit

Permalink
v1.05 | Commands Modified
Browse files Browse the repository at this point in the history
  • Loading branch information
mo-balsara committed Jan 8, 2021
1 parent a0636e9 commit 50db0b4
Show file tree
Hide file tree
Showing 11 changed files with 163 additions and 321 deletions.
169 changes: 0 additions & 169 deletions ch_index.js

This file was deleted.

23 changes: 23 additions & 0 deletions commands/_template
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
name: 'test',
aliases: ['test2', 't'],

description: '',

args: true,
//args required?

usage: '<user> <role>',
//usage of command

guildOnly: true,

cooldown: 5,
//in secs

permissions: 'ADMINISTRATOR',

execute(message, args) {
//stuff
},
};
7 changes: 5 additions & 2 deletions commands/avatar.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,24 @@ const Discord = require('discord.js');

module.exports = {
name: 'avatar',
aliases: ['icon', 'pfp'],
description: 'Returns a users avatar',
execute(message, args) {
const embed = new Discord.MessageEmbed()
if (!message.mentions.users.first()) {
embed.setTitle("Your Avatar:")
embed.setURL(message.author.displayAvatarURL())
embed.setThumbnail(message.author.displayAvatarURL())
// embed.setDescription("This is your avatar.")
embed.setColor("RANDOM")
embed.setColor("ORANGE")
return message.channel.send(embed)
} else {
const user = message.mentions.users.first()
embed.setTitle(`${user.tag}'s Avatar:`)
embed.setURL(user.displayAvatarURL())
embed.setThumbnail(user.displayAvatarURL())
// embed.setDescription(`This is ${user.tag}'s avatar.`)
embed.setColor('RANDOM')
embed.setColor('ORANGE')
// embed.setFooter("This is a test.")
return message.channel.send(embed)
}
Expand Down
9 changes: 0 additions & 9 deletions commands/devs.js

This file was deleted.

44 changes: 42 additions & 2 deletions commands/help.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,47 @@
const prefix = ';';
//this will change with the custom prefix thing

module.exports = {
name: 'help',
description: 'Help menu',
description: 'List all of my commands or info about a specific command.',
aliases: ['commands', 'cmds', 'info'],
usage: '[command name]',
execute(message, args) {
//will work on this later as it is a "feature" of the command handling
const data = [];
const { commands } = message.client;

if (!args.length) {
let nonhiddencmds = commands.filter(command => {if (!command.hidden) return command.name });
data.push('Here\'s a list of all my commands:');
data.push(nonhiddencmds.map(command => command.name).join(', '));
data.push(`\nYou can send \`${prefix}help [command name]\` to get info on a specific command!`);

return message.author.send(data, { split: true })
.then(() => {
if (message.channel.type === 'dm') return;
message.reply('I\'ve sent you a DM with all my commands!');
})
.catch(error => {
console.error(`Could not send help DM to ${message.author.tag}.\n`, error);
message.reply('it seems like I can\'t DM you!');
});
}

const name = args[0].toLowerCase();
const command = commands.get(name) || commands.find(c => c.aliases && c.aliases.includes(name));

if (!command) {
return message.reply('that\'s not a valid command!');
}

data.push(`**Name:** ${command.name}`);

if (command.aliases) data.push(`**Aliases:** ${command.aliases.join(', ')}`);
if (command.description) data.push(`**Description:** ${command.description}`);
if (command.usage) data.push(`**Usage:** ${prefix}${command.name} ${command.usage}`);

data.push(`**Cooldown:** ${command.cooldown || 3} second(s)`);

message.channel.send(data, { split: true });
},
};
15 changes: 12 additions & 3 deletions commands/invite.js
Original file line number Diff line number Diff line change
@@ -1,7 +1,16 @@
const Discord = require('discord.js');
const version = "v1.0.3"

module.exports = {
name: 'ping',
description: 'Ping!',
name: 'invite',
description: 'Get the invite link for the bot!',
execute(message, args) {
message.channel.send('Pong.');
let embed5 = new Discord.MessageEmbed()
.setTitle("Invite Moby to your Server!")
.setDescription('Use this link to invite Moby to your servers! [Link](https://discord.com/oauth2/authorize?client_id=784210441622650920&permissions=8&scope=bot)')
.addField(version)
.setColor("ORANGE")
.setFooter(`Moby`, message.client.user.displayAvatarURL({ dynamic: true, format: 'png', size: 32 }))
message.channel.send(embed5)
},
};
2 changes: 1 addition & 1 deletion commands/meme.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ module.exports = {

embed.setTitle(`${memeTitle}`);
embed.setURL(`${memeUrl}`);
embed.setColor('RANDOM');
embed.setColor('ORANGE');
embed.setImage(memeImage);
embed.setFooter(`👍 ${memeUpvotes} 💬 ${memeNumComments}`);

Expand Down
9 changes: 0 additions & 9 deletions commands/owner.js

This file was deleted.

12 changes: 9 additions & 3 deletions commands/secretcommand.js
Original file line number Diff line number Diff line change
@@ -1,9 +1,15 @@
const Discord = require('discord.js');

module.exports = {
name: 'ping',
description: 'Ping!',
name: 'femboy me daddy UwU',
hidden: true,
description: '',
execute(message, args) {
message.channel.send('Pong.');
let embed3 = new Discord.MessageEmbed()
.setTitle("no you demented burnt lentil")
.setDescription("hehe luv ya :D\nthis is the secret command :)")
.setColor("ORANGE")
.setFooter(`Moby`, client.user.displayAvatarURL({ dynamic: true, format: 'png', size: 32 }))
message.channel.send(embed3)
},
};
2 changes: 1 addition & 1 deletion commands/support.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ module.exports = {
.setTitle("Moby's Support Server!")
.setDescription("Click on the link to join Moby's support server today! [Link](https://discord.gg/7zUD9vkDzN)")
.setColor("ORANGE")
.setFooter(`Moby • Today at ${timeSup}`, client.user.displayAvatarURL({ dynamic: true, format: 'png', size: 32 }))
.setFooter(`Moby • Today at ${timeSup}`, message.client.user.displayAvatarURL({ dynamic: true, format: 'png', size: 32 }))
message.channel.send(embedSup)
},
};
Loading

0 comments on commit 50db0b4

Please sign in to comment.