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

[TSE] Multiple Issues with TagScript Block & TagScriptEngine #49

Open
cool-aid-man opened this issue May 7, 2024 · 0 comments
Open
Assignees
Labels
bug Something isn't working dependencies Pull requests that update a dependency file enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested

Comments

@cool-aid-man
Copy link
Contributor

cool-aid-man commented May 7, 2024

Heya lemon,
Opening up an issue if that makes you easier to work on & keep track of -

  1. Broken blocks - {shortcircuit} or {break}

Traceback Here - from your channel in cog-support server.

  1. Making {override} block to override more commands -
    - Override doesn't work in quite a few commands - from red's core, mod to other 3rd party cogs - such as in roletools It cannot override role add / role remove currently, commands like slowmode (from Mod cog), which it should be able to override, etc.

  2. In TSE, the issue with simultaneous usage of command blocks, leads to miss execution of a few.
    - In TSE currently ALL 3 command blocks execute/run at the exact same time which is problematic, so adding a delay (for a few milliseconds) or making it so it executes one after another might solve the issue plus it's the right way to do.

4.1 Currently " processing reasons" In TSE, embed block {embed(description)} - The description is capped at 2k characters, even tho embed description can easily go up to 4096 characters. This cap should be removed.
⚠️ Note that - At the moment with all the "manual attributions" you still can't create the embed having more than 4k characters.

E.g. Try with 👇 (It'll limit you at 4k characters - using ALL the attribution)
{embed(title):title}
{embed(description):description}
{embed(field):name|value}

  • The API's limit is 6k characters in total including ALL the parameters. As follows:
Field Limit
title 256 characters
description 4096 characters
fields Up to 25 field objects
field.name 256 characters
field.value 1024 characters
footer.text 2048 characters
author.name 256 characters
  • (Additionally, the combined sum of characters in all title, description, field.name, field.value, footer.text, and author.name fields across all embeds attached to a message must not exceed 6000 characters. Violating any of these constraints will result in a Bad Request response.)

4.2 AND currently in TSE, embed JSON - You can't create an embed having more than 2k characters (even tho the limit is 6k characters in total). This limit should also be removed.

  • E.g. Try creating a tag with {embed({"title": "title", "description": "description"})} (include all the other parameters title, descriptions, fields, author, footer ), You will see it is limited to 2k characters.



5. This one is not really an issue: But in {target} block -

target = tse.MemberAdapter(ctx.message.mentions[0]) if ctx.message.mentions else author

Can this use/accept ID (from the user_message - by checking if the message has user ID ) instead of taking the ID from user_mention !!
- Because target block won't work if you pass just the ID (of a targeted user), and IDs are the first thing that you copy then you add <@> to make it mention, so being a user you're by default passing IDs first


6. In Tag global
tag_name: TagName(global_priority=True),

  • tag global add should behave just like adding a guild tag with tag add. Currently with tag global add it does not prompt you to override the tag with new data (so you'll have to delete > add it again).
    image
  • Same issue with tag global ++ (tag global pastebin); it should behave just like adding guild tag ++

Proposed Updates on TSE

  • Publishing the {allowedmention} block - {allowedmentions(role1, role2, etc)} (only the mentioned roles will be pinged)
  • Previous conversation link - Here from #testing channel in red.
  • Fixing the command - tag usage/stats - Discord sometimes messes up the code block, with their unannounced changes to the API which breaks the embedded code block, Hence its better to ditch the code block and just use an embed for it, which won't get damaged by those changes
  • New {lower} & {upper} block - Sravan already has PRs for it.
  • Adding scope to accept multiple delimiters to {embed(footer)} from - , ; | ~ (users can pick and choose) - as footer breaks with ANY conditional blocks (if, and, or, any etc) due to the presence of |.
  • Currently {embed(field)} is not affected by this tho to keep everything safe, we can also add the same to the field to accept all of the delimiters.

(Changing the delimiter to accept Multiple characters would solve the issue, but it won't be a huge breaking change per se. - Fewer tags will be broken if not none, this way)

I think, this is all the problems we have with TSE at the moment, I hope you can get back to this as soon as possible as it's been pending for many months!

@japandotorg japandotorg self-assigned this Jun 24, 2024
@japandotorg japandotorg added bug Something isn't working enhancement New feature or request help wanted Extra attention is needed good first issue Good for newcomers question Further information is requested dependencies Pull requests that update a dependency file labels Jun 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working dependencies Pull requests that update a dependency file enhancement New feature or request good first issue Good for newcomers help wanted Extra attention is needed question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants