mirror of
https://github.com/tiramisulabs/seyfert.git
synced 2025-07-03 05:26:07 +00:00
formatting
This commit is contained in:
parent
482893a9ea
commit
c13d9b239f
@ -101,7 +101,7 @@ export class Member implements Model {
|
|||||||
let url: string;
|
let url: string;
|
||||||
|
|
||||||
if (this.user.bot) {
|
if (this.user.bot) {
|
||||||
return this.user.avatarURL()
|
return this.user.avatarURL();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!this.avatarHash) {
|
if (!this.avatarHash) {
|
||||||
@ -110,7 +110,7 @@ export class Member implements Model {
|
|||||||
url = Routes.USER_AVATAR(this.user.id, iconBigintToHash(this.avatarHash));
|
url = Routes.USER_AVATAR(this.user.id, iconBigintToHash(this.avatarHash));
|
||||||
}
|
}
|
||||||
|
|
||||||
return formatImageURL(url, options.size, options.format)
|
return formatImageURL(url, options.size, options.format);
|
||||||
}
|
}
|
||||||
|
|
||||||
toString() {
|
toString() {
|
||||||
|
@ -1,21 +1,17 @@
|
|||||||
import type {
|
import type { DiscordEmbed, DiscordEmbedField, DiscordEmbedProvider } from "../../vendor/external.ts";
|
||||||
DiscordEmbedField,
|
|
||||||
DiscordEmbed,
|
|
||||||
DiscordEmbedProvider
|
|
||||||
} from '../../vendor/external.ts';
|
|
||||||
|
|
||||||
export interface EmbedFooter {
|
export interface EmbedFooter {
|
||||||
text: string;
|
text: string;
|
||||||
iconUrl?: string;
|
iconUrl?: string;
|
||||||
proxyIconUrl?: string
|
proxyIconUrl?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface EmbedAuthor {
|
export interface EmbedAuthor {
|
||||||
name: string
|
name: string;
|
||||||
text?: string;
|
text?: string;
|
||||||
url?: string;
|
url?: string;
|
||||||
iconUrl?: string;
|
iconUrl?: string;
|
||||||
proxyIconUrl?: string
|
proxyIconUrl?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface EmbedVideo {
|
export interface EmbedVideo {
|
||||||
@ -26,10 +22,10 @@ export interface EmbedVideo {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export class EmbedBuilder {
|
export class EmbedBuilder {
|
||||||
#data: DiscordEmbed
|
#data: DiscordEmbed;
|
||||||
constructor(data: DiscordEmbed = {}) {
|
constructor(data: DiscordEmbed = {}) {
|
||||||
this.#data = data;
|
this.#data = data;
|
||||||
if (!this.#data.fields) this.#data.fields = []
|
if (!this.#data.fields) this.#data.fields = [];
|
||||||
}
|
}
|
||||||
|
|
||||||
setAuthor(author: EmbedAuthor) {
|
setAuthor(author: EmbedAuthor) {
|
||||||
@ -37,7 +33,7 @@ export class EmbedBuilder {
|
|||||||
name: author.name,
|
name: author.name,
|
||||||
icon_url: author.iconUrl,
|
icon_url: author.iconUrl,
|
||||||
proxy_icon_url: author.proxyIconUrl,
|
proxy_icon_url: author.proxyIconUrl,
|
||||||
url: author.url
|
url: author.url,
|
||||||
};
|
};
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
@ -102,7 +98,7 @@ export class EmbedBuilder {
|
|||||||
height: video.height,
|
height: video.height,
|
||||||
proxy_url: video.proxyUrl,
|
proxy_url: video.proxyUrl,
|
||||||
url: video.url,
|
url: video.url,
|
||||||
width: video.width
|
width: video.width,
|
||||||
};
|
};
|
||||||
return this;
|
return this;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user