gamedevalliance / astride Goto Github PK
View Code? Open in Web Editor NEW๐ฆ Le bot Discord de Game Dev Alliance
Home Page: https://discord.gg/RrBppaj
๐ฆ Le bot Discord de Game Dev Alliance
Home Page: https://discord.gg/RrBppaj
Currently, the vote messages are simply trimmed by taking the first 175 characters (after having removed the tag), this can lead to broken URLs (and on the user side a weird punycode-like URL and ultimately a bad experience)
Simply making it so it doesn't cut words should be enough to fix this (and at the same time provide a better user experience)
For instance, if the code for the challenge is "[Monstre]" and someone type "[monstre]" the vote message will contain the tag. Example in action :
Normally to fix this we'd just use lower()
on the message but since we want to keep the end message intact (minus the tag) we'll have to do something else. Right now we simply use .replace()
to find the tag but perhaps we could use a case insensitive regex?
(Undescriptive title, will have to edit)
Right now the link detection is pretty good for common links (i.e, imgur, classic discord link with normal file names etc) but fall apart as soon as a weird link come in. For instance, any links containing a dot after the hostname but before the extension will break the link detection. (For exemple, this link : https://images-ext-1.discordapp.net/external/w_r6GfytYi_sUA8eHMIwEUczNOQ6SIYIyHyvvMP0XWQ/https/nsa40.casimages.com/img/2019/06/17/19061703100787924.gif
is not detected properly)
I fear for what would happen if someone posted a googlevideo link.
Right now the link detected is based on a pretty simple regex, just capturing the whole link, the hostname and the extension. The hostname group is currently unused but I'd like to use it in the future to provide custom integration for itch.io and youtube links. The extension group is only used to see if we can provide a thumbnail (admittedly, a naive way of doing it. Checking the mime-type might be a better solution?)
(Additionally, at the time of writing this, due to ^
at the beginning and $
at the end, it's just broken.)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.