Skip to content

Commit f313280

Browse files
committed
Add 'typing' status when fetching mod information from the mod portal
1 parent ffe68ec commit f313280

2 files changed

Lines changed: 7 additions & 0 deletions

File tree

commands/admin/mod.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -249,8 +249,10 @@ func ModCommand(s *discordgo.Session, args string) {
249249
var res string
250250
switch action {
251251
case "add":
252+
support.SetTyping(s)
252253
res = modsAdd(s, mods, &modDescriptions)
253254
case "update":
255+
support.SetTyping(s)
254256
res = modsUpdate(s, mods, &modDescriptions)
255257
case "remove":
256258
res = modsRemove(mods, modnames)

support/utils.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,11 @@ func ChunkedMessageSend(s *discordgo.Session, message string) {
7474
}
7575
}
7676

77+
func SetTyping(s *discordgo.Session) {
78+
err := s.ChannelTyping(Config.FactorioChannelID)
79+
Panik(err, "... when sending 'typing' status")
80+
}
81+
7782
func FormatUsage(s string) string {
7883
return strings.Replace(s, "$", Config.Prefix, -1)
7984
}

0 commit comments

Comments
 (0)