/
vars.go
58 lines (43 loc) · 1.67 KB
/
vars.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
package rosetta
import (
"errors"
)
const (
ObjectMapKeyRouter = "rosetta_router"
)
// ErrorType is the type of error happened while parsing in router.
type ErrorType int
const (
ErrTypeGuildPrefixGetter ErrorType = iota
ErrTypeGetChannel
ErrTypeGetGuild
ErrTypeCommandNotFound
ErrTypeNotExecutableInDM
ErrTypeMiddleware
ErrTypeCommandExec
ErrTypeDeleteCommandMessage
)
var (
// ErrRateLimited is thrown when users spam commands =).
ErrRateLimited = errors.New("rate limited")
// ErrInvokeDoesNotExists is thrown when given command invoker doesn't exists.
ErrInvokeDoesNotExists = errors.New("given invoke doesn't exists")
// ErrGuildPrefixGetter is thrown GuildPrefixGetter failed.
ErrGuildPrefixGetter = errors.New("error while getting guild prefix")
// ErrGetChannel is thrown while getting channel.
ErrGetChannel = errors.New("error while getting channel")
// ErrGetGuild is thrown while getting guild.
ErrGetGuild = errors.New("error while getting guild")
// ErrCommandNotFound is thrown when command is not found.
ErrCommandNotFound = errors.New("command not found")
// ErrNotExecutableInDMs is thrown when command is not allowed to run in DMs.
ErrNotExecutableInDMs = errors.New("command is not executable in DMs")
// ErrMiddleware is thrown when middleware failed unexpectedly.
ErrMiddleware = errors.New("middleware error")
// ErrCommandExec is thrown when command exec failed.
ErrCommandExec = errors.New("command failed to execute")
// ErrDeleteCommandMessage is thrown when error occurred when deleting message.
ErrDeleteCommandMessage = errors.New("failed while deleting command message")
EmbedColorDefault = 0x6A5ACD
EmbedColorError = 0xE53935
)