mirror of
https://github.com/discordjs/discord.js.git
synced 2026-03-11 17:13:31 +01:00
chore: format
This commit is contained in:
@@ -4,8 +4,8 @@ import { VscWarning } from '@react-icons/all-files/vsc/VscWarning';
|
||||
import type { PropsWithChildren } from 'react';
|
||||
|
||||
export interface IAlert {
|
||||
title?: string | undefined;
|
||||
type: 'danger' | 'info' | 'success' | 'warning';
|
||||
readonly title?: string | undefined;
|
||||
readonly type: 'danger' | 'info' | 'success' | 'warning';
|
||||
}
|
||||
|
||||
function resolveType(type: IAlert['type']) {
|
||||
|
||||
@@ -5,14 +5,14 @@ import { Disclosure, DisclosureContent, useDisclosureState } from 'ariakit/discl
|
||||
import type { PropsWithChildren } from 'react';
|
||||
|
||||
export interface SectionOptions {
|
||||
background?: boolean | undefined;
|
||||
buttonClassName?: string;
|
||||
className?: string;
|
||||
defaultClosed?: boolean | undefined;
|
||||
gutter?: boolean | undefined;
|
||||
icon?: JSX.Element | undefined;
|
||||
padded?: boolean | undefined;
|
||||
title: string;
|
||||
readonly background?: boolean | undefined;
|
||||
readonly buttonClassName?: string;
|
||||
readonly className?: string;
|
||||
readonly defaultClosed?: boolean | undefined;
|
||||
readonly gutter?: boolean | undefined;
|
||||
readonly icon?: JSX.Element | undefined;
|
||||
readonly padded?: boolean | undefined;
|
||||
readonly title: string;
|
||||
}
|
||||
|
||||
export function Section({
|
||||
|
||||
@@ -4,14 +4,14 @@ import { DiscordMessageInteraction, type IDiscordMessageInteraction } from './Me
|
||||
import { DiscordMessageReply, type IDiscordMessageReply } from './MessageReply.js';
|
||||
|
||||
export interface IDiscordMessage {
|
||||
author?: IDiscordMessageAuthor | undefined;
|
||||
authorNode?: ReactNode | undefined;
|
||||
followUp?: boolean;
|
||||
interaction?: IDiscordMessageInteraction | undefined;
|
||||
interactionNode?: ReactNode | undefined;
|
||||
reply?: IDiscordMessageReply | undefined;
|
||||
replyNode?: ReactNode | undefined;
|
||||
time?: string | undefined;
|
||||
readonly author?: IDiscordMessageAuthor | undefined;
|
||||
readonly authorNode?: ReactNode | undefined;
|
||||
readonly followUp?: boolean;
|
||||
readonly interaction?: IDiscordMessageInteraction | undefined;
|
||||
readonly interactionNode?: ReactNode | undefined;
|
||||
readonly reply?: IDiscordMessageReply | undefined;
|
||||
readonly replyNode?: ReactNode | undefined;
|
||||
readonly time?: string | undefined;
|
||||
}
|
||||
|
||||
export function DiscordMessage({
|
||||
|
||||
@@ -1,12 +1,12 @@
|
||||
import { FiCheck } from '@react-icons/all-files/fi/FiCheck';
|
||||
|
||||
export interface IDiscordMessageAuthor {
|
||||
avatar: string;
|
||||
bot?: boolean;
|
||||
color?: string;
|
||||
time: string;
|
||||
username: string;
|
||||
verified?: boolean;
|
||||
readonly avatar: string;
|
||||
readonly bot?: boolean;
|
||||
readonly color?: string;
|
||||
readonly time: string;
|
||||
readonly username: string;
|
||||
readonly verified?: boolean;
|
||||
}
|
||||
|
||||
export function DiscordMessageAuthor({ avatar, bot, verified, color, time, username }: IDiscordMessageAuthor) {
|
||||
|
||||
@@ -1,11 +1,11 @@
|
||||
import { FiCheck } from '@react-icons/all-files/fi/FiCheck';
|
||||
|
||||
export interface IDiscordMessageAuthorReply {
|
||||
avatar: string;
|
||||
bot?: boolean;
|
||||
color?: string;
|
||||
username: string;
|
||||
verified?: boolean;
|
||||
readonly avatar: string;
|
||||
readonly bot?: boolean;
|
||||
readonly color?: string;
|
||||
readonly username: string;
|
||||
readonly verified?: boolean;
|
||||
}
|
||||
|
||||
export function DiscordMessageAuthorReply({ avatar, bot, verified, color, username }: IDiscordMessageAuthorReply) {
|
||||
|
||||
@@ -5,7 +5,10 @@ export function DiscordMessageBaseReply({
|
||||
author,
|
||||
authorNode,
|
||||
children,
|
||||
}: PropsWithChildren<{ author?: IDiscordMessageAuthorReply | undefined; authorNode?: ReactNode | undefined }>) {
|
||||
}: PropsWithChildren<{
|
||||
readonly author?: IDiscordMessageAuthorReply | undefined;
|
||||
readonly authorNode?: ReactNode | undefined;
|
||||
}>) {
|
||||
return (
|
||||
<div
|
||||
className="relative mb-1 flex place-items-center before:absolute before:bottom-0 before:left-[-36px] before:right-full before:top-[50%] before:mr-1 before:block before:border-l-2 before:border-t-2 before:border-[rgb(79_84_92)] before:rounded-tl-1.5 before:content-none"
|
||||
|
||||
@@ -8,15 +8,15 @@ import { DiscordMessageEmbedThumbnail, type IDiscordMessageEmbedThumbnail } from
|
||||
import { DiscordMessageEmbedTitle, type IDiscordMessageEmbedTitle } from './MessageEmbedTitle.js';
|
||||
|
||||
export interface IDiscordMessageEmbed {
|
||||
author?: IDiscordMessageEmbedAuthor | undefined;
|
||||
authorNode?: ReactNode | undefined;
|
||||
fields?: IDiscordMessageEmbedField[];
|
||||
footer?: IDiscordMessageEmbedFooter | undefined;
|
||||
footerNode?: ReactNode | undefined;
|
||||
image?: IDiscordMessageEmbedImage;
|
||||
thumbnail?: IDiscordMessageEmbedThumbnail;
|
||||
title?: IDiscordMessageEmbedTitle | undefined;
|
||||
titleNode?: ReactNode | undefined;
|
||||
readonly author?: IDiscordMessageEmbedAuthor | undefined;
|
||||
readonly authorNode?: ReactNode | undefined;
|
||||
readonly fields?: IDiscordMessageEmbedField[];
|
||||
readonly footer?: IDiscordMessageEmbedFooter | undefined;
|
||||
readonly footerNode?: ReactNode | undefined;
|
||||
readonly image?: IDiscordMessageEmbedImage;
|
||||
readonly thumbnail?: IDiscordMessageEmbedThumbnail;
|
||||
readonly title?: IDiscordMessageEmbedTitle | undefined;
|
||||
readonly titleNode?: ReactNode | undefined;
|
||||
}
|
||||
|
||||
export function DiscordMessageEmbed({
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
export interface IDiscordMessageEmbedAuthor {
|
||||
avatar: string;
|
||||
url?: string;
|
||||
username: string;
|
||||
readonly avatar: string;
|
||||
readonly url?: string;
|
||||
readonly username: string;
|
||||
}
|
||||
|
||||
export function DiscordMessageEmbedAuthor({ avatar, url, username }: IDiscordMessageEmbedAuthor) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
export interface IDiscordMessageEmbedField {
|
||||
inline?: boolean;
|
||||
name: string;
|
||||
value: string;
|
||||
readonly inline?: boolean;
|
||||
readonly name: string;
|
||||
readonly value: string;
|
||||
}
|
||||
|
||||
export function DiscordMessageEmbedField({ name, value, inline }: IDiscordMessageEmbedField) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import { DiscordMessageEmbedField, type IDiscordMessageEmbedField } from './MessageEmbedField.js';
|
||||
|
||||
export interface IDiscordMessageEmbedFields {
|
||||
fields: IDiscordMessageEmbedField[];
|
||||
readonly fields: IDiscordMessageEmbedField[];
|
||||
}
|
||||
|
||||
export function DiscordMessageEmbedFields({ fields }: IDiscordMessageEmbedFields) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
export interface IDiscordMessageEmbedFooter {
|
||||
content?: string;
|
||||
icon?: string;
|
||||
timestamp?: string;
|
||||
readonly content?: string;
|
||||
readonly icon?: string;
|
||||
readonly timestamp?: string;
|
||||
}
|
||||
|
||||
export function DiscordMessageEmbedFooter({ content, icon, timestamp }: IDiscordMessageEmbedFooter) {
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
export interface IDiscordMessageEmbedImage {
|
||||
alt: string;
|
||||
height: number;
|
||||
url: string;
|
||||
width: number;
|
||||
readonly alt: string;
|
||||
readonly height: number;
|
||||
readonly url: string;
|
||||
readonly width: number;
|
||||
}
|
||||
|
||||
export function DiscordMessageEmbedImage({ alt, height, url, width }: IDiscordMessageEmbedImage) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export interface IDiscordMessageEmbedThumbnail {
|
||||
alt: string;
|
||||
image: string;
|
||||
readonly alt: string;
|
||||
readonly image: string;
|
||||
}
|
||||
|
||||
export function DiscordMessageEmbedThumbnail({ alt, image }: IDiscordMessageEmbedThumbnail) {
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
export interface IDiscordMessageEmbedTitle {
|
||||
title: string;
|
||||
url?: string;
|
||||
readonly title: string;
|
||||
readonly url?: string;
|
||||
}
|
||||
|
||||
export function DiscordMessageEmbedTitle({ title, url }: IDiscordMessageEmbedTitle) {
|
||||
|
||||
@@ -3,9 +3,9 @@ import type { IDiscordMessageAuthorReply } from './MessageAuthorReply.js';
|
||||
import { DiscordMessageBaseReply } from './MessageBaseReply.js';
|
||||
|
||||
export interface IDiscordMessageInteraction {
|
||||
author?: IDiscordMessageAuthorReply | undefined;
|
||||
authorNode?: ReactNode | undefined;
|
||||
command?: string;
|
||||
readonly author?: IDiscordMessageAuthorReply | undefined;
|
||||
readonly authorNode?: ReactNode | undefined;
|
||||
readonly command?: string;
|
||||
}
|
||||
|
||||
export function DiscordMessageInteraction({ author, authorNode, command }: IDiscordMessageInteraction) {
|
||||
|
||||
@@ -3,9 +3,9 @@ import type { IDiscordMessageAuthorReply } from './MessageAuthorReply.js';
|
||||
import { DiscordMessageBaseReply } from './MessageBaseReply.js';
|
||||
|
||||
export interface IDiscordMessageReply {
|
||||
author?: IDiscordMessageAuthorReply | undefined;
|
||||
authorNode?: ReactNode | undefined;
|
||||
content: string;
|
||||
readonly author?: IDiscordMessageAuthorReply | undefined;
|
||||
readonly authorNode?: ReactNode | undefined;
|
||||
readonly content: string;
|
||||
}
|
||||
|
||||
export function DiscordMessageReply({ author, authorNode, content }: IDiscordMessageReply) {
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
import type { PropsWithChildren } from 'react';
|
||||
|
||||
export interface IDiscordMessages {
|
||||
rounded?: boolean;
|
||||
readonly rounded?: boolean;
|
||||
}
|
||||
|
||||
export function DiscordMessages({ rounded, children }: PropsWithChildren<IDiscordMessages>) {
|
||||
|
||||
Reference in New Issue
Block a user