diff options
Diffstat (limited to 'src/discord/embeds.ts')
| -rw-r--r-- | src/discord/embeds.ts | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/discord/embeds.ts b/src/discord/embeds.ts index f88cec2..833c831 100644 --- a/src/discord/embeds.ts +++ b/src/discord/embeds.ts @@ -1,7 +1,7 @@ import type { DiscordEmbed } from './interfaces.ts'; import type { RedditPost } from '../reddit.ts'; -function decodeHtmlEntities(str: string): string { +const decodeHtmlEntities = (str: string): string => { return str .replace(/&/g, '&') .replace(/</g, '<') @@ -11,9 +11,9 @@ function decodeHtmlEntities(str: string): string { .replace(///g, '/') .replace(/`/g, '`') .replace(/=/g, '='); -} +}; -export function createPostEmbed(post: RedditPost): DiscordEmbed { +export const createPostEmbed = (post: RedditPost): DiscordEmbed => { const mediaUrl = post.media?.reddit_video?.fallback_url || post.secure_media?.reddit_video?.fallback_url || @@ -87,4 +87,4 @@ export function createPostEmbed(post: RedditPost): DiscordEmbed { } return embed; -} +}; |