digimbyte
digimbyte
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
the entire point of forums is to categorize and discuss on particular issues compared to standard conversation threads.
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
there are no typings being detected from https-only and so running tsc throws the same error as above
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
A) because this is the most recent and ONLY conversation with https-only in a ts environment B) from 'npm create discord-bot' with typescript
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
for now, I asked chatGPT to fix it by not using https-only not sure how the library works or if this even works as GPT is cancer please correct me if its wrong
import { URL } from 'node:url';
import { REST } from 'discord.js';
import { loadCommands } from './loaders.js';

const commands = await loadCommands(new URL('commands/', import.meta.url));
const commandData = [...commands.values()].map((command) => command.data);

const rest = new REST({ version: '10' }).setToken(process.env.TOKEN!);

// Register global commands
const result = await rest.put('/applications/{application.id}/commands', {
body: commandData,
});

console.log(`Successfully registered ${result} commands.`);
import { URL } from 'node:url';
import { REST } from 'discord.js';
import { loadCommands } from './loaders.js';

const commands = await loadCommands(new URL('commands/', import.meta.url));
const commandData = [...commands.values()].map((command) => command.data);

const rest = new REST({ version: '10' }).setToken(process.env.TOKEN!);

// Register global commands
const result = await rest.put('/applications/{application.id}/commands', {
body: commandData,
});

console.log(`Successfully registered ${result} 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
default utils from repo template
import process from 'node:process';
import { URL } from 'node:url';
import { API } from '@discordjs/core/http-only';
import { REST } from 'discord.js';
import { loadCommands } from './loaders.js';

const commands = await loadCommands(new URL('commands/', import.meta.url));
const commandData = [...commands.values()].map((command) => command.data);

const rest = new REST({ version: '10' }).setToken(process.env.TOKEN!);
const api = new API(rest);

const result = await api.applicationCommands.bulkOverwriteGlobalCommands(process.env.APPLICATION_ID!, commandData);

console.log(`Successfully registered ${result.length} commands.`);
import process from 'node:process';
import { URL } from 'node:url';
import { API } from '@discordjs/core/http-only';
import { REST } from 'discord.js';
import { loadCommands } from './loaders.js';

const commands = await loadCommands(new URL('commands/', import.meta.url));
const commandData = [...commands.values()].map((command) => command.data);

const rest = new REST({ version: '10' }).setToken(process.env.TOKEN!);
const api = new API(rest);

const result = await api.applicationCommands.bulkOverwriteGlobalCommands(process.env.APPLICATION_ID!, commandData);

console.log(`Successfully registered ${result.length} 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
No description
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 restarted the ts server with no fix, I have updated the core install to 1.0.1 to ensure REST is updated for commands. any insight into fixes from the create-bot solution?
19 replies
TIPThe Iris Project
Created by sabbycat🌞 on 6/28/2023 in #iris-issues
"A Java Exception Has Occurred"
how did you fix it?
8 replies
TIPThe Iris Project
Created by Mister X on 6/18/2023 in #iris-issues
the website is not available
No description
6 replies