mirror of
https://github.com/Ernous/TorrServerJellyfin.git
synced 2025-12-20 14:06:09 +05:00
24 lines
362 B
Go
24 lines
362 B
Go
package tgbot
|
|
|
|
import (
|
|
tele "gopkg.in/telebot.v4"
|
|
up "server/tgbot/upload"
|
|
"strconv"
|
|
)
|
|
|
|
func upload(c tele.Context) error {
|
|
args := c.Args()
|
|
idstr := args[2]
|
|
id, err := strconv.Atoi(idstr)
|
|
if err != nil {
|
|
return err
|
|
}
|
|
up.AddRange(c, args[1], id, id)
|
|
return nil
|
|
}
|
|
|
|
func uploadall(c tele.Context) {
|
|
args := c.Args()
|
|
up.AddRange(c, args[1], 1, -1)
|
|
}
|