ggg,.
ggg,.
DIAdiscord.js - Imagine an app
Created by ggg,. on 9/9/2024 in #djs-questions
ping discord
anyways sorry for bothering and thanks for the help
35 replies
DIAdiscord.js - Imagine an app
Created by ggg,. on 9/9/2024 in #djs-questions
ping discord
i should probably familliars my self with node or wtv
35 replies
DIAdiscord.js - Imagine an app
Created by ggg,. on 9/9/2024 in #djs-questions
ping discord
also my js skills are basic web front dev shit that's why
35 replies
DIAdiscord.js - Imagine an app
Created by ggg,. on 9/9/2024 in #djs-questions
ping discord
okay sorry for my stupidity thanks for the help
35 replies
DIAdiscord.js - Imagine an app
Created by ggg,. on 9/9/2024 in #djs-questions
ping discord
ik im stupid but im learning
const { Client, SlashCommandBuilder, WebSocketManager } = require('discord.js');

module.exports = {
data: new SlashCommandBuilder()
.setName('ping')
.setDescription('Replies with Pong!'),
async execute(interaction,) {
let now = Date.now();
await interaction.reply(`${Client.ws.ping}`)//.then((interaction) => interaction.edit(`Pong : **${Date.now() - now}**ms\nDiscord API: ${Client.ws.ping}`));
},
};
const { Client, SlashCommandBuilder, WebSocketManager } = require('discord.js');

