Skip to content

Commit

Permalink
client.createEmbed
Browse files Browse the repository at this point in the history
  • Loading branch information
asko1 committed Aug 29, 2020
1 parent 20ce233 commit ccaf367
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 1 addition & 2 deletions commands/user-info.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ exports.run = (client, message, args) => {
u = message.mentions.members.first().user;
member = message.mentions.members.first();
}
var embed = new client.Discord.MessageEmbed()
.setColor(client.config.color)
var embed = client.createEmbed()
.setTitle("User Information")
.setAuthor(u.tag, u.avatarURL())
.setThumbnail(u.avatarURL())
Expand Down
8 changes: 7 additions & 1 deletion modules/extra.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module.exports = (client) => {
module.exports = (client, Discord) => {
client.getChannels = (message, args) => {
if (args.length == 0) {
message.channel.send("Please specify a channel")
Expand All @@ -21,4 +21,10 @@ module.exports = (client) => {
}}
return [chnl, chnlID];
}

client.createEmbed = () => {
var embed = new Discord.MessageEmbed()
.setColor(client.config.color);
return embed;
}
}

0 comments on commit ccaf367

Please sign in to comment.