Skip to content

Commit

Permalink
feat: add warning if formatted character limit is bigger than bot's
Browse files Browse the repository at this point in the history
  • Loading branch information
Draconizations committed Jun 12, 2024
1 parent 2035832 commit 404d0ee
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/components/dash/members/edit/MemberGroupEdit.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -213,6 +213,12 @@
</div>
<div class="bg-base-100 flex-1 rounded-box p-4 gap-2 flex flex-col">
<h5 class="text-lg">Formatted preview</h5>
{#if formattedGroups.length > 1000}
<span class="text-sm"
><IconAlertTriangle class="text-warning inline-block mr-1" size={18} />The formatted groups
take up more than 1000 characters. It will be cut off when viewed via the bot.</span
>
{/if}
<div class="text-sm discord-markdown">
<AwaitHtml htmlPromise={parseMarkdown(formattedGroups, { embed: true })} />
</div>
Expand Down

0 comments on commit 404d0ee

Please sign in to comment.