diff options
| author | Fuwn <[email protected]> | 2025-09-09 18:07:32 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2025-09-09 18:07:32 -0700 |
| commit | 982e16f8d94f74b5ec7dbbdf62fbdbc106530941 (patch) | |
| tree | 1c4163564305fb45cd9f105462cc2cd783399364 /src/discord/embeds.ts | |
| parent | refactor: Move Discord APIs to Discord module (diff) | |
| download | umabotdiscord-982e16f8d94f74b5ec7dbbdf62fbdbc106530941.tar.xz umabotdiscord-982e16f8d94f74b5ec7dbbdf62fbdbc106530941.zip | |
refactor(src): Use arrow functions everywhere
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; -} +}; |