This commit is contained in:
YouROK
2025-03-22 00:14:29 +03:00
parent 635882ea57
commit 11d9714234
11 changed files with 785 additions and 142 deletions

21
server/tgbot/delete.go Normal file
View File

@@ -0,0 +1,21 @@
package tgbot
import (
tele "gopkg.in/telebot.v4"
"server/torr"
)
func deleteTorrent(c tele.Context) {
args := c.Args()
hash := args[1]
torr.RemTorrent(hash)
return
}
func clear(c tele.Context) error {
torrents := torr.ListTorrent()
for _, t := range torrents {
torr.RemTorrent(t.TorrentSpec.InfoHash.HexString())
}
return nil
}