mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-04 22:16:08 +00:00
fix: logicals symbols errors
This commit is contained in:
parent
35a068cc96
commit
8fedad76a6
@ -67,7 +67,7 @@ export class Application implements Model {
|
||||
this.session = session;
|
||||
|
||||
this.name = data.name;
|
||||
this.icon = data.icon || undefined;
|
||||
this.icon = data.icon ?? undefined;
|
||||
this.description = data.description;
|
||||
this.rpcOrigins = data.rpc_origins;
|
||||
this.botPublic = data.bot_public;
|
||||
|
@ -161,7 +161,7 @@ export class SelectMenu extends BaseComponent implements SelectMenuComponent {
|
||||
return <SelectMenuOption>{
|
||||
label: option.label,
|
||||
description: option.description,
|
||||
emoji: option.emoji || new Emoji(session, option.emoji!),
|
||||
emoji: option.emoji ? new Emoji(session, option.emoji) : undefined,
|
||||
value: option.value,
|
||||
};
|
||||
});
|
||||
|
@ -70,7 +70,7 @@ export function NewMessageReactionAdd(
|
||||
? new Member(
|
||||
session,
|
||||
data.member as DiscordMemberWithUser,
|
||||
data.guild_id || ''
|
||||
data.guild_id ?? ''
|
||||
)
|
||||
: undefined,
|
||||
emoji: new Emoji(session, data.emoji),
|
||||
|
@ -74,7 +74,7 @@ export type ImageSize = 16 | 32 | 64 | 128 | 256 | 512 | 1024 | 2048 | 4096;
|
||||
*/
|
||||
export abstract class Util {
|
||||
static formatImageURL(url: string, size: ImageSize = 128, format?: ImageFormat): string {
|
||||
return `${url}.${format || (url.includes('/a_') ? 'gif' : 'jpg')}?size=${size}`;
|
||||
return `${url}.${format ?? (url.includes('/a_') ? 'gif' : 'jpg')}?size=${size}`;
|
||||
}
|
||||
|
||||
static iconHashToBigInt(hash: string): bigint {
|
||||
|
Loading…
x
Reference in New Issue
Block a user