mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-03-18 15:00:00 +00:00
20 lines
626 B
TypeScript
20 lines
626 B
TypeScript
import { Plugin } from "knub";
|
|
import { PluginRuntimeError } from "../PluginRuntimeError";
|
|
import { TextableChannel } from "eris";
|
|
import { errorMessage, successMessage } from "../utils";
|
|
|
|
export class ZeppelinPlugin extends Plugin {
|
|
protected throwPluginRuntimeError(message: string) {
|
|
throw new PluginRuntimeError(message, this.runtimePluginName, this.guildId);
|
|
}
|
|
|
|
protected canActOn(member1, member2) {
|
|
if (member1.id === member2.id) {
|
|
return false;
|
|
}
|
|
|
|
const ourLevel = this.getMemberLevel(member1);
|
|
const memberLevel = this.getMemberLevel(member2);
|
|
return ourLevel > memberLevel;
|
|
}
|
|
}
|