mirror of
https://github.com/chylex/Discord-History-Tracker.git
synced 2024-11-25 05:42:45 +01:00
Compare commits
2 Commits
0072e025f4
...
653d28136c
Author | SHA1 | Date | |
---|---|---|---|
653d28136c | |||
fdec0dc510 |
@ -5,7 +5,7 @@ import discord from "./discord.mjs";
|
|||||||
// ------------------------
|
// ------------------------
|
||||||
|
|
||||||
const filter = {
|
const filter = {
|
||||||
byUser: ((user) => message => message.u === user),
|
byUser: ((userindex) => message => message.u === userindex),
|
||||||
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(filter.value);
|
filterFunction = processor.FILTER.byUser(loadedFileMeta.userindex.indexOf(filter.value));
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case "contents":
|
case "contents":
|
||||||
|
Loading…
Reference in New Issue
Block a user