Skip to content

Instantly share code, notes, and snippets.

View paradox-glitch's full-sized avatar
👨‍💻
Developing Magic

Morgan Finney paradox-glitch

👨‍💻
Developing Magic
View GitHub Profile
@paradox-glitch
paradox-glitch / v14Auto.js
Created August 3, 2022 23:54
Some automated help for updating from djs 13 to 14
//* BACK UP YOUR CODE
//* Copyright 2022, Morgan Finney
//* MIT License, http://www.opensource.org/licenses/mit-license.php
//* Limitations
//* - Only one folder can be updated at a time, change the m_Folder variable to choose the folder to target.
//* - Fails if there is a comma , in the title or the body of the field,
//* fields that fail will be commented with v14FLAG above, you can then search and update them manually.
//* - This will create multiple .addFields per embed and will not condense them down to one.
@paradox-glitch
paradox-glitch / detectLink.js
Created August 2, 2022 21:54
Detect Links for Discord.js Bot
@paradox-glitch
paradox-glitch / replaceConfusables.js
Last active June 29, 2022 23:43 — forked from yeah/remove_diacritics.js
Replace Confusables (Diacritics, Umlauts, Accents, Special characters) with Alphanumerics (Á𝕓ℂ⑴⒉3̸̢̃͑̂̎̕͝𝔁𝔂𝓬 >>becomes>> ABC123xyc) in JavaScript
module.exports = {
ReplaceConfusables: async function(a_String) {
return await DoReplaceConfusables(a_String);
}
};
async function DoReplaceConfusables(a_String) {
var l_ConfusablesToAlphanumericMap = [
{ 'alphanumeric': 'A', 'confusables': /[\u{1D538}\u{1D434}\u5342\u0041\u24B6\uFF21\u00C0\u00C1\u00C2\u1EA6\u1EA4\u1EAA\u1EA8\u00C3\u0100\u0102\u1EB0\u1EAE\u1EB4\u1EB2\u0226\u01E0\u01DE\u1EA2\u00C5\u01FA\u01CD\u0200\u0202\u1EA0\u1EAC\u1EB6\u1E00\u0104\u023A\u2C6F]/ug },
{ 'alphanumeric': 'AA', 'confusables': /[\uA732]/ug },