Amirparsa
Amirparsa
DIAdiscord.js - Imagine an app
Created by Amirparsa on 8/19/2024 in #djs-questions
is this wrong for making embeds
so i have an entire folder for components (embeds, buttons, button rows, and...) then i have a file for the things that are repeated like this:
export function _embedStatics(){
return {
author: {
name: "RoboPlix",
icon_url: "https://plixhost-cdn.s3.ir-thr-at1.arvanstorage.ir/roboplix.png"
},
footer: {
text: "Made With ❤️ By PlixSMP Developers"
},
timestamp: Date.now()
}
}
export function _embedStatics(){
return {
author: {
name: "RoboPlix",
icon_url: "https://plixhost-cdn.s3.ir-thr-at1.arvanstorage.ir/roboplix.png"
},
footer: {
text: "Made With ❤️ By PlixSMP Developers"
},
timestamp: Date.now()
}
}
but im wondering is this the standard or just dumb?
3 replies
DIAdiscord.js - Imagine an app
Created by Amirparsa on 8/19/2024 in #djs-questions
problem with validator
hey, is there a problem with this validator? not as in is it working, as in am i doing it correctly btw i cant defer the reply cuz maybe i will have to send an ephemeral reply in the command
import { getUserByDiscordID } from "../database/interactors/User"

/**
*
* @param {import("commandkit").ValidationProps} param0
*/
export default async function validator({ interaction, commandObj, client, handler }){
if(commandObj.options.needsAccount === undefined) return false

const account = getUserByDiscordID(interaction.user.id)

if(commandObj.options.needsAccount){
if(!account){
interaction.reply("You Dont Have An Account!")
return true
}
}else {
if(account){
interaction.reply("Yo Do Have An Account")
return true
}
}

return false
}
import { getUserByDiscordID } from "../database/interactors/User"

/**
*
* @param {import("commandkit").ValidationProps} param0
*/
export default async function validator({ interaction, commandObj, client, handler }){
if(commandObj.options.needsAccount === undefined) return false

const account = getUserByDiscordID(interaction.user.id)

if(commandObj.options.needsAccount){
if(!account){
interaction.reply("You Dont Have An Account!")
return true
}
}else {
if(account){
interaction.reply("Yo Do Have An Account")
return true
}
}

return false
}
6 replies
DIAdiscord.js - Imagine an app
Created by Amirparsa on 8/19/2024 in #djs-questions
regenerating commands list
is there a way to regenerate all comands?
6 replies