add zero-width space
This commit is contained in:
parent
0d7c7b6647
commit
2745467dbb
@ -48,7 +48,7 @@ module.exports = {
|
||||
//await interaction.reply('Error: String is too big. Resultant output would be too big to send to Discord. (the output length was ' + (output.length + testLength.length) + " characters.)");
|
||||
let replyString = "output length was " + (output.length) + " characters.";
|
||||
let filePath = writeFile(output);
|
||||
await interaction.reply({content:replyString, files: [filePath] });
|
||||
await interaction.reply({ content: replyString, files: [filePath] });
|
||||
fs.unlinkSync(filePath); // Delete file once we're done with it
|
||||
} else {
|
||||
await interaction.reply(codeBlock("", output) + testLength);
|
||||
@ -60,7 +60,7 @@ module.exports = {
|
||||
function writeFile(content) {
|
||||
//console.log(content);
|
||||
console.log("Attempting to write string to file...");
|
||||
let filename = Date.now()+'.txt';
|
||||
let filename = Date.now() + '.txt';
|
||||
console.log(filename);
|
||||
var filePath = path.join(__dirname, '..', filename);
|
||||
console.log(filePath);
|
||||
@ -214,12 +214,13 @@ var charIterateState;
|
||||
function charIterate(input) {
|
||||
if (charIterateState == undefined) {
|
||||
charIterateState = 0;
|
||||
}
|
||||
} else {
|
||||
if (charIterateState < (input.length - 1)) {
|
||||
charIterateState++;
|
||||
} else {
|
||||
charIterateState = 0;
|
||||
}
|
||||
}
|
||||
console.log(charIterateState, input.charAt(charIterateState));
|
||||
return charIterateState;
|
||||
}
|
||||
@ -261,7 +262,7 @@ function design5(input) {
|
||||
|
||||
if (dist > radius - 1 && dist < radius + 1) { //&& dist > radius - 1
|
||||
lineHasInput = true;
|
||||
outputLine += ""+ input.charAt(charIterate(input)); //zero-width space
|
||||
outputLine += "" + input.charAt(charIterate(input)); //zero-width space
|
||||
} else {
|
||||
outputLine += " ";
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user