mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-01 12:36:08 +00:00
fix: allowed_mentions types
This commit is contained in:
parent
c014ce6dc1
commit
1e0d1f3f6b
4
.vscode/extensions.json
vendored
4
.vscode/extensions.json
vendored
@ -3,6 +3,8 @@
|
||||
"biomejs.biome",
|
||||
"orta.vscode-twoslash-queries",
|
||||
"eamodio.gitlens",
|
||||
"yoavbls.pretty-ts-errors"
|
||||
"yoavbls.pretty-ts-errors",
|
||||
"usernamehw.errorlens",
|
||||
"better-ts-errors.better-ts-errors"
|
||||
]
|
||||
}
|
||||
|
@ -33,6 +33,10 @@ There are many reasons to use Seyfert, but they dont all fit in this tiny readme
|
||||
pnpm add seyfert
|
||||
```
|
||||
|
||||
```sh
|
||||
deno add npm:seyfert
|
||||
```
|
||||
|
||||
```sh
|
||||
bun add seyfert
|
||||
```
|
||||
@ -52,3 +56,5 @@ We are open to contributions, fork the repo and make your changes!
|
||||
- [npm - core](https://www.npmjs.com/package/seyfert)
|
||||
- [Website](https://seyfert.dev)
|
||||
- [Documentation](https://docs.seyfert.dev)
|
||||
|
||||

|
||||
|
@ -134,7 +134,7 @@ export class BaseClient {
|
||||
permissions,
|
||||
);
|
||||
},
|
||||
onInternalError(client: UsingClient, command, error?: unknown): any {
|
||||
onInternalError(client: UsingClient, command, error: unknown): any {
|
||||
client.logger.fatal(`${command.name}.<onInternalError>`, error);
|
||||
},
|
||||
},
|
||||
@ -147,7 +147,7 @@ export class BaseClient {
|
||||
onMiddlewaresError(context: ComponentContext, error: string): any {
|
||||
context.client.logger.fatal('ComponentCommand.<onMiddlewaresError>', context.author.id, error);
|
||||
},
|
||||
onInternalError(client: UsingClient, error?: unknown): any {
|
||||
onInternalError(client: UsingClient, error: unknown): any {
|
||||
client.logger.fatal(error);
|
||||
},
|
||||
},
|
||||
@ -155,12 +155,12 @@ export class BaseClient {
|
||||
modals: {
|
||||
defaults: {
|
||||
onRunError(context: ModalContext, error: unknown): any {
|
||||
context.client.logger.fatal('ComponentCommand.<onRunError>', context.author.id, error);
|
||||
context.client.logger.fatal('ModalCommand.<onRunError>', context.author.id, error);
|
||||
},
|
||||
onMiddlewaresError(context: ModalContext, error: string): any {
|
||||
context.client.logger.fatal('ComponentCommand.<onMiddlewaresError>', context.author.id, error);
|
||||
context.client.logger.fatal('ModalCommand.<onMiddlewaresError>', context.author.id, error);
|
||||
},
|
||||
onInternalError(client: UsingClient, error?: unknown): any {
|
||||
onInternalError(client: UsingClient, error: unknown): any {
|
||||
client.logger.fatal(error);
|
||||
},
|
||||
},
|
||||
@ -471,7 +471,6 @@ export interface BaseClientOptions {
|
||||
defaults?: {
|
||||
onRunError?: (context: MenuCommandContext<any, never> | CommandContext, error: unknown) => unknown;
|
||||
onPermissionsFail?: Command['onPermissionsFail'];
|
||||
|
||||
onBotPermissionsFail?: (
|
||||
context: MenuCommandContext<any, never> | CommandContext,
|
||||
permissions: PermissionStrings,
|
||||
@ -503,9 +502,7 @@ export interface BaseClientOptions {
|
||||
onAfterRun?: ModalCommand['onAfterRun'];
|
||||
};
|
||||
};
|
||||
allowedMentions?: Omit<NonNullable<RESTPostAPIChannelMessageJSONBody['allowed_mentions']>, 'parse'> & {
|
||||
parse?: ('everyone' | 'roles' | 'users')[]; //nice types, d-api
|
||||
};
|
||||
allowedMentions?: RESTPostAPIChannelMessageJSONBody['allowed_mentions'];
|
||||
getRC?(): Awaitable<InternalRuntimeConfig | InternalRuntimeConfigHTTP>;
|
||||
}
|
||||
|
||||
|
@ -1500,7 +1500,7 @@ export interface APIAllowedMentions {
|
||||
*
|
||||
* See https://discord.com/developers/docs/resources/channel#allowed-mentions-object-allowed-mention-types
|
||||
*/
|
||||
parse?: AllowedMentionsTypes[];
|
||||
parse?: `${AllowedMentionsTypes}`[];
|
||||
/**
|
||||
* Array of role_ids to mention (Max size of 100)
|
||||
*/
|
||||
|
@ -1,4 +1,4 @@
|
||||
const { Client } = require('../lib')
|
||||
const { Client } = require('../lib');
|
||||
const { GatewayIntentBits } = require('../lib/types');
|
||||
|
||||
const token = process.env.BOT_TOKEN;
|
||||
@ -26,5 +26,5 @@ client.events.onFail = (event, err) => {
|
||||
client.start().then(() => {
|
||||
setTimeout(() => {
|
||||
process.exit(0);
|
||||
}, 15_000 * client.gateway.totalShards)
|
||||
}, 15_000 * client.gateway.totalShards);
|
||||
});
|
Loading…
x
Reference in New Issue
Block a user