forked from botlabs-gg/yagpdb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
stdcommands.go
129 lines (119 loc) · 3.82 KB
/
stdcommands.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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
package stdcommands
import (
"github.com/jonas747/yagpdb/bot"
"github.com/jonas747/yagpdb/bot/eventsystem"
"github.com/jonas747/yagpdb/commands"
"github.com/jonas747/yagpdb/common"
"github.com/jonas747/yagpdb/stdcommands/advice"
"github.com/jonas747/yagpdb/stdcommands/allocstat"
"github.com/jonas747/yagpdb/stdcommands/banserver"
"github.com/jonas747/yagpdb/stdcommands/calc"
"github.com/jonas747/yagpdb/stdcommands/catfact"
"github.com/jonas747/yagpdb/stdcommands/ccreqs"
"github.com/jonas747/yagpdb/stdcommands/createinvite"
"github.com/jonas747/yagpdb/stdcommands/currentshard"
"github.com/jonas747/yagpdb/stdcommands/currenttime"
"github.com/jonas747/yagpdb/stdcommands/customembed"
"github.com/jonas747/yagpdb/stdcommands/dcallvoice"
"github.com/jonas747/yagpdb/stdcommands/define"
"github.com/jonas747/yagpdb/stdcommands/dogfact"
"github.com/jonas747/yagpdb/stdcommands/findserver"
"github.com/jonas747/yagpdb/stdcommands/globalrl"
"github.com/jonas747/yagpdb/stdcommands/info"
"github.com/jonas747/yagpdb/stdcommands/invite"
"github.com/jonas747/yagpdb/stdcommands/leaveserver"
"github.com/jonas747/yagpdb/stdcommands/listroles"
"github.com/jonas747/yagpdb/stdcommands/memberfetcher"
"github.com/jonas747/yagpdb/stdcommands/mentionrole"
"github.com/jonas747/yagpdb/stdcommands/ping"
"github.com/jonas747/yagpdb/stdcommands/poll"
"github.com/jonas747/yagpdb/stdcommands/reverse"
"github.com/jonas747/yagpdb/stdcommands/roll"
"github.com/jonas747/yagpdb/stdcommands/setstatus"
"github.com/jonas747/yagpdb/stdcommands/simpleembed"
"github.com/jonas747/yagpdb/stdcommands/sleep"
"github.com/jonas747/yagpdb/stdcommands/stateinfo"
"github.com/jonas747/yagpdb/stdcommands/throw"
"github.com/jonas747/yagpdb/stdcommands/toggledbg"
"github.com/jonas747/yagpdb/stdcommands/topcommands"
"github.com/jonas747/yagpdb/stdcommands/topevents"
"github.com/jonas747/yagpdb/stdcommands/topgames"
"github.com/jonas747/yagpdb/stdcommands/topic"
"github.com/jonas747/yagpdb/stdcommands/topservers"
"github.com/jonas747/yagpdb/stdcommands/unbanserver"
"github.com/jonas747/yagpdb/stdcommands/undelete"
"github.com/jonas747/yagpdb/stdcommands/viewperms"
"github.com/jonas747/yagpdb/stdcommands/weather"
"github.com/jonas747/yagpdb/stdcommands/wouldyourather"
"github.com/jonas747/yagpdb/stdcommands/xkcd"
"github.com/jonas747/yagpdb/stdcommands/yagstatus"
)
var (
_ bot.BotInitHandler = (*Plugin)(nil)
_ commands.CommandProvider = (*Plugin)(nil)
)
type Plugin struct{}
func (p *Plugin) PluginInfo() *common.PluginInfo {
return &common.PluginInfo{
Name: "Standard Commands",
SysName: "standard_commands",
Category: common.PluginCategoryCore,
}
}
func (p *Plugin) AddCommands() {
commands.AddRootCommands(
// Info
info.Command,
invite.Command,
// Standard
define.Command,
reverse.Command,
weather.Command,
calc.Command,
topic.Command,
catfact.Command,
dogfact.Command,
advice.Command,
ping.Command,
throw.Command,
roll.Command,
customembed.Command,
simpleembed.Command,
currenttime.Command,
mentionrole.Command,
listroles.Command,
wouldyourather.Command,
poll.Command,
undelete.Command,
viewperms.Command,
topgames.Command,
xkcd.Command,
// Maintenance
stateinfo.Command,
leaveserver.Command,
banserver.Command,
allocstat.Command,
unbanserver.Command,
topservers.Command,
topcommands.Command,
topevents.Command,
currentshard.Command,
memberfetcher.Command,
yagstatus.Command,
setstatus.Command,
createinvite.Command,
findserver.Command,
dcallvoice.Command,
ccreqs.Command,
sleep.Command,
toggledbg.Command,
globalrl.Command,
)
}
func (p *Plugin) BotInit() {
eventsystem.AddHandlerAsyncLast(ping.HandleMessageCreate, eventsystem.EventMessageCreate)
mentionrole.AddScheduledEventListener()
}
func RegisterPlugin() {
common.RegisterPlugin(&Plugin{})
}