Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

69
Views
Looking for ping command
const { Client, Message, MessageEmbed, Permissions } = require("discord.js");
const emojis = require("../../config/emojis.json");
const db = require("quick.db");
const { player } = require("../index");
const embed = require("../structures/embeds");
module.exports = {
  name: "ping",
  aliases: [],
  description: "test",
run: async (client, message, args, prefix, lang) => {
        content: var states = "๐ŸŸข Excellent";
    var states2 = "๐ŸŸข Excellent";
    var msg = `${Date.now() - message.createdTimestamp}`;
    var api = `${Math.round(client.ws.ping)}`;
    if (Number(msg) > 70) states = "๐ŸŸข Good";
    if (Number(msg) > 170) states = "๐ŸŸก Not Bad";
    if (Number(msg) > 350) states = "๐Ÿ”ด Soo Bad";
    if (Number(api) > 70) states2 = "๐ŸŸข Good";
    if (Number(api) > 170) states2 = "๐ŸŸก Not Bad";
    if (Number(api) > 350) states2 = "๐Ÿ”ด Soo Bad";
    if (message.author.bot) return;
  try {
      message.reply({
      new MessageEmbed()
        .setColor("#2F3136")
        .setAuthor(message.author.username, message.author.avatarURL())
        .addField("**Time Taken:**", msg + " ms ๐Ÿ“ถ | " + states, true)
        .addField("**WebSocket:**", api + " ms ๐Ÿ“ถ | " + states2, true)
        .setTimestamp()
        .setFooter(`Request By ${message.author.tag}`)
    } catch {
      console.log("rexom");
    }
  },
};

Can someone make it work please? i want this code to work on my project but i keep getting erorr can someone help me make it work? i am looking for a ping command can someone help? so i tested many examples it isn't working into my project, i am looking for someone provides me or gives me the code connected to the way how ping code is made because that will make the command to work :)

about 4 years ago ยท Juan Pablo Isaza
1 answers
Answer question

0

Remove content: from the first line. You can't use a label there(and you don't need it). label

Close the message.reply's parentheses and curly braces.

Use embed like this: message.reply({ embeds: [ new MessageEmbed()... ] })(this is for v13: embeds).

var states = "๐ŸŸข Excellent";
var states2 = "๐ŸŸข Excellent";
var msg = `${Date.now() - message.createdTimestamp}`;
var api = `${Math.round(client.ws.ping)}`;
if (Number(msg) > 70) states = "๐ŸŸข Good";
if (Number(msg) > 170) states = "๐ŸŸก Not Bad";
if (Number(msg) > 350) states = "๐Ÿ”ด Soo Bad";
if (Number(api) > 70) states2 = "๐ŸŸข Good";
if (Number(api) > 170) states2 = "๐ŸŸก Not Bad";
if (Number(api) > 350) states2 = "๐Ÿ”ด Soo Bad";
if (message.author.bot) return;
try {
    message.reply({ embeds:
        [new MessageEmbed()
        .setColor("#2F3136")
        .setAuthor(message.author.username, message.author.avatarURL())
        .addField("**Time Taken:**", msg + " ms ๐Ÿ“ถ | " + states, true)
        .addField("**WebSocket:**", api + " ms ๐Ÿ“ถ | " + states2, true)
        .setTimestamp()
        .setFooter(`Request By ${message.author.tag}`)]
    });
} catch {
    console.log("rexom");
}
about 4 years ago ยท Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
ยฉ 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!