diff --git a/lib/routes/kemono/index.ts b/lib/routes/kemono/index.ts index 659a48d16..bf099fc18 100644 --- a/lib/routes/kemono/index.ts +++ b/lib/routes/kemono/index.ts @@ -46,6 +46,10 @@ export const route: Route = { source: ['kemono.cr/:source/user/:id/fancards'], target: '/:source/:id/fancards', }, + { + source: ['kemono.cr/discord/server/:id'], + target: '/discord/:id', + }, ], name: 'Posts', maintainers: ['nczitzk', 'AiraNadih'], @@ -197,6 +201,7 @@ async function processDiscordMessages(channels: any[], limit: number) { return channelResponse.data .filter((message: DiscordMessage) => message.content || message.attachments) + .sort((a, b) => b.id.localeCompare(a.id)) .slice(0, limit) .map((message: DiscordMessage) => ({ title: message.content || 'Discord Message', diff --git a/lib/routes/kemono/templates/discord.art b/lib/routes/kemono/templates/discord.art index 23550ae4a..c7da459b3 100644 --- a/lib/routes/kemono/templates/discord.art +++ b/lib/routes/kemono/templates/discord.art @@ -4,7 +4,7 @@ {{ if i.attachments }} {{ each i.attachments a }} - + {{ /each }} {{ /if }}