Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deal with discord embed limits #30

Open
richfromm opened this issue Feb 7, 2023 · 1 comment
Open

Deal with discord embed limits #30

richfromm opened this issue Feb 7, 2023 · 1 comment

Comments

@richfromm
Copy link
Owner

I am limiting #29 (which is the underlying issue that caused the filing of #25) to deal with just the Discord limit on the number of characters within the text of a message, which is 2000 for free users.

But according to https://www.itgeared.com/what-is-the-character-limit-on-discord/ , there are other issues related to embed's, and this issue is for dealing with them. For our purposes, embed's originate as links within Slack messages, which Slack calls "attachments". (What I call actual attachments, Slack calls "files".)

I think we should deal with the following character limits:

  • 256 characters for title
  • 4096 characters for description

Unlike the case of exceeding the limit on actual message text, I think in these cases it's probably fine to truncate and add something like ... to indicate the truncation.

There are some other character limits described, but I'm not sure if all of them are applicable for us, and/or worth worrying about. But I'm not entirely positive. Like do the URLs count as part of the 6000 character total limit?

There is one other limit that we are already accounting for, which is a max of 10 embed's per message. Currently we're dealing with this by just truncating the list. Which is a little lame, although since the links still actually appear within the text (just not the previews), maybe it's okay? I will consider dealing with this as part of this issue, or maybe not and/or break out as another issue. One possible way is to create one or more blank messages just for the purpose of the extra embed's, although that has the same caveats in terms of dealing with threading as expressed at the end of #29 (comment)

Attn: @shmulvad

@shmulvad
Copy link

One possible way is to create one or more blank messages just for the purpose of the extra embeds

I think what you suggest is a reasonable solution. For most cases, it will probably be fairly rare anyway that 10 embeds per message is exceeded.

richfromm added a commit that referenced this issue Apr 1, 2023
I wanted some minimal testing in place (perhaps more to come) before I
potentially muck with the internals to deal with:

* Character limits on message text
  (#29)

* Embed Limits
  (#30)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants