Skip to content

Commit

Permalink
Fix invite resolver (#1318)
Browse files Browse the repository at this point in the history
Old version only worked with temporary links.
Now works with: vanity invites, and permanent invites.
  • Loading branch information
Vap0r1ze authored and Gawdl3y committed Mar 30, 2017
1 parent 55141b4 commit 61f5051
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/client/ClientDataResolver.js
Expand Up @@ -149,7 +149,7 @@ class ClientDataResolver {
* @returns {string}
*/
resolveInviteCode(data) {
const inviteRegex = /discord(?:app)?\.(?:gg|com\/invite)\/([a-z0-9]{5})/i;
const inviteRegex = /discord(?:app\.com\/invite|\.gg)\/([\w-]{2,255})/i;
const match = inviteRegex.exec(data);
if (match && match[1]) return match[1];
return data;
Expand Down

0 comments on commit 61f5051

Please sign in to comment.