andy
andy
DIAdiscord.js - Imagine an app
Created by andy on 4/3/2024 in #djs-questions
How to make an "Authorized App"?
thank you <3
25 replies
DIAdiscord.js - Imagine an app
Created by andy on 4/3/2024 in #djs-questions
How to make an "Authorized App"?
seems to have worked :]
25 replies
DIAdiscord.js - Imagine an app
Created by andy on 4/3/2024 in #djs-questions
How to make an "Authorized App"?
No description
25 replies
DIAdiscord.js - Imagine an app
Created by andy on 4/3/2024 in #djs-questions
How to make an "Authorized App"?
gotcha, one sec
25 replies
DIAdiscord.js - Imagine an app
Created by andy on 4/3/2024 in #djs-questions
How to make an "Authorized App"?
No description
25 replies
DIAdiscord.js - Imagine an app
Created by andy on 4/3/2024 in #djs-questions
How to make an "Authorized App"?
and it works fine if i use it in the bot DM channel
25 replies
DIAdiscord.js - Imagine an app
Created by andy on 4/3/2024 in #djs-questions
How to make an "Authorized App"?
that's the function i'm calling with the "slash command"
25 replies
DIAdiscord.js - Imagine an app
Created by andy on 4/3/2024 in #djs-questions
How to make an "Authorized App"?
async function query(interaction, getBotReply, model) {
const reply = await interaction.reply({ content: "Thinking...", fetchReply: true })
const prompt = await interaction.options.getString('prompt');
const res = await getBotReply(model, [prompt]);
if (res.error) {
utils.system.logger("There seems to have been an error. Check for details.", "red", "bold");
return await reply.edit(`There seems to have been an error. Please try again, or contact @lancito01 if the issue persists.\nError details:\n\`\`\`${res.error}\`\`\``);
}
return await reply.edit({ content: res.replyText, ephemeral: false });
}
async function query(interaction, getBotReply, model) {
const reply = await interaction.reply({ content: "Thinking...", fetchReply: true })
const prompt = await interaction.options.getString('prompt');
const res = await getBotReply(model, [prompt]);
if (res.error) {
utils.system.logger("There seems to have been an error. Check for details.", "red", "bold");
return await reply.edit(`There seems to have been an error. Please try again, or contact @lancito01 if the issue persists.\nError details:\n\`\`\`${res.error}\`\`\``);
}
return await reply.edit({ content: res.replyText, ephemeral: false });
}
25 replies
DIAdiscord.js - Imagine an app
Created by andy on 4/3/2024 in #djs-questions
How to make an "Authorized App"?
alrighty, one sec
25 replies
DIAdiscord.js - Imagine an app
Created by andy on 4/3/2024 in #djs-questions
How to make an "Authorized App"?
what do you mean? i'm editing the message, which i tried before and it works
25 replies
DIAdiscord.js - Imagine an app
Created by andy on 4/3/2024 in #djs-questions
How to make an "Authorized App"?
{
"name": "query",
"description": "Runs a query on the AI",
"options": [
{
"name": "prompt",
"description": "The prompt to use",
"type": 3,
"required": true
}
],
"integration_types": [
1
],
"contexts": [
0,
1,
2
]
}
{
"name": "query",
"description": "Runs a query on the AI",
"options": [
{
"name": "prompt",
"description": "The prompt to use",
"type": 3,
"required": true
}
],
"integration_types": [
1
],
"contexts": [
0,
1,
2
]
}
25 replies
DIAdiscord.js - Imagine an app
Created by andy on 4/3/2024 in #djs-questions
How to make an "Authorized App"?
here's the JSON i used to create it:
25 replies
DIAdiscord.js - Imagine an app
Created by andy on 4/3/2024 in #djs-questions
How to make an "Authorized App"?
it's a user app
25 replies
DIAdiscord.js - Imagine an app
Created by andy on 4/3/2024 in #djs-questions
How to make an "Authorized App"?
DiscordAPIError[50001]: Missing Access
at handleErrors (D:\Andy\Coding\AndyBot\node_modules\@discordjs\rest\dist\index.js:687:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.runRequest (D:\Andy\Coding\AndyBot\node_modules\@discordjs\rest\dist\index.js:1072:23)
at async SequentialHandler.queueRequest (D:\Andy\Coding\AndyBot\node_modules\@discordjs\rest\dist\index.js:913:14)
at async _REST.request (D:\Andy\Coding\AndyBot\node_modules\@discordjs\rest\dist\index.js:1218:22)
at async DMMessageManager.edit (D:\Andy\Coding\AndyBot\node_modules\discord.js\src\managers\MessageManager.js:177:15
)
at async Object.query (D:\Andy\Coding\AndyBot\functions\slashCommands.js:181:12)
at async Client.<anonymous> (D:\Andy\Coding\AndyBot\index.js:124:13) {
requestBody: {
files: [],
json: {
content: 'bla bla',
tts: false,
nonce: undefined,
embeds: undefined,
components: undefined,
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
flags: 0,
message_reference: undefined,
attachments: undefined,
sticker_ids: undefined,
thread_name: undefined
}
},
rawError: { message: 'Missing Access', code: 50001 },
code: 50001,
status: 403,
method: 'PATCH',
url: 'https://discord.com/api/v10/channels/862374724154556426/messages/1225191651144892518'
}
DiscordAPIError[50001]: Missing Access
at handleErrors (D:\Andy\Coding\AndyBot\node_modules\@discordjs\rest\dist\index.js:687:13)
at process.processTicksAndRejections (node:internal/process/task_queues:95:5)
at async SequentialHandler.runRequest (D:\Andy\Coding\AndyBot\node_modules\@discordjs\rest\dist\index.js:1072:23)
at async SequentialHandler.queueRequest (D:\Andy\Coding\AndyBot\node_modules\@discordjs\rest\dist\index.js:913:14)
at async _REST.request (D:\Andy\Coding\AndyBot\node_modules\@discordjs\rest\dist\index.js:1218:22)
at async DMMessageManager.edit (D:\Andy\Coding\AndyBot\node_modules\discord.js\src\managers\MessageManager.js:177:15
)
at async Object.query (D:\Andy\Coding\AndyBot\functions\slashCommands.js:181:12)
at async Client.<anonymous> (D:\Andy\Coding\AndyBot\index.js:124:13) {
requestBody: {
files: [],
json: {
content: 'bla bla',
tts: false,
nonce: undefined,
embeds: undefined,
components: undefined,
username: undefined,
avatar_url: undefined,
allowed_mentions: undefined,
flags: 0,
message_reference: undefined,
attachments: undefined,
sticker_ids: undefined,
thread_name: undefined
}
},
rawError: { message: 'Missing Access', code: 50001 },
code: 50001,
status: 403,
method: 'PATCH',
url: 'https://discord.com/api/v10/channels/862374724154556426/messages/1225191651144892518'
}
do you recognize it?
25 replies
DIAdiscord.js - Imagine an app
Created by andy on 4/3/2024 in #djs-questions
How to make an "Authorized App"?
so i think i figured it out, but i'm getting an error i've never seen before 🤔
25 replies
DIAdiscord.js - Imagine an app
Created by andy on 4/3/2024 in #djs-questions
How to make an "Authorized App"?
gotcha, i appreciate it so much. is there an estimated time for when discord.js will support them? i'm assuming when it gets out of beta?
25 replies