mirror of
https://github.com/ReVanced/revanced-bots.git
synced 2026-01-18 00:33:59 +00:00
feat(bots/discord/utils/embeds): make title parameter nullable
This commit is contained in:
@@ -2,7 +2,7 @@ import { DefaultEmbedColor, MessageScanHumanizedMode, ReVancedLogoURL } from '$/
|
|||||||
import { EmbedBuilder, type EmbedField, type User } from 'discord.js'
|
import { EmbedBuilder, type EmbedField, type User } from 'discord.js'
|
||||||
import type { ConfigMessageScanResponseMessage } from '../../../config.schema'
|
import type { ConfigMessageScanResponseMessage } from '../../../config.schema'
|
||||||
|
|
||||||
export const createErrorEmbed = (title: string, description?: string) =>
|
export const createErrorEmbed = (title: string | null, description?: string) =>
|
||||||
applyCommonEmbedStyles(
|
applyCommonEmbedStyles(
|
||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setTitle(title)
|
.setTitle(title)
|
||||||
@@ -15,7 +15,7 @@ export const createStackTraceEmbed = (stack: unknown) =>
|
|||||||
// biome-ignore lint/style/useTemplate: shut
|
// biome-ignore lint/style/useTemplate: shut
|
||||||
createErrorEmbed('An exception was thrown', '```js\n' + stack + '```')
|
createErrorEmbed('An exception was thrown', '```js\n' + stack + '```')
|
||||||
|
|
||||||
export const createSuccessEmbed = (title: string, description?: string) =>
|
export const createSuccessEmbed = (title: string | null, description?: string) =>
|
||||||
applyCommonEmbedStyles(
|
applyCommonEmbedStyles(
|
||||||
new EmbedBuilder()
|
new EmbedBuilder()
|
||||||
.setTitle(title)
|
.setTitle(title)
|
||||||
|
|||||||
Reference in New Issue
Block a user