Schwitzermod lol
This commit is contained in:
parent
88dc71ea9b
commit
4afe02ffe8
@ -2,6 +2,7 @@ import { logger } from "../inc/log";
|
|||||||
import { getLevel } from "../inc/admin";
|
import { getLevel } from "../inc/admin";
|
||||||
import { spurdo } from "../inc/spurdo";
|
import { spurdo } from "../inc/spurdo";
|
||||||
import { schmuser } from "../inc/schmuser";
|
import { schmuser } from "../inc/schmuser";
|
||||||
|
import { schwitzer } from "../inc/schwitzer";
|
||||||
|
|
||||||
import fetch from "../inc/fetch";
|
import fetch from "../inc/fetch";
|
||||||
import EventEmitter from "events";
|
import EventEmitter from "events";
|
||||||
@ -23,7 +24,8 @@ export class tg extends EventEmitter {
|
|||||||
user: new Map(),
|
user: new Map(),
|
||||||
me: {},
|
me: {},
|
||||||
spurdo: false,
|
spurdo: false,
|
||||||
schmuser: false
|
schmuser: false,
|
||||||
|
schwitzer: false
|
||||||
};
|
};
|
||||||
this.connect().then(() => {
|
this.connect().then(() => {
|
||||||
this.poller = setInterval(() => { this.poll(); }, this.options.pollrate);
|
this.poller = setInterval(() => { this.poll(); }, this.options.pollrate);
|
||||||
@ -138,6 +140,8 @@ export class tg extends EventEmitter {
|
|||||||
msg = spurdo(msg);
|
msg = spurdo(msg);
|
||||||
if(this.server.schmuser)
|
if(this.server.schmuser)
|
||||||
msg = schmuser(msg);
|
msg = schmuser(msg);
|
||||||
|
if(this.server.schwitzer)
|
||||||
|
msg = schwitzer(msg);
|
||||||
return msg.toString()
|
return msg.toString()
|
||||||
.split("<").join("<")
|
.split("<").join("<")
|
||||||
.split(">").join(">")
|
.split(">").join(">")
|
||||||
|
4
src/inc/schwitzer.mjs
Normal file
4
src/inc/schwitzer.mjs
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export function schwitzer(text) {
|
||||||
|
text = text.split(" ");
|
||||||
|
return text.map(word => word.match(/(i|l)$/gm) ? word : `${word}li`).join(" ")
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user