Sheiylanie
Sheiylanie
SIASapphire - Imagine a framework
Created by Sheiylanie on 11/14/2024 in #discordjs-support
Profile Color Member
hi, can someone tell me how to retrieve the primary color code of the user profile and not banner ?
2 replies
SIASapphire - Imagine a framework
Created by Sheiylanie on 11/6/2024 in #sapphire-support
@sapphire/plugin-api Methods Error
🆘 Hi, here's the problem I'm having. 📌 Can you help me solve this problem ? #️⃣ My code :
import { ApplyOptions } from '@sapphire/decorators';
import { Route, methods, type ApiRequest, type ApiResponse } from '@sapphire/plugin-api';

@ApplyOptions<Route.Options>({ route: 'hello-world' })
export class UserRoute extends Route {
public override [methods.GET](_request: ApiRequest, response: ApiResponse) {
response.json({ message: 'Hello World' });
}

public override [methods.POST](_request: ApiRequest, response: ApiResponse) {
response.json({ message: 'Hello World' });
}
}
import { ApplyOptions } from '@sapphire/decorators';
import { Route, methods, type ApiRequest, type ApiResponse } from '@sapphire/plugin-api';

@ApplyOptions<Route.Options>({ route: 'hello-world' })
export class UserRoute extends Route {
public override [methods.GET](_request: ApiRequest, response: ApiResponse) {
response.json({ message: 'Hello World' });
}

public override [methods.POST](_request: ApiRequest, response: ApiResponse) {
response.json({ message: 'Hello World' });
}
}
🛑 Error :
[{
“resource": ‘/E:/Test/dev_bot/src/routes/hello-world.ts’,
“owner": ‘typescript’,
“code": ‘2305’,
“severity": 8,
“message“: ‘The module ’\”@sapphire/plugin-api\“‘ has no exported member ’methods'.”,
“source": ‘ts’,
“startLineNumber": 2,
“startColumn": 17,
“endLineNumber": 2,
“endColumn": 24
},{
“resource": ‘/E:/Test/dev_bot/src/routes/hello-world.ts’,
“owner": ‘typescript’,
“code": ‘2515’,
“severity": 8,
“message“: ‘The non-abstract class ’UserRoute” does not implement the abstract member “run” inherited from the class “Route<RouteOptions>”.”,
“source": ‘ts’,
“startLineNumber": 5,
“startColumn": 14,
“endLineNumber": 5,
“endColumn": 23
}]
[{
“resource": ‘/E:/Test/dev_bot/src/routes/hello-world.ts’,
“owner": ‘typescript’,
“code": ‘2305’,
“severity": 8,
“message“: ‘The module ’\”@sapphire/plugin-api\“‘ has no exported member ’methods'.”,
“source": ‘ts’,
“startLineNumber": 2,
“startColumn": 17,
“endLineNumber": 2,
“endColumn": 24
},{
“resource": ‘/E:/Test/dev_bot/src/routes/hello-world.ts’,
“owner": ‘typescript’,
“code": ‘2515’,
“severity": 8,
“message“: ‘The non-abstract class ’UserRoute” does not implement the abstract member “run” inherited from the class “Route<RouteOptions>”.”,
“source": ‘ts’,
“startLineNumber": 5,
“startColumn": 14,
“endLineNumber": 5,
“endColumn": 23
}]
8 replies