forked from engineering/cloudservices
Promise rejection wording change
parent
cd187b21f9
commit
72764f7e14
|
@ -158,7 +158,7 @@ export default class Util {
|
||||||
public async createModerationLog(user: string, moderator: Member, type: number, reason?: string, duration?: number): Promise<ModerationInterface> {
|
public async createModerationLog(user: string, moderator: Member, type: number, reason?: string, duration?: number): Promise<ModerationInterface> {
|
||||||
const moderatorID = moderator.id;
|
const moderatorID = moderator.id;
|
||||||
const account = await this.client.db.Account.findOne({ $or: [{ username: user }, { userID: user }] });
|
const account = await this.client.db.Account.findOne({ $or: [{ username: user }, { userID: user }] });
|
||||||
if (!account) return Promise.reject(new Error('Account not found'));
|
if (!account) return Promise.reject(new Error(`Account ${user} not found`));
|
||||||
const { username, userID } = account;
|
const { username, userID } = account;
|
||||||
const logInput: { username: string, userID: string, logID: string, moderatorID: string, reason?: string, type: number, date: Date, expiration?: { date: Date, processed: boolean }} = {
|
const logInput: { username: string, userID: string, logID: string, moderatorID: string, reason?: string, type: number, date: Date, expiration?: { date: Date, processed: boolean }} = {
|
||||||
username, userID, logID: uuid(), moderatorID, type, date: new Date(),
|
username, userID, logID: uuid(), moderatorID, type, date: new Date(),
|
||||||
|
|
Loading…
Reference in New Issue