3
0
Fork 0
mirror of https://github.com/ZeppelinBot/Zeppelin.git synced 2025-05-17 23:25:02 +00:00

Fix user mentions not working for mod actions. Allow using plain username to target users with mod actions. Make error messages more consistent.

This commit is contained in:
Dragory 2019-04-19 12:25:25 +03:00
parent 5952ba13cb
commit 353ce30e6b
3 changed files with 295 additions and 134 deletions

View file

@ -496,8 +496,19 @@ export function ucfirst(str) {
return str[0].toUpperCase() + str.slice(1);
}
export const unknownUser = {
export type UnknownUser = {
id: string;
username: string;
discriminator: string;
[key: string]: any;
};
export const unknownUser: UnknownUser = {
id: "0",
username: "Unknown",
discriminator: "0000",
};
export function createUnknownUser(props = {}): UnknownUser {
return { ...unknownUser, ...props };
}