im6_
im6_
DIAdiscord.js - Imagine an app
Created by im6_ on 6/19/2023 in #djs-questions
Module Not Found errors, trying to use @discordjs/core v0.6.0 with nextjs v13.4.6
THANKS THOUGH!!!!!!!!!!!!!!!!!!!!!!!!
19 replies
DIAdiscord.js - Imagine an app
Created by im6_ on 6/19/2023 in #djs-questions
Module Not Found errors, trying to use @discordjs/core v0.6.0 with nextjs v13.4.6
uh really really really sorry for the annoyance, restarting ts-server fixed.. also wanted to ask one more thing, I want to use CLIENT_ID and CLIENT_SECRET only for retrieving global/guild commands? can I initiate the REST client without token Thinkeng nvm figured it
19 replies
DIAdiscord.js - Imagine an app
Created by im6_ on 6/19/2023 in #djs-questions
Module Not Found errors, trying to use @discordjs/core v0.6.0 with nextjs v13.4.6
Ok so I realised that it indeed export http-only, it's just that there are no types exported with it
const {REST} = require('@discordjs/rest')
const {API} = require('@discordjs/core/http-only')
const rest = new REST({ version: '10'}).setToken("sd")
const api = new API(rest);
const commands = api.applicationCommands.getGlobalCommands('1117540238961692773')
console.log(commands)
const {REST} = require('@discordjs/rest')
const {API} = require('@discordjs/core/http-only')
const rest = new REST({ version: '10'}).setToken("sd")
const api = new API(rest);
const commands = api.applicationCommands.getGlobalCommands('1117540238961692773')
console.log(commands)
this js code works in a completely new project (only @discordjs/core installed), though it doesn't throw any Module-Not-Found Errors without using http-only
19 replies
DIAdiscord.js - Imagine an app
Created by im6_ on 6/19/2023 in #djs-questions
Module Not Found errors, trying to use @discordjs/core v0.6.0 with nextjs v13.4.6
while trying to import api
import {API} from '@discordjs/core/http-only';
import {API} from '@discordjs/core/http-only';
ts throws the error
19 replies
DIAdiscord.js - Imagine an app
Created by im6_ on 6/19/2023 in #djs-questions
Module Not Found errors, trying to use @discordjs/core v0.6.0 with nextjs v13.4.6
I'm sharing my tsconfig and package.json too, if this might be the missing key
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"plugins": [
{
"name": "next"
}
],
"paths": {
"@/*": ["./*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}
{
"compilerOptions": {
"target": "es5",
"lib": ["dom", "dom.iterable", "esnext"],
"allowJs": true,
"skipLibCheck": true,
"strict": true,
"forceConsistentCasingInFileNames": true,
"noEmit": true,
"esModuleInterop": true,
"module": "esnext",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "preserve",
"incremental": true,
"plugins": [
{
"name": "next"
}
],
"paths": {
"@/*": ["./*"]
}
},
"include": ["next-env.d.ts", "**/*.ts", "**/*.tsx", ".next/types/**/*.ts"],
"exclude": ["node_modules"]
}
{
"name": "proj2",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@discordjs/core": "^0.6.0",
"@types/node": "20.3.1",
"@types/react": "18.2.13",
"@types/react-dom": "18.2.6",
"autoprefixer": "10.4.14",
"eslint": "8.43.0",
"eslint-config-next": "13.4.6",
"next": "13.4.6",
"postcss": "8.4.24",
"react": "18.2.0",
"react-dom": "18.2.0",
"tailwindcss": "3.3.2",
"typescript": "5.1.3"
}
}
{
"name": "proj2",
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"start": "next start",
"lint": "next lint"
},
"dependencies": {
"@discordjs/core": "^0.6.0",
"@types/node": "20.3.1",
"@types/react": "18.2.13",
"@types/react-dom": "18.2.6",
"autoprefixer": "10.4.14",
"eslint": "8.43.0",
"eslint-config-next": "13.4.6",
"next": "13.4.6",
"postcss": "8.4.24",
"react": "18.2.0",
"react-dom": "18.2.0",
"tailwindcss": "3.3.2",
"typescript": "5.1.3"
}
}
19 replies
DIAdiscord.js - Imagine an app
Created by im6_ on 6/19/2023 in #djs-questions
Module Not Found errors, trying to use @discordjs/core v0.6.0 with nextjs v13.4.6
Package path ./dist/http-only is not exported from package C:\Users\{name}\OneDrive\Desktop\po\proj2\node_modules\@discordjs\core
Package path ./dist/http-only is not exported from package C:\Users\{name}\OneDrive\Desktop\po\proj2\node_modules\@discordjs\core
19 replies
DIAdiscord.js - Imagine an app
Created by im6_ on 6/19/2023 in #djs-questions
Module Not Found errors, trying to use @discordjs/core v0.6.0 with nextjs v13.4.6
and @discordjs/core/dist/http-only which exists doesn't export a package
19 replies
DIAdiscord.js - Imagine an app
Created by im6_ on 6/19/2023 in #djs-questions
Module Not Found errors, trying to use @discordjs/core v0.6.0 with nextjs v13.4.6
http-only doesn't seem be a valid directory
Cannot find module '@discordjs/core/http-only' or its corresponding type declarations.
Cannot find module '@discordjs/core/http-only' or its corresponding type declarations.
19 replies
DIAdiscord.js - Imagine an app
Created by im6_ on 6/19/2023 in #djs-questions
Module Not Found errors, trying to use @discordjs/core v0.6.0 with nextjs v13.4.6
I don't know what is the http-only version, but simply I just want to deal with setting and getting ApplicationCommands, both guild and global commands
19 replies
DIAdiscord.js - Imagine an app
Created by im6_ on 6/19/2023 in #djs-questions
Module Not Found errors, trying to use @discordjs/core v0.6.0 with nextjs v13.4.6
node version is v20.3.0, forgot to mention
19 replies