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",
|
"biomejs.biome",
|
||||||
"orta.vscode-twoslash-queries",
|
"orta.vscode-twoslash-queries",
|
||||||
"eamodio.gitlens",
|
"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
|
pnpm add seyfert
|
||||||
```
|
```
|
||||||
|
|
||||||
|
```sh
|
||||||
|
deno add npm:seyfert
|
||||||
|
```
|
||||||
|
|
||||||
```sh
|
```sh
|
||||||
bun add seyfert
|
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)
|
- [npm - core](https://www.npmjs.com/package/seyfert)
|
||||||
- [Website](https://seyfert.dev)
|
- [Website](https://seyfert.dev)
|
||||||
- [Documentation](https://docs.seyfert.dev)
|
- [Documentation](https://docs.seyfert.dev)
|
||||||
|
|
||||||
|

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