summaryrefslogtreecommitdiff
path: root/src/discord/embeds.ts
diff options
context:
space:
mode:
Diffstat (limited to 'src/discord/embeds.ts')
-rw-r--r--src/discord/embeds.ts8
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(/&lt;/g, '<')
@@ -11,9 +11,9 @@ function decodeHtmlEntities(str: string): string {
.replace(/&#x2F;/g, '/')
.replace(/&#x60;/g, '`')
.replace(/&#x3D;/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;
-}
+};