-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
stdcommands.go
165 lines (152 loc) · 5.34 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
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
package stdcommands
import (
"github.com/mrbentarikau/pagst/bot"
"github.com/mrbentarikau/pagst/bot/eventsystem"
"github.com/mrbentarikau/pagst/commands"
"github.com/mrbentarikau/pagst/common"
"github.com/mrbentarikau/pagst/stdcommands/addspecialserver"
"github.com/mrbentarikau/pagst/stdcommands/advice"
"github.com/mrbentarikau/pagst/stdcommands/allocstat"
"github.com/mrbentarikau/pagst/stdcommands/banserver"
"github.com/mrbentarikau/pagst/stdcommands/banserverowner"
"github.com/mrbentarikau/pagst/stdcommands/bashquotes"
"github.com/mrbentarikau/pagst/stdcommands/calc"
"github.com/mrbentarikau/pagst/stdcommands/catfact"
"github.com/mrbentarikau/pagst/stdcommands/ccreqs"
"github.com/mrbentarikau/pagst/stdcommands/covidstats"
"github.com/mrbentarikau/pagst/stdcommands/createinvite"
"github.com/mrbentarikau/pagst/stdcommands/currentshard"
"github.com/mrbentarikau/pagst/stdcommands/currenttime"
"github.com/mrbentarikau/pagst/stdcommands/customembed"
"github.com/mrbentarikau/pagst/stdcommands/dcallvoice"
"github.com/mrbentarikau/pagst/stdcommands/define"
"github.com/mrbentarikau/pagst/stdcommands/dogfact"
"github.com/mrbentarikau/pagst/stdcommands/editchannelpermissions"
"github.com/mrbentarikau/pagst/stdcommands/editrole"
"github.com/mrbentarikau/pagst/stdcommands/exportcustomcommands"
"github.com/mrbentarikau/pagst/stdcommands/findserver"
"github.com/mrbentarikau/pagst/stdcommands/getiplocation"
"github.com/mrbentarikau/pagst/stdcommands/globalrl"
"github.com/mrbentarikau/pagst/stdcommands/guildunavailable"
"github.com/mrbentarikau/pagst/stdcommands/howlongtobeat"
"github.com/mrbentarikau/pagst/stdcommands/info"
"github.com/mrbentarikau/pagst/stdcommands/invite"
"github.com/mrbentarikau/pagst/stdcommands/leaveserver"
"github.com/mrbentarikau/pagst/stdcommands/listflags"
"github.com/mrbentarikau/pagst/stdcommands/listroles"
"github.com/mrbentarikau/pagst/stdcommands/memstats"
"github.com/mrbentarikau/pagst/stdcommands/openweathermap"
"github.com/mrbentarikau/pagst/stdcommands/owldictionary"
"github.com/mrbentarikau/pagst/stdcommands/pagstatus"
"github.com/mrbentarikau/pagst/stdcommands/ping"
"github.com/mrbentarikau/pagst/stdcommands/poll"
"github.com/mrbentarikau/pagst/stdcommands/quack"
"github.com/mrbentarikau/pagst/stdcommands/removespecialserver"
"github.com/mrbentarikau/pagst/stdcommands/roll"
"github.com/mrbentarikau/pagst/stdcommands/setstatus"
"github.com/mrbentarikau/pagst/stdcommands/simpleembed"
"github.com/mrbentarikau/pagst/stdcommands/sleep"
"github.com/mrbentarikau/pagst/stdcommands/statedbg"
"github.com/mrbentarikau/pagst/stdcommands/stateinfo"
"github.com/mrbentarikau/pagst/stdcommands/throw"
"github.com/mrbentarikau/pagst/stdcommands/toggledbg"
"github.com/mrbentarikau/pagst/stdcommands/topcommands"
"github.com/mrbentarikau/pagst/stdcommands/topevents"
"github.com/mrbentarikau/pagst/stdcommands/topgames"
"github.com/mrbentarikau/pagst/stdcommands/topic"
"github.com/mrbentarikau/pagst/stdcommands/topservers"
"github.com/mrbentarikau/pagst/stdcommands/unbanserver"
"github.com/mrbentarikau/pagst/stdcommands/undelete"
"github.com/mrbentarikau/pagst/stdcommands/viewperms"
"github.com/mrbentarikau/pagst/stdcommands/weather"
"github.com/mrbentarikau/pagst/stdcommands/wolframalpha"
"github.com/mrbentarikau/pagst/stdcommands/wouldyourather"
"github.com/mrbentarikau/pagst/stdcommands/xkcd"
)
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(p,
// Info
info.Command,
invite.Command,
// Standard
advice.Command,
bashquotes.Command,
calc.Command,
catfact.Command,
covidstats.Command,
currenttime.Command,
customembed.Command,
define.Command,
dogfact.Command,
editchannelpermissions.Command,
editrole.Command,
getiplocation.Command,
howlongtobeat.Command,
listroles.Command,
openweathermap.Command,
ping.Command,
poll.Command,
quack.Command,
roll.Command,
simpleembed.Command,
throw.Command,
topgames.Command,
topic.Command,
undelete.Command,
viewperms.Command,
weather.Command,
wolframalpha.Command,
wouldyourather.Command,
xkcd.Command,
// Maintenance
addspecialserver.Command,
allocstat.Command,
banserver.Command,
banserverowner.Command,
ccreqs.Command,
createinvite.Command,
currentshard.Command,
dcallvoice.Command,
exportcustomcommands.Command,
findserver.Command,
globalrl.Command,
guildunavailable.Command,
leaveserver.Command,
listflags.Command,
memstats.Command,
pagstatus.Command,
removespecialserver.Command,
setstatus.Command,
sleep.Command,
stateinfo.Command,
toggledbg.Command,
topcommands.Command,
topevents.Command,
topservers.Command,
unbanserver.Command,
)
statedbg.Commands()
if !owldictionary.ShouldRegister() {
common.GetPluginLogger(p).Warn("Owlbot API token not provided, skipping adding dictionary command...")
return
}
commands.AddRootCommands(p, owldictionary.Command)
}
func (p *Plugin) BotInit() {
eventsystem.AddHandlerAsyncLastLegacy(p, ping.HandleMessageCreate, eventsystem.EventMessageCreate)
}
func RegisterPlugin() {
common.RegisterPlugin(&Plugin{})
}