Ypsilon
Ypsilon
DIAdiscord.js - Imagine an app
Created by Ypsilon on 1/3/2025 in #djs-questions
GuildAuditLogEntryCreate & Typescript
A ok so I wasn't the only running against this 😄 Thank you for the info ❤️
4 replies
DIAdiscord.js - Imagine an app
Created by Ypsilon on 1/3/2025 in #djs-questions
GuildAuditLogEntryCreate & Typescript
I have been looking at https://discord.js.org/docs/packages/discord.js/14.17.2/GuildAuditLogsEntry:Class but my knowledge of typescript just doesn't cut it. To figure this out.
4 replies
DIAdiscord.js - Imagine an app
Created by Ypsilon on 12/23/2024 in #djs-questions
client.application.commands.permissions.set(), 401: Unauthorized
Not really just did it manually but would have been nice, because 80% don't understand how the command system works. The disabled all commands in the @everyone role. So nobody could use a single application 😅
14 replies
DIAdiscord.js - Imagine an app
Created by Ypsilon on 12/23/2024 in #djs-questions
client.application.commands.permissions.set(), 401: Unauthorized
and I am administrator on the guild
14 replies
DIAdiscord.js - Imagine an app
Created by Ypsilon on 12/23/2024 in #djs-questions
client.application.commands.permissions.set(), 401: Unauthorized
It looks like it really needs to be the owners oauth? because I just try with my token and still got 401
14 replies
DIAdiscord.js - Imagine an app
Created by Ypsilon on 12/23/2024 in #djs-questions
client.application.commands.permissions.set(), 401: Unauthorized
:sadge:
14 replies
DIAdiscord.js - Imagine an app
Created by Ypsilon on 12/23/2024 in #djs-questions
client.application.commands.permissions.set(), 401: Unauthorized
await client.application.commands.permissions.set({
guild: GUILD_ID,
command: pingCommand,
permissions: [
{
id: ROLE_CITIZEN,
type: ApplicationCommandPermissionType.Role,
permission: true,
},
],
token: token,
})
await client.application.commands.permissions.set({
guild: GUILD_ID,
command: pingCommand,
permissions: [
{
id: ROLE_CITIZEN,
type: ApplicationCommandPermissionType.Role,
permission: true,
},
],
token: token,
})
14 replies
DIAdiscord.js - Imagine an app
Created by Ypsilon on 12/23/2024 in #djs-questions
client.application.commands.permissions.set(), 401: Unauthorized
I want to use role permissions
14 replies
DIAdiscord.js - Imagine an app
Created by Ypsilon on 12/23/2024 in #djs-questions
client.application.commands.permissions.set(), 401: Unauthorized
Well needing an Oauth token for this complicates stuff 😅
14 replies
DIAdiscord.js - Imagine an app
Created by Ypsilon on 12/23/2024 in #djs-questions
client.application.commands.permissions.set(), 401: Unauthorized
No description
14 replies
DIAdiscord.js - Imagine an app
Created by Ypsilon on 10/7/2023 in #djs-questions
Embed Thumbnail not showing
I have tried other links just from google and such haven't gottin it to work but I kind of gave up tbh. Srry didn't i was tagged
9 replies
DIAdiscord.js - Imagine an app
Created by Ypsilon on 8/28/2022 in #djs-questions
Import all commands from folder with ES modules
Thank you @qjuh How I have it now and working
import path from 'path';
import { readdirSync } from 'fs';

const cmdList = [];
const cmdFiles = readdirSync(path.resolve('./discord/commands'));

for (const file of cmdFiles) {
const cmd = (await import(`../discord/commands/${file}`)).default
cmdList.push(cmd)
}

console.log(cmdList);
import path from 'path';
import { readdirSync } from 'fs';

const cmdList = [];
const cmdFiles = readdirSync(path.resolve('./discord/commands'));

for (const file of cmdFiles) {
const cmd = (await import(`../discord/commands/${file}`)).default
cmdList.push(cmd)
}

console.log(cmdList);
Again my apologies.
17 replies
DIAdiscord.js - Imagine an app
Created by Ypsilon on 8/28/2022 in #djs-questions
Import all commands from folder with ES modules
Sorry
17 replies
DIAdiscord.js - Imagine an app
Created by Ypsilon on 8/28/2022 in #djs-questions
Import all commands from folder with ES modules
My apologies I saw it wrong i get what you are saying now thank you.
17 replies
DIAdiscord.js - Imagine an app
Created by Ypsilon on 8/28/2022 in #djs-questions
Import all commands from folder with ES modules
import { readdirSync } from 'fs'

const commands = readdirSync('../discord/commands')
console.log(commands);
import { readdirSync } from 'fs'

const commands = readdirSync('../discord/commands')
console.log(commands);
doesnt even work in ES6 😦
17 replies
DIAdiscord.js - Imagine an app
Created by Ypsilon on 8/28/2022 in #djs-questions
Import all commands from folder with ES modules
If only you could just import a folder... 😦 but I just read in the nodejs docs its not possible Sadge
17 replies
DIAdiscord.js - Imagine an app
Created by Ypsilon on 8/28/2022 in #djs-questions
Import all commands from folder with ES modules
17 replies
DIAdiscord.js - Imagine an app
Created by Ypsilon on 8/28/2022 in #djs-questions
Import all commands from folder with ES modules
yes but
17 replies
DIAdiscord.js - Imagine an app
Created by Ypsilon on 8/28/2022 in #djs-questions
Import all commands from folder with ES modules
for (const fileSlash of slashCommandFiles) {
import command from `../discord/commands/${fileSlash}`
commandsList.push(commandSlash.commands)
}
for (const fileSlash of slashCommandFiles) {
import command from `../discord/commands/${fileSlash}`
commandsList.push(commandSlash.commands)
}
import like this just wont work or am I just doing something wrong. But can't an import just be used at the beginning ?
17 replies
DIAdiscord.js - Imagine an app
Created by Ypsilon on 8/22/2022 in #djs-questions
Can't get permissions on interaction command working
Ok that seems to work now thank you very much @jiralite
4 replies