add !pm banlist:totals, fix notices on reactions

This commit is contained in:
Aine
2023-09-28 08:30:37 +03:00
parent 7fbb279830
commit da41bd31fb
10 changed files with 64 additions and 10 deletions

View File

@@ -31,6 +31,7 @@ const (
commandSpamlistReset = "spam:reset"
commandDelete = "delete"
commandBanlist = "banlist"
commandBanlistTotals = "banlist:totals"
commandBanlistAuto = "banlist:auto"
commandBanlistAuth = "banlist:auth"
commandBanlistAdd = "banlist:add"
@@ -315,6 +316,11 @@ func (b *Bot) initCommands() commandList {
description: "Enable/disable automatic banning of IP addresses when they try to send invalid emails",
allowed: b.allowAdmin,
},
{
key: commandBanlistTotals,
description: "List banlist totals only",
allowed: b.allowAdmin,
},
{
key: commandBanlistAdd,
description: "Ban an IP",
@@ -404,6 +410,8 @@ func (b *Bot) handle(ctx context.Context) {
b.runBanlistAuth(ctx, commandSlice)
case commandBanlistAuto:
b.runBanlistAuto(ctx, commandSlice)
case commandBanlistTotals:
b.runBanlistTotals(ctx)
case commandBanlistAdd:
b.runBanlistAdd(ctx, commandSlice)
case commandBanlistRemove: