Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: embed structure, improvements #18

Merged
merged 4 commits into from
Feb 6, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
refactor: fix embed methods
FnrDev committed Feb 6, 2022
commit 33c393d6bfbecf45939adfcb8e5ea6736ee61414
2 changes: 1 addition & 1 deletion commands/general/ping.js
Original file line number Diff line number Diff line change
@@ -10,7 +10,7 @@ module.exports = {
await interaction.reply('🏓 Pong!')
const msg = await interaction.fetchReply()
const embed = new Discord.MessageEmbed()
.setAuthor(interaction.user.tag, interaction.user.displayAvatarURL({ dynamic: true }))
.setAuthor({ name: interaction.user.tag, iconURL: interaction.user.displayAvatarURL({ dynamic: true }) })
.setColor('RANDOM')
.setTimestamp()
.setDescription(`**Time:** ${Math.floor(msg.createdTimestamp - interaction.createdTimestamp)} ms\n**API Ping:** ${client.ws.ping} ms`)
2 changes: 1 addition & 1 deletion commands/info/info.js
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@ module.exports = {
.setTitle('__Bot Stats__')
.setColor('RANDOM')
.setThumbnail(client.user.displayAvatarURL())
.setFooter(`© ${client.user.username} - Coded By Fnr#0017`)
.setFooter({ text: `© ${client.user.username} - Coded By Fnr#0017` })
.addFields(
{
name: "<a:IconBot:855532513770340424> Total Guilds: ",
2 changes: 1 addition & 1 deletion commands/ticket/delete.js
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@ module.exports = {
const logChannel = interaction.guild.channels.cache.get(config.log);
if (!logChannel) return;
const embed = new MessageEmbed()
.setAuthor(interaction.user.tag, interaction.user.displayAvatarURL({ dynamic: true }))
.setAuthor({ name: interaction.user.tag, iconURL: interaction.user.displayAvatarURL({ dynamic: true }) })
.setDescription(`${interaction.user} deleted a **#${interaction.channel.name}** ticket.`)
.addField("Ticket ID:", interaction.channel.id, true)
.addField("Ticket Created At:", `<t:${Math.floor(interaction.channel.createdTimestamp / 1000)}:R>`, true)
6 changes: 3 additions & 3 deletions commands/ticket/new.js
Original file line number Diff line number Diff line change
@@ -63,10 +63,10 @@ module.exports = {
number: filterGuildTickets.length + 1
})
const embed = new MessageEmbed()
.setAuthor(interaction.user.tag, interaction.user.displayAvatarURL({ dynamic: true }))
.setAuthor({ name: interaction.user.tag, iconURL: interaction.user.displayAvatarURL({ dynamic: true }) })
.setDescription(config.message)
.setColor(config.success)
.setFooter(`${interaction.guild.name} Support`, interaction.guild.iconURL({ dynamic: true }))
.setFooter({ text: `${interaction.guild.name} Support`, iconURL: interaction.guild.iconURL({ dynamic: true }) })
.setTimestamp()
ticketChannel.send({
content: config.content?.replaceAll('{username}', interaction.user.username)
@@ -84,7 +84,7 @@ module.exports = {
const logChannel = interaction.guild.channels.cache.get(config.log)
if (!logChannel) return;
const logEmbed = new MessageEmbed()
.setAuthor(interaction.user.tag, interaction.user.displayAvatarURL({ dynamic: true }))
.setAuthor({ name: interaction.user.tag, iconURL: interaction.user.displayAvatarURL({ dynamic: true }) })
.setThumbnail(interaction.user.displayAvatarURL({ dynamic: true }))
.setDescription(`${interaction.user} Created a new ticket ${ticketChannel} (#${ticketChannel.name})`)
.addField("Ticket ID:", ticketChannel.id, true)
2 changes: 1 addition & 1 deletion commands/ticket/open.js
Original file line number Diff line number Diff line change
@@ -20,7 +20,7 @@ module.exports = {
SEND_MESSAGES: true
});
interaction.reply({
content: `✅ Successfully re opened this ticket.`
content: `✅ Successfully reopened this ticket.`
})
}
}