mirror of
https://github.com/darksaid98/cadence-discord-bot.git
synced 2026-12-03 22:15:37 +00:00
Merge pull request #54 from mariusbegby/show-nickname-instead-of-name
fix: Show user nickname in interaction reply if set instead of username
This commit is contained in:
8 files changed
+29
-17
No files matched your search
+2
-2
@@ -129,7 +129,7 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setAuthor({
|
||||
name: interaction.user.username,
|
||||
name: interaction.member.nickname || interaction.user.username,
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
@@ -148,7 +148,7 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setAuthor({
|
||||
name: interaction.user.username,
|
||||
name: interaction.member.nickname || interaction.user.username,
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
|
||||
+8
-2
@@ -32,7 +32,7 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setDescription(
|
||||
`**${embedIcons.warning} Oops!**\n_Hmm.._ It seems I am already not in a voice channel!`
|
||||
`**${embedIcons.warning} Oops!**\n_Hmm.._ It seems I am not in a voice channel!`
|
||||
)
|
||||
.setColor(embedColors.colorWarning)
|
||||
]
|
||||
@@ -45,8 +45,14 @@ module.exports = {
|
||||
return await interaction.editReply({
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setAuthor({
|
||||
name:
|
||||
interaction.member.nickname ||
|
||||
interaction.user.username,
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
`**${embedIcons.success} Leaving channel**\nCleared the track queue and left voice channel. To play more music, use the \`/play\` command!`
|
||||
`**${embedIcons.success} Leaving channel**\nCleared the track queue and left voice channel.\n\nTo play more music, use the \`/play\` command!`
|
||||
)
|
||||
.setColor(embedColors.colorSuccess)
|
||||
]
|
||||
|
||||
@@ -195,7 +195,7 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setAuthor({
|
||||
name: interaction.user.username,
|
||||
name: interaction.member.nickname || interaction.user.username,
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
|
||||
+10
-4
@@ -47,6 +47,12 @@ module.exports = {
|
||||
});
|
||||
}
|
||||
|
||||
let durationFormat =
|
||||
queue.currentTrack.raw.duration === 0 ||
|
||||
queue.currentTrack.duration === '0:00'
|
||||
? ''
|
||||
: `\`${queue.currentTrack.duration}\``;
|
||||
|
||||
// change paused state to opposite of current state
|
||||
queue.node.setPaused(!queue.node.isPaused());
|
||||
|
||||
@@ -55,11 +61,11 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setAuthor({
|
||||
name: interaction.user.username,
|
||||
name: interaction.member.nickname || interaction.user.username,
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
`**${embedIcons.pauseResumed} Paused track**\n**[${queue.currentTrack.title}](${queue.currentTrack.url})**.`
|
||||
`**${embedIcons.pauseResumed} Paused track**\n**${durationFormat} [${queue.currentTrack.title}](${queue.currentTrack.url})**`
|
||||
)
|
||||
.setThumbnail(queue.currentTrack.thumbnail)
|
||||
.setColor(embedColors.colorSuccess)
|
||||
@@ -70,11 +76,11 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setAuthor({
|
||||
name: interaction.user.username,
|
||||
name: interaction.member.nickname || interaction.user.username,
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
`**${embedIcons.pauseResumed} Resumed track**\n**[${queue.currentTrack.title}](${queue.currentTrack.url})**.`
|
||||
`**${embedIcons.pauseResumed} Resumed track**\n**${durationFormat} [${queue.currentTrack.title}](${queue.currentTrack.url})**`
|
||||
)
|
||||
.setThumbnail(queue.currentTrack.thumbnail)
|
||||
.setColor(embedColors.colorSuccess)
|
||||
|
||||
+3
-3
@@ -168,7 +168,7 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setAuthor({
|
||||
name: interaction.user.username,
|
||||
name: interaction.member.nickname || interaction.user.username,
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
@@ -191,7 +191,7 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setAuthor({
|
||||
name: interaction.user.username,
|
||||
name: interaction.member.nickname || interaction.member.nickname || interaction.user.username,
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
@@ -207,7 +207,7 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setAuthor({
|
||||
name: interaction.user.username,
|
||||
name: interaction.member.nickname || interaction.user.username,
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
|
||||
+1
-1
@@ -67,7 +67,7 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setAuthor({
|
||||
name: interaction.user.username,
|
||||
name: interaction.member.nickname || interaction.user.username,
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
|
||||
+2
-2
@@ -67,7 +67,7 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setAuthor({
|
||||
name: interaction.user.username,
|
||||
name: interaction.member.nickname || interaction.user.username,
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
@@ -103,7 +103,7 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setAuthor({
|
||||
name: interaction.user.username,
|
||||
name: interaction.member.nickname || interaction.user.username,
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
|
||||
+2
-2
@@ -72,7 +72,7 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setAuthor({
|
||||
name: interaction.user.username,
|
||||
name: interaction.member.nickname || interaction.user.username,
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
@@ -87,7 +87,7 @@ module.exports = {
|
||||
embeds: [
|
||||
new EmbedBuilder()
|
||||
.setAuthor({
|
||||
name: interaction.user.username,
|
||||
name: interaction.member.nickname || interaction.user.username,
|
||||
iconURL: interaction.user.avatarURL()
|
||||
})
|
||||
.setDescription(
|
||||
|
||||
Reference in new issue
Block a user