Compare commits
No commits in common. "7abd01a1256f7b806c33104299b7e59991ab92c3" and "a0dcd688798c40e3e44365a6705f471da3c0a49f" have entirely different histories.
7abd01a125
...
a0dcd68879
2 changed files with 6 additions and 13 deletions
|
@ -60,20 +60,12 @@ async function processFile(link) {
|
||||||
: "Lines " + startLine + "-" + endLine;
|
: "Lines " + startLine + "-" + endLine;
|
||||||
|
|
||||||
const targetLines = (
|
const targetLines = (
|
||||||
entireFile
|
entireFile ? lines.slice(0, 30) : lines.slice(startLine - 1, endLine)
|
||||||
? lines.length > 30
|
|
||||||
? lines.slice(0, 30)
|
|
||||||
: lines
|
|
||||||
: lines.slice(startLine - 1, endLine)
|
|
||||||
).join("\n");
|
).join("\n");
|
||||||
|
|
||||||
return `**${fileName}: **${whichLines}\n\`\`\`${fileType}\n${unindent(
|
return `**${fileName}: **${whichLines}\n\`\`\`${fileType}\n${unindent(
|
||||||
targetLines
|
targetLines
|
||||||
)}${
|
)}${entireFile ? `\n... (${lines.length - 30} lines left)` : ""}\n\`\`\``;
|
||||||
entireFile && lines.length > 30
|
|
||||||
? `\n... (${lines.length - 30} lines left)`
|
|
||||||
: ""
|
|
||||||
}\n\`\`\``;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
events.add("messageCreate", "codePreviews", async function (msg) {
|
events.add("messageCreate", "codePreviews", async function (msg) {
|
||||||
|
|
|
@ -89,14 +89,15 @@ hf.bot.once("ready", () => {
|
||||||
}
|
}
|
||||||
const channel = dmCache[data.user];
|
const channel = dmCache[data.user];
|
||||||
|
|
||||||
const now = Date.now();
|
const [date, time] = tzFormatterCache[data.tz]
|
||||||
const [date, time] = tzFormatterCache[data.tz].format(now).split(", ");
|
.format(Date.now())
|
||||||
|
.split(", ");
|
||||||
let [hour, minutes] = time.split(":");
|
let [hour, minutes] = time.split(":");
|
||||||
hour = parseInt(hour);
|
hour = parseInt(hour);
|
||||||
minutes = parseInt(minutes);
|
minutes = parseInt(minutes);
|
||||||
const lastRan = new Date(await getLastRun(data.user)).getTime();
|
const lastRan = new Date(await getLastRun(data.user)).getTime();
|
||||||
|
|
||||||
if (now > lastRan && hour == data.hour && minutes == 0) {
|
if (date > lastRan && hour == data.hour && minutes == 0) {
|
||||||
logger.verbose(
|
logger.verbose(
|
||||||
"privateReminders",
|
"privateReminders",
|
||||||
`attempting to send reminder to ${data.user}`
|
`attempting to send reminder to ${data.user}`
|
||||||
|
|
Loading…
Reference in a new issue