mirror of
https://github.com/chylex/Discord-History-Tracker.git
synced 2024-11-25 05:42:45 +01:00
Compare commits
2 Commits
653d28136c
...
0072e025f4
Author | SHA1 | Date | |
---|---|---|---|
0072e025f4 | |||
383ee5c90e |
@ -5,7 +5,7 @@ import discord from "./discord.mjs";
|
|||||||
// ------------------------
|
// ------------------------
|
||||||
|
|
||||||
const filter = {
|
const filter = {
|
||||||
byUser: ((userindex) => message => message.u === userindex),
|
byUser: ((user) => message => message.u === user),
|
||||||
byTime: ((timeStart, timeEnd) => message => message.t >= timeStart && message.t <= timeEnd),
|
byTime: ((timeStart, timeEnd) => message => message.t >= timeStart && message.t <= timeEnd),
|
||||||
byContents: ((substr) => message => ("m" in message ? message.m : "").indexOf(substr) !== -1),
|
byContents: ((substr) => message => ("m" in message ? message.m : "").indexOf(substr) !== -1),
|
||||||
byRegex: ((regex) => message => regex.test("m" in message ? message.m : "")),
|
byRegex: ((regex) => message => regex.test("m" in message ? message.m : "")),
|
||||||
|
@ -411,7 +411,7 @@ export default (function() {
|
|||||||
setActiveFilter(filter) {
|
setActiveFilter(filter) {
|
||||||
switch (filter ? filter.type : "") {
|
switch (filter ? filter.type : "") {
|
||||||
case "user":
|
case "user":
|
||||||
filterFunction = processor.FILTER.byUser(loadedFileMeta.userindex.indexOf(filter.value));
|
filterFunction = processor.FILTER.byUser(filter.value);
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "contents":
|
case "contents":
|
||||||
|
Loading…
Reference in New Issue
Block a user