-
-
Save angeloanan/acdc6c8c7402df293268ca3b77cac707 to your computer and use it in GitHub Desktop.
i need help
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mods = (webpackChunkdiscord_app.push([[''],{},e=>{m=[];for(let c in e.c)m.push(e.c[c])}]),m) | |
provider = mods.find(m => m?.exports?.default?.getLanguages && Object.keys(m.exports.default.Messages).length).exports.default._provider | |
strs = mods.find(m => m?.exports?.COMMAND_NICK_SUCCESS) | |
defaultStrs = provider._context.defaultMessages | |
newDefaultStrs = {...defaultStrs} | |
newStrs = {...strs.exports} | |
transform = text => { | |
const gte200 = String.fromCodePoint(0x1FAC2); | |
const gte50 = String.fromCodePoint(0x1F496); | |
const gte10 = String.fromCodePoint(0x2728); | |
const gte5 = String.fromCodePoint(0x1F97A); | |
const gte1 = String.fromCodePoint(0x002C); | |
const zero = String.fromCodePoint(0x2764); | |
const sep = String.fromCodePoint(0x1F449, 0x1F448); | |
const bottom = text => { | |
let out = ''; | |
let chr = text.charCodeAt(0); | |
if (chr === 0) { | |
out += zero; | |
} else { | |
while (chr) { | |
if (chr >= 200) { | |
out += gte200; | |
chr -= 200; | |
} else if (chr >= 50) { | |
out += gte50; | |
chr -= 50; | |
} else if (chr >= 10) { | |
out += gte10; | |
chr -= 10; | |
} else if (chr >= 5) { | |
out += gte5; | |
chr -= 5; | |
} else if (chr >= 1) { | |
out += gte1; | |
chr -= 1; | |
} else { | |
break; | |
} | |
} | |
out += sep; | |
} | |
return out; | |
} | |
const into = str => { | |
let out = ''; | |
let level = 0; | |
const chars = str.split(''); | |
for (let i = 0; i < chars.length; i++) { | |
switch (chars[i]) { | |
case '[': | |
case '(': | |
case '{': | |
out += chars[i]; | |
level++; | |
break; | |
case ']': | |
case ')': | |
case '}': | |
out += chars[i]; | |
level--; | |
break; | |
default: { | |
if (level == 0) { | |
out += bottom(chars[i]); | |
} else { | |
out += chars[i]; | |
} | |
break; | |
} | |
} | |
} | |
return out.trim(); | |
} | |
return into(text); | |
} | |
newStrs = Object.fromEntries(Object.entries(newStrs).map(([name, str]) => typeof str === 'string' ? [name, transform(str)] : [name, str])) | |
newDefaultStrs = Object.fromEntries(Object.entries(newDefaultStrs).map(([name, str]) => typeof str === 'string' ? [name, transform(str)] : [name, str])) | |
provider.refresh({messages: newStrs, defaultMessages: newDefaultStrs, locale: 'en-US'}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
mods = (webpackChunkdiscord_app.push([[''],{},e=>{m=[];for(let c in e.c)m.push(e.c[c])}]),m) | |
provider = mods.find(m => m?.exports?.default?.getLanguages && Object.keys(m.exports.default.Messages).length).exports.default._provider | |
strs = mods.find(m => m?.exports?.COMMAND_NICK_SUCCESS) | |
defaultStrs = provider._context.defaultMessages | |
newDefaultStrs = {...defaultStrs} | |
newStrs = {...strs.exports} | |
FACE_CHANCE = 30 | |
transform = text => { | |
const faces = [ | |
'(o´∀`o)', | |
'(#`ε´)', | |
'(๑•̀ㅁ•́๑)✧', | |
'(*≧m≦*)', | |
'(・`ω´・)', | |
'UwU', | |
'OwO', | |
'>w<', | |
'。゚( ゚^∀^゚)゚。', | |
'ヾ(`ε´)ノ', | |
'(´• ω •`)', | |
'o(>ω<)o', | |
'(ノ◕ヮ◕)ノ*:・゚✧', | |
'(⁀ᗢ⁀)', | |
'( ̄ε ̄@)', | |
'( 〃▽〃)', | |
'(o^ ^o)', | |
"ヾ(*'▽'*)", | |
]; | |
const intoOWO = str => { | |
let out = ''; | |
let level = 0; | |
const chars = str.split(''); | |
for (let i = 0; i < chars.length; i++) { | |
switch (chars[i]) { | |
case '[': | |
case '(': | |
case '{': | |
out += chars[i]; | |
level++; | |
break; | |
case ']': | |
case ')': | |
case '}': | |
out += chars[i]; | |
level--; | |
break; | |
case '!': { | |
out += chars[i]; | |
if (level !== 0 || !(chars[i-1] !== '}' && chars[i-2] !== '}' && chars[i+1] !== '{' && chars[i+2] !== '{') || chars[i+1] === '!') { | |
break; | |
} | |
const face = faces[Math.floor(Math.random() * faces.length)]; | |
out += ' ' + face + ' '; | |
continue; | |
} | |
default: { | |
if (level == 0) { | |
out += chars[i].replace(/[rl]/g, 'w').replace(/[RL]/g, 'W'); | |
} else { | |
out += chars[i]; | |
} | |
break; | |
} | |
} | |
if (i === chars.length - 1) { | |
if (Math.floor(Math.random() * 100) < FACE_CHANCE) { | |
const face = faces[Math.floor(Math.random() * faces.length)]; | |
out += ' ' + face + ' '; | |
} | |
} | |
} | |
return out.trim(); | |
} | |
return intoOWO(text); | |
} | |
newStrs = Object.fromEntries(Object.entries(newStrs).map(([name, str]) => typeof str === 'string' ? [name, transform(str)] : [name, str])) | |
newDefaultStrs = Object.fromEntries(Object.entries(newDefaultStrs).map(([name, str]) => typeof str === 'string' ? [name, transform(str)] : [name, str])) | |
provider.refresh({messages: newStrs, defaultMessages: newDefaultStrs, locale: 'en-US'}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment