From 982e16f8d94f74b5ec7dbbdf62fbdbc106530941 Mon Sep 17 00:00:00 2001 From: Fuwn Date: Tue, 9 Sep 2025 18:07:32 -0700 Subject: refactor(src): Use arrow functions everywhere --- src/discord/embeds.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/discord/embeds.ts') 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; -} +}; -- cgit v1.2.3