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:
parent
5952ba13cb
commit
353ce30e6b
3 changed files with 295 additions and 134 deletions
13
src/utils.ts
13
src/utils.ts
|
@ -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 };
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue