mirror of
https://github.com/ZeppelinBot/Zeppelin.git
synced 2025-05-18 23:55:02 +00:00
automod: don't use log system for alert actions, require channel id directly instead; allow disabling logging from specific rules
This commit is contained in:
parent
98908e8a9f
commit
08dbfaef5b
4 changed files with 50 additions and 22 deletions
|
@ -204,6 +204,11 @@ export class ZeppelinPlugin<TConfig extends {} = IBasePluginConfig> extends Plug
|
|||
return this.getMergedOptions();
|
||||
}
|
||||
|
||||
getUser(userResolvable: string): User | UnknownUser {
|
||||
const id = resolveUserId(this.bot, userResolvable);
|
||||
return id ? this.bot.users.get(id) || new UnknownUser({ id }) : new UnknownUser();
|
||||
}
|
||||
|
||||
/**
|
||||
* Resolves a user from the passed string. The passed string can be a user id, a user mention, a full username (with discrim), etc.
|
||||
* If the user is not found in the cache, it's fetched from the API.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue