-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #126 from thomasbnt/depfu/batch_all/yarn/2025-01-05
- Loading branch information
Showing
4 changed files
with
73 additions
and
235 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,47 +1,47 @@ | ||
const { EmbedBuilder } = require('discord.js') | ||
const { EmbedBuilder, MessageFlags } = require('discord.js') | ||
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], | ||
fetchReply: true, | ||
ephemeral: true | ||
flags: MessageFlags.Ephemeral, | ||
}) | ||
const TotalPing = sent.createdTimestamp - interaction.createdTimestamp | ||
const PingEmbed = new EmbedBuilder() | ||
// .setColor(client.config.PrimaryColor) | ||
.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) | ||
: PingEmbed.setColor(client.config.colors.SuccessColor) | ||
await interaction.editReply({ | ||
embeds: [PingEmbed], | ||
ephemeral: true | ||
flags: MessageFlags.Ephemeral, | ||
}) | ||
} | ||
}, | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
{ | ||
"name": "bordpi", | ||
"version": "3.5.1", | ||
"version": "3.5.2", | ||
"description": "Un robot Discord gérant et aidant les utilisateurs pour son propre serveur.", | ||
"main": "app.js", | ||
"scripts": { | ||
|
@@ -20,13 +20,14 @@ | |
}, | ||
"license": "GPL-3.0-only", | ||
"dependencies": { | ||
"@discordjs/rest": "^1.7.1", | ||
"@discordjs/rest": "^2.4.2", | ||
"@ptkdev/logger": "^1.8.0", | ||
"discord-api-types": "^0.37.110", | ||
"discord.js": "^14.16.3", | ||
"discord-api-types": "^0.37.115", | ||
"discord.js": "^14.17.2", | ||
"ms": "^2.1.3", | ||
"node-cron": "^3.0.3", | ||
"node-fetch": "2.6.11", | ||
"unsplash-js": "^7.0.19" | ||
} | ||
}, | ||
"packageManager": "[email protected]+sha1.ac34549e6aa8e7ead463a7407e1c7390f61a6610" | ||
} |
Oops, something went wrong.