module.exports = {
data: new SlashCommandBuilder()
.setName('ping')
.setDescription('Replies with Pong!'),
async execute(interaction,) {
let now = Date.now();
await interaction.reply(`${Client.ws.ping}`)//.then((interaction) => interaction.edit(`Pong : **${Date.now() - now}**ms\nDiscord API: ${Client.ws.ping}`));
},
};
35 replies
DIAdiscord.js - Imagine an app
Created by ggg,. on 9/9/2024 in #djs-questions
ping discord
TypeError: Cannot read properties of undefined (reading 'ping')
at Object.execute (C:\Users\SETUP GAME\Documents\project v6\VR community\commands\utility\ping.js:9:40)
at Object.execute (C:\Users\SETUP GAME\Documents\project v6\VR community\events\interactions.js:16:18)
at Client.<anonymous> (C:\Users\SETUP GAME\Documents\project v6\VR community\index.js:35:44)
at Client.emit (node:events:519:28)
at InteractionCreateAction.handle (C:\Users\SETUP GAME\Documents\project v6\VR community\node_modules\discord.js\src\client\actions\InteractionCreate.js:97:12)
at module.exports [as INTERACTION_CREATE] (C:\Users\SETUP GAME\Documents\project v6\VR community\node_modules\discord.js\src\client\websocket\handlers\INTERACTION_CREATE.js:4:36)
at WebSocketManager.handlePacket (C:\Users\SETUP GAME\Documents\project v6\VR community\node_modules\discord.js\src\client\websocket\WebSocketManager.js:348:31)
at WebSocketManager.<anonymous> (C:\Users\SETUP GAME\Documents\project v6\VR community\node_modules\discord.js\src\client\websocket\WebSocketManager.js:232:12)
at WebSocketManager.emit (C:\Users\SETUP GAME\Documents\project v6\VR community\node_modules\@vladfrangu\async_event_emitter\dist\index.cjs:287:31)
at WebSocketShard.<anonymous> (C:\Users\SETUP GAME\Documents\project v6\VR community\node_modules\@discordjs\ws\dist\index.js:1190:51)
TypeError: Cannot read properties of undefined (reading 'ping')
at Object.execute (C:\Users\SETUP GAME\Documents\project v6\VR community\commands\utility\ping.js:9:40)
at Object.execute (C:\Users\SETUP GAME\Documents\project v6\VR community\events\interactions.js:16:18)
at Client.<anonymous> (C:\Users\SETUP GAME\Documents\project v6\VR community\index.js:35:44)
at Client.emit (node:events:519:28)
at InteractionCreateAction.handle (C:\Users\SETUP GAME\Documents\project v6\VR community\node_modules\discord.js\src\client\actions\InteractionCreate.js:97:12)
at module.exports [as INTERACTION_CREATE] (C:\Users\SETUP GAME\Documents\project v6\VR community\node_modules\discord.js\src\client\websocket\handlers\INTERACTION_CREATE.js:4:36)
at WebSocketManager.handlePacket (C:\Users\SETUP GAME\Documents\project v6\VR community\node_modules\discord.js\src\client\websocket\WebSocketManager.js:348:31)
at WebSocketManager.<anonymous> (C:\Users\SETUP GAME\Documents\project v6\VR community\node_modules\discord.js\src\client\websocket\WebSocketManager.js:232:12)
at WebSocketManager.emit (C:\Users\SETUP GAME\Documents\project v6\VR community\node_modules\@vladfrangu\async_event_emitter\dist\index.cjs:287:31)
at WebSocketShard.<anonymous> (C:\Users\SETUP GAME\Documents\project v6\VR community\node_modules\@discordjs\ws\dist\index.js:1190:51)
35 replies
DIAdiscord.js - Imagine an app
Created by ggg,. on 9/9/2024 in #djs-questions
ping discord
new error
35 replies
DIAdiscord.js - Imagine an app
Created by ggg,. on 9/9/2024 in #djs-questions
ping discord
then how do i set globely to every file?
35 replies
DIAdiscord.js - Imagine an app
Created by ggg,. on 9/9/2024 in #djs-questions
ping discord
should i refer to client in every command file?
35 replies
DIAdiscord.js - Imagine an app
Created by ggg,. on 9/9/2024 in #djs-questions
ping discord
ik this
35 replies
DIAdiscord.js - Imagine an app
Created by ggg,. on 9/9/2024 in #djs-questions
ping discord
ReferenceError: client is not defined
at Object.execute (C:\Users\SETUP GAME\Documents\project v6\VR community\commands\utility\ping.js:9:30)
at Object.execute (C:\Users\SETUP GAME\Documents\project v6\VR community\events\interactions.js:16:18)
at Client.<anonymous> (C:\Users\SETUP GAME\Documents\project v6\VR community\index.js:35:44)
at Client.emit (node:events:519:28)
at InteractionCreateAction.handle (C:\Users\SETUP GAME\Documents\project v6\VR community\node_modules\discord.js\src\client\actions\InteractionCreate.js:97:12)
at module.exports [as INTERACTION_CREATE] (C:\Users\SETUP GAME\Documents\project v6\VR community\node_modules\discord.js\src\client\websocket\handlers\INTERACTION_CREATE.js:4:36)
at WebSocketManager.handlePacket (C:\Users\SETUP GAME\Documents\project v6\VR community\node_modules\discord.js\src\client\websocket\WebSocketManager.js:348:31)
at WebSocketManager.<anonymous> (C:\Users\SETUP GAME\Documents\project v6\VR community\node_modules\discord.js\src\client\websocket\WebSocketManager.js:232:12)
at WebSocketManager.emit (C:\Users\SETUP GAME\Documents\project v6\VR community\node_modules\@vladfrangu\async_event_emitter\dist\index.cjs:287:31)
at WebSocketShard.<anonymous> (C:\Users\SETUP GAME\Documents\project v6\VR community\node_modules\@discordjs\ws\dist\index.js:1190:51)
ReferenceError: client is not defined
at Object.execute (C:\Users\SETUP GAME\Documents\project v6\VR community\commands\utility\ping.js:9:30)
at Object.execute (C:\Users\SETUP GAME\Documents\project v6\VR community\events\interactions.js:16:18)
at Client.<anonymous> (C:\Users\SETUP GAME\Documents\project v6\VR community\index.js:35:44)
at Client.emit (node:events:519:28)
at InteractionCreateAction.handle (C:\Users\SETUP GAME\Documents\project v6\VR community\node_modules\discord.js\src\client\actions\InteractionCreate.js:97:12)
at module.exports [as INTERACTION_CREATE] (C:\Users\SETUP GAME\Documents\project v6\VR community\node_modules\discord.js\src\client\websocket\handlers\INTERACTION_CREATE.js:4:36)
at WebSocketManager.handlePacket (C:\Users\SETUP GAME\Documents\project v6\VR community\node_modules\discord.js\src\client\websocket\WebSocketManager.js:348:31)
at WebSocketManager.<anonymous> (C:\Users\SETUP GAME\Documents\project v6\VR community\node_modules\discord.js\src\client\websocket\WebSocketManager.js:232:12)
at WebSocketManager.emit (C:\Users\SETUP GAME\Documents\project v6\VR community\node_modules\@vladfrangu\async_event_emitter\dist\index.cjs:287:31)
at WebSocketShard.<anonymous> (C:\Users\SETUP GAME\Documents\project v6\VR community\node_modules\@discordjs\ws\dist\index.js:1190:51)
35 replies
DIAdiscord.js - Imagine an app
Created by ggg,. on 9/9/2024 in #djs-questions
ping discord
new error
35 replies
DIAdiscord.js - Imagine an app
Created by ggg,. on 9/9/2024 in #djs-questions
ping discord
new code
const { Client, SlashCommandBuilder, WebSocketManager } = require('discord.js');

module.exports = {
data: new SlashCommandBuilder()
.setName('ping')
.setDescription('Replies with Pong!'),
async execute(interaction,) {
let now = Date.now();
await interaction.reply(`${client.ws.ping}`)//.then((interaction) => interaction.edit(`Pong : **${Date.now() - now}**ms\nDiscord API: ${Client.ws.ping}`));
},
};
const { Client, SlashCommandBuilder, WebSocketManager } = require('discord.js');

module.exports = {
data: new SlashCommandBuilder()
.setName('ping')
.setDescription('Replies with Pong!'),
async execute(interaction,) {
let now = Date.now();
await interaction.reply(`${client.ws.ping}`)//.then((interaction) => interaction.edit(`Pong : **${Date.now() - now}**ms\nDiscord API: ${Client.ws.ping}`));
},
};
35 replies
DIAdiscord.js - Imagine an app
Created by ggg,. on 9/9/2024 in #djs-questions
ping discord
okay bear my coding skills are low, but i'm still learning
35 replies