mirror of
https://github.com/hack-chat/main.git
synced 2024-03-22 13:20:33 +08:00
34 lines
651 B
JavaScript
34 lines
651 B
JavaScript
/* Base error ranges */
|
|
const GlobalErrors = 10;
|
|
const JoinErrors = 20;
|
|
const ChannelErrors = 30;
|
|
const InviteErrors = 40;
|
|
|
|
/**
|
|
* Holds the numeric id values for each error type
|
|
* @typedef {object} Errors
|
|
*/
|
|
exports.Errors = {
|
|
Global: {
|
|
RATELIMIT: GlobalErrors + 1,
|
|
UNKNOWN_USER: GlobalErrors + 2,
|
|
PERMISSION: GlobalErrors + 3,
|
|
},
|
|
|
|
Join: {
|
|
RATELIMIT: JoinErrors + 1,
|
|
INVALID_NICK: JoinErrors + 2,
|
|
ALREADY_JOINED: JoinErrors + 3,
|
|
NAME_TAKEN: JoinErrors + 4,
|
|
},
|
|
|
|
Channel: {
|
|
INVALID_NAME: ChannelErrors + 1,
|
|
INVALID_LENGTH: ChannelErrors + 2,
|
|
},
|
|
|
|
Invite: {
|
|
RATELIMIT: InviteErrors + 1,
|
|
},
|
|
};
|