Giter Club home page Giter Club logo

Comments (12)

l-zeuch avatar l-zeuch commented on July 30, 2024 3

Put simply, use the following trigger to achieve it not triggering with carats:
(?:[^<]|\A)https://(?:\w+\.)?discord(?:app)?\.com/channels\/(\d+)\/(\d+)\/(\d+)(?:[^>\d]|\z)

Apart from that, there is no good way to prevent this from happening as of now, given by how the allowed mentions field in messages work (blame Discord).

from yagpdb-cc.

BlackWolfWoof avatar BlackWolfWoof commented on July 30, 2024 1

re: https://github.com/BlackWolfWoof/yagpdb-cc/blob/master/Misc/message%20link.gotmpl

If the original message has a ping and an embed, yag recreates the message entirely, thus pinging all the users again.
This is really only an issue with messages from the Sesh event bot. So perhaps simply ignoring messages from this user would be a solution.

Alternatively, if stripping the pings is not doable, adding a function to ignore message links in carats( e.g. how <https://url.com> does not create an embed in discord), that could also work.

I love this custom command... It should be included by default in yag. So thanks for making it. I hope you could fix this, though!

Thank you.

image

Hmm i could get the id of the user and replace it with the name instead i guess. I'll think about it

from yagpdb-cc.

l-zeuch avatar l-zeuch commented on July 30, 2024

Just update the trigger in my opinion, is also more intuitive and simulates the behaviour Discord shows with normal links.

from yagpdb-cc.

BlackWolfWoof avatar BlackWolfWoof commented on July 30, 2024

Just update the trigger in my opinion, is also more intuitive and simulates the behaviour Discord shows with normal links.

But that would defeat the purpose of using message link to quote the message and display its content across channels

from yagpdb-cc.

BlackWolfWoof avatar BlackWolfWoof commented on July 30, 2024

i'll simply just add some fix to not ping users

from yagpdb-cc.

l-zeuch avatar l-zeuch commented on July 30, 2024

But that would defeat the purpose of using message link to quote the message and display its content across channels

How would that defeat the purpose?
With a normal link, say, https://youtube.com Discord will embed it, unless we enclose it in carets like so: <https://youtube.com>.
The new and updated trigger will exactly simulate that kind of behaviour, making it more intuitive than always embedding the message.

from yagpdb-cc.

FravBox avatar FravBox commented on July 30, 2024

The best case scenario is add a fix to not ping users and also keeping the modified trigger. The carats do allow some extra control from users. There are times when you want to link to a message and not initiate a preview from yag.

from yagpdb-cc.

FravBox avatar FravBox commented on July 30, 2024

Put simply, use the following trigger to achieve it not triggering with carats:
(?:[^<]|\A)https://(?:\w+\.)?discord(?:app)?\.com/channels\/(\d+)\/(\d+)\/(\d+)(?:[^>\d]|\z)

Apart from that, there is no good way to prevent this from happening as of now, given by how the allowed mentions field in messages work (blame Discord).

This appears to not work at all -
no messages are previewed anymore. If it is only a link with no message, it simply deleted the message without giving a preview.
The bot does ignore the carats if they're used, but does not provide previews when no carats are used.

from yagpdb-cc.

l-zeuch avatar l-zeuch commented on July 30, 2024

Works perfectly fine on my end...
You aren't hitting custom command limits (3 per event)?

from yagpdb-cc.

l-zeuch avatar l-zeuch commented on July 30, 2024

P.S.: Sounds more like a code issue to me, try using the latest code if you aren't already.

from yagpdb-cc.

FravBox avatar FravBox commented on July 30, 2024

Ended up being something completely different - #19

from yagpdb-cc.

BlackWolfWoof avatar BlackWolfWoof commented on July 30, 2024

Note to myself: Use .Message.Mentions and getMember everyone and check if they are still on the server

from yagpdb-cc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.