Skip to content

Commit

Permalink
style: format code with Prettier and StandardJS
Browse files Browse the repository at this point in the history
This commit fixes the style issues introduced in 3653b86 according to the output
from Prettier and StandardJS.

Details: #126
  • Loading branch information
deepsource-autofix[bot] authored Jan 6, 2025
1 parent 3653b86 commit d9be01a
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 16 deletions.
16 changes: 8 additions & 8 deletions commands/bord.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,45 +3,45 @@ const {
ActionRowBuilder,
ButtonBuilder,
ButtonStyle,
MessageFlags
MessageFlags,
} = require('discord.js')
const config = require('../config.json')
module.exports = {
data: {
name: 'bord',
description: "Panel d'aide qui vous donne toutes les commandes du robot.",
options: []
options: [],
},
execute (interaction, client) {
execute(interaction, client) {
const ButtonsBord = new ActionRowBuilder()
.addComponents(
new ButtonBuilder()
.setLabel('Serveur Discord')
.setStyle(ButtonStyle.Link)
.setURL('https://discord.gg/9gcxwVY')
.setURL('https://discord.gg/9gcxwVY'),
)
.addComponents(
new ButtonBuilder()
.setLabel('Code source')
.setStyle(ButtonStyle.Link)
.setURL(`${config.GitHubProjectURL}`)
.setURL(`${config.GitHubProjectURL}`),
)
const BordEmbed = new EmbedBuilder()
.setColor(config.colors.PrimaryColor)
.setTitle(`${client.user.username} — Panel d'aide`)
.setThumbnail(client.user.avatarURL({ format: 'png', size: 1024 }))
.setDescription(
`**${client.user.username}** est un robot Discord qui a été créé pour aider les serveurs Discord à gérer leurs membres, à avoir des logs, filtrer certains liens et avoir **son propre message de bienvenue**. Vous pouvez trouver le code source du robot sur [GitHub](${config.GitHubProjectURL}).`
`**${client.user.username}** est un robot Discord qui a été créé pour aider les serveurs Discord à gérer leurs membres, à avoir des logs, filtrer certains liens et avoir **son propre message de bienvenue**. Vous pouvez trouver le code source du robot sur [GitHub](${config.GitHubProjectURL}).`,
)
.setImage(
interaction.guild.features.includes('BANNER')
? interaction.guild.bannerURL({ format: 'png', size: 1024 })
: null
: null,
)
interaction.reply({
embeds: [BordEmbed],
components: [ButtonsBord],
flags: MessageFlags.Ephemeral,
})
}
},
}
16 changes: 8 additions & 8 deletions commands/ping.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,13 @@ module.exports = {
data: {
name: 'ping',
description: 'Obtenir le ping du robot',
options: []
options: [],
},
async execute (interaction, client) {
async execute(interaction, client) {
const PingBeforeEmbed = new EmbedBuilder().setAuthor({
name: 'En attente du retour de Ping...',
iconURL: client.user.avatarURL(),
url: client.config.GitHubProjectURL
url: client.config.GitHubProjectURL,
})
const sent = await interaction.reply({
embeds: [PingBeforeEmbed],
Expand All @@ -22,19 +22,19 @@ module.exports = {
.setAuthor({
name: `Le ping de ${client.user.username}`,
iconURL: client.user.avatarURL(),
url: `${client.config.GitHubProjectURL}`
url: `${client.config.GitHubProjectURL}`,
})
.addFields(
{
name: 'Total du ping',
value: `${TotalPing}ms`,
inline: true
inline: true,
},
{
name: 'Websocket',
value: `${client.ws.ping} ms`,
inline: true
}
inline: true,
},
)
TotalPing >= 200
? PingEmbed.setColor(client.config.colors.DangerColor)
Expand All @@ -43,5 +43,5 @@ module.exports = {
embeds: [PingEmbed],
flags: MessageFlags.Ephemeral,
})
}
},
}

0 comments on commit d9be01a

Please sign in to comment.