This commit is contained in:
SmileRex
2025-01-24 10:38:30 +03:00
parent c20348036d
commit 65350adcba
2 changed files with 13 additions and 13 deletions

View File

@@ -1,21 +1,20 @@
package handlers
package controllers
import (
"bot/src/controllers"
"fmt"
tele "gopkg.in/telebot.v4"
)
type Handlers struct {
DC *controllers.DataController
type DickController struct {
DC *DataController
}
func NewHandlers(db *controllers.DataController) *Handlers {
return &Handlers{DC: db}
func NewDick(db *DataController) *DickController {
return &DickController{DC: db}
}
func (d *Handlers) Dick(c tele.Context) error {
func (d *DickController) Dick(c tele.Context) error {
var retMessage string
id := c.Sender().ID
@@ -29,7 +28,7 @@ func (d *Handlers) Dick(c tele.Context) error {
user = d.DC.GetUser(id)
}
newRange := controllers.RandRange()
newRange := RandRange()
newSize := user.DickSize + newRange
if user.Blocked {
@@ -49,7 +48,7 @@ func (d *Handlers) Dick(c tele.Context) error {
return c.Send(retMessage)
}
func (d *Handlers) TopDick(c tele.Context) error {
func (d *DickController) TopDick(c tele.Context) error {
var retMessage string
users := d.DC.GetTopUsers()