b1nzee
b1nzee
SIASapphire - Imagine a framework
Created by b1nzee on 3/12/2024 in #sapphire-support
Subcommands Not Working
No description
99 replies
SIASapphire - Imagine a framework
Created by b1nzee on 2/8/2024 in #sapphire-support
Issue with @sapphire/plugin-api
Hello, I have installed @sapphire/plugin-api using the following command:
npm i @sapphire/plugin-api
npm i @sapphire/plugin-api
The install went fine, but intellisense is not showing "api" in my ClientOptions, instead I am getting this error:
Object literal may only specify known properties, and 'api' does not exist in type 'ClientOptions'.
Object literal may only specify known properties, and 'api' does not exist in type 'ClientOptions'.
This is my package.json :
{
"name": "discord-bot",
"version": "1.0.0",
"description": "",
"main": "dist/index.js",
"scripts": {
"build": "swc src -d dist --config-file config.swcrc",
"start": "npm run build && node dist/index.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@swc/cli": "^0.1.63",
"@swc/core": "^1.3.102"
},
"dependencies": {
"@prisma/client": "^5.8.1",
"@sapphire/decorators": "^6.0.3",
"@sapphire/framework": "^5.0.6",
"@sapphire/plugin-api": "^6.1.1",
"@sapphire/plugin-subcommands": "^6.0.2",
"@sapphire/time-utilities": "^1.7.11",
"canvas": "^2.11.2",
"common-tags": "^1.8.2",
"discord.js": "^14.14.1",
"dot-prop": "^6.0.1",
"dotenv": "^16.3.1",
"ms": "^2.1.3",
"node-cron": "^3.0.3",
"prisma": "^5.8.1",
"ws": "^8.16.0"
}
}
{
"name": "discord-bot",
"version": "1.0.0",
"description": "",
"main": "dist/index.js",
"scripts": {
"build": "swc src -d dist --config-file config.swcrc",
"start": "npm run build && node dist/index.js"
},
"keywords": [],
"author": "",
"license": "ISC",
"devDependencies": {
"@swc/cli": "^0.1.63",
"@swc/core": "^1.3.102"
},
"dependencies": {
"@prisma/client": "^5.8.1",
"@sapphire/decorators": "^6.0.3",
"@sapphire/framework": "^5.0.6",
"@sapphire/plugin-api": "^6.1.1",
"@sapphire/plugin-subcommands": "^6.0.2",
"@sapphire/time-utilities": "^1.7.11",
"canvas": "^2.11.2",
"common-tags": "^1.8.2",
"discord.js": "^14.14.1",
"dot-prop": "^6.0.1",
"dotenv": "^16.3.1",
"ms": "^2.1.3",
"node-cron": "^3.0.3",
"prisma": "^5.8.1",
"ws": "^8.16.0"
}
}
I tried reinstalling my node modules.
6 replies
SIASapphire - Imagine a framework
Created by b1nzee on 8/5/2023 in #sapphire-support
Deleting Buttons
Hello, I have a chat input command which sends a confirmation embed (this contains a confirm and deny button), which this is part of the ChatInputCommandInteraction I have the confirm button handler in my "interaction-handlers" directory which handles the button click. On the button click, I want to delete the action row from the ChatInputCommandInteraction, however, I only have access to the ButtonInteraction within the button handler which is a separate interaction. What is the cleanest / most efficient way to achieve this?
21 replies
SIASapphire - Imagine a framework
Created by b1nzee on 5/27/2023 in #sapphire-support
Plugin API - Cookie Not Setting
Hello, I am having an issue where the cookie for OAuth2 authentication is not setting in the browser, this is in a production environment. Here is my config:
{
listenOptions: { port: 1565 },
auth: {
id: '1109280195862605964',
secret: 'REDACTED',
scopes: [ 'identify' ],
cookie: 'REVELATIONS_AUTH',
redirect: 'https://revelations.gg/oauth/authorize',
domainOverwrite: '.revelations.gg'
},
prefix: '/',
origin: 'https://revelations.gg'
}
{
listenOptions: { port: 1565 },
auth: {
id: '1109280195862605964',
secret: 'REDACTED',
scopes: [ 'identify' ],
cookie: 'REVELATIONS_AUTH',
redirect: 'https://revelations.gg/oauth/authorize',
domainOverwrite: '.revelations.gg'
},
prefix: '/',
origin: 'https://revelations.gg'
}
I have also set NODE_ENV="production" in my .env file to ensure the Secure cookie. Upon making a request to https://api.revelations.gg/oauth/callback, I can see a Set-Cookie header is indeed returned but it's not setting in the browser.
3 replies
SIASapphire - Imagine a framework
Created by b1nzee on 5/26/2023 in #sapphire-support
Multiple CORS Origins
Hello, With @sapphire/plugin-api, can you define multiple CORS origins? If so, how would I do this? Because using "*" still gives me a CORS error in browser and I can only define 1 origin by looks of things in the config.
4 replies
SIASapphire - Imagine a framework
Created by b1nzee on 5/23/2023 in #sapphire-support
Context Menu Commands Lowercase Name
Hello, I have noticed when creating a context menu command, despite me writing "Warn" as the command name in the code, it appears as "warn" on the actual context menu.
6 replies