rename module
This commit is contained in:
parent
257ed6f82b
commit
d5272262da
11 changed files with 48 additions and 40 deletions
11
bot.go
11
bot.go
|
@ -1,12 +1,13 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"github.com/rs/zerolog/log"
|
|
||||||
"time"
|
"time"
|
||||||
"watn3y/bloaterbotv3/botIO"
|
"watn3y/bloaterbot/botIO"
|
||||||
"watn3y/bloaterbotv3/commands"
|
"watn3y/bloaterbot/commands"
|
||||||
"watn3y/bloaterbotv3/commands/notify"
|
"watn3y/bloaterbot/commands/notify"
|
||||||
"watn3y/bloaterbotv3/text"
|
"watn3y/bloaterbot/text"
|
||||||
|
|
||||||
|
"github.com/rs/zerolog/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
func bot() {
|
func bot() {
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
package botIO
|
package botIO
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"watn3y/bloaterbot/config"
|
||||||
|
|
||||||
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
|
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
"watn3y/bloaterbotv3/config"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Authenticate() (tgbotapi.UpdatesChannel, *tgbotapi.BotAPI) {
|
func Authenticate() (tgbotapi.UpdatesChannel, *tgbotapi.BotAPI) {
|
||||||
|
|
|
@ -1,17 +1,18 @@
|
||||||
package commands
|
package commands
|
||||||
|
|
||||||
import (
|
import (
|
||||||
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
|
|
||||||
"github.com/rs/zerolog/log"
|
|
||||||
"os"
|
"os"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
"watn3y/bloaterbotv3/botIO"
|
"watn3y/bloaterbot/botIO"
|
||||||
"watn3y/bloaterbotv3/commands/download"
|
"watn3y/bloaterbot/commands/download"
|
||||||
"watn3y/bloaterbotv3/commands/gaypoints"
|
"watn3y/bloaterbot/commands/gaypoints"
|
||||||
"watn3y/bloaterbotv3/commands/notify"
|
"watn3y/bloaterbot/commands/notify"
|
||||||
"watn3y/bloaterbotv3/config"
|
"watn3y/bloaterbot/config"
|
||||||
|
|
||||||
|
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
|
||||||
|
"github.com/rs/zerolog/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Commands(update tgbotapi.Update, bot *tgbotapi.BotAPI) {
|
func Commands(update tgbotapi.Update, bot *tgbotapi.BotAPI) {
|
||||||
|
|
|
@ -2,8 +2,6 @@ package download
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"errors"
|
"errors"
|
||||||
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
|
|
||||||
"github.com/rs/zerolog/log"
|
|
||||||
"io"
|
"io"
|
||||||
log2 "log"
|
log2 "log"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
|
@ -16,9 +14,12 @@ import (
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
"watn3y/bloaterbotv3/botIO"
|
"watn3y/bloaterbot/botIO"
|
||||||
"watn3y/bloaterbotv3/commonlogic"
|
"watn3y/bloaterbot/commonlogic"
|
||||||
"watn3y/bloaterbotv3/config"
|
"watn3y/bloaterbot/config"
|
||||||
|
|
||||||
|
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
|
||||||
|
"github.com/rs/zerolog/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Download(update tgbotapi.Update, bot *tgbotapi.BotAPI) {
|
func Download(update tgbotapi.Update, bot *tgbotapi.BotAPI) {
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
package gaypoints
|
package gaypoints
|
||||||
|
|
||||||
import (
|
import (
|
||||||
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
|
|
||||||
"github.com/rs/zerolog/log"
|
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"watn3y/bloaterbotv3/botIO"
|
"watn3y/bloaterbot/botIO"
|
||||||
"watn3y/bloaterbotv3/commonlogic"
|
"watn3y/bloaterbot/commonlogic"
|
||||||
"watn3y/bloaterbotv3/config"
|
"watn3y/bloaterbot/config"
|
||||||
|
|
||||||
|
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
|
||||||
|
"github.com/rs/zerolog/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
func GetGP(update tgbotapi.Update, bot *tgbotapi.BotAPI) {
|
func GetGP(update tgbotapi.Update, bot *tgbotapi.BotAPI) {
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
package notify
|
package notify
|
||||||
|
|
||||||
import (
|
import (
|
||||||
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
|
|
||||||
"github.com/rs/zerolog/log"
|
|
||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
"watn3y/bloaterbotv3/botIO"
|
"watn3y/bloaterbot/botIO"
|
||||||
|
|
||||||
|
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
|
||||||
|
"github.com/rs/zerolog/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Reminder(update tgbotapi.Update, bot *tgbotapi.BotAPI) {
|
func Reminder(update tgbotapi.Update, bot *tgbotapi.BotAPI) {
|
||||||
|
|
2
go.mod
2
go.mod
|
@ -1,4 +1,4 @@
|
||||||
module watn3y/bloaterbotv3
|
module watn3y/bloaterbot
|
||||||
|
|
||||||
go 1.21
|
go 1.21
|
||||||
|
|
||||||
|
|
8
main.go
8
main.go
|
@ -5,10 +5,10 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"os"
|
"os"
|
||||||
"time"
|
"time"
|
||||||
"watn3y/bloaterbotv3/commands/gaypoints"
|
"watn3y/bloaterbot/commands/gaypoints"
|
||||||
"watn3y/bloaterbotv3/commands/notify"
|
"watn3y/bloaterbot/commands/notify"
|
||||||
"watn3y/bloaterbotv3/config"
|
"watn3y/bloaterbot/config"
|
||||||
"watn3y/bloaterbotv3/webserver"
|
"watn3y/bloaterbot/webserver"
|
||||||
|
|
||||||
"github.com/rs/zerolog"
|
"github.com/rs/zerolog"
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
|
|
|
@ -1,9 +1,10 @@
|
||||||
package balonlyl
|
package balonlyl
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"watn3y/bloaterbot/botIO"
|
||||||
|
"watn3y/bloaterbot/config"
|
||||||
|
|
||||||
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
|
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
|
||||||
"watn3y/bloaterbotv3/botIO"
|
|
||||||
"watn3y/bloaterbotv3/config"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func Balonlyl(update tgbotapi.Update, bot *tgbotapi.BotAPI) {
|
func Balonlyl(update tgbotapi.Update, bot *tgbotapi.BotAPI) {
|
||||||
|
|
|
@ -1,13 +1,14 @@
|
||||||
package text
|
package text
|
||||||
|
|
||||||
import (
|
import (
|
||||||
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
|
|
||||||
"github.com/rs/zerolog/log"
|
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
"time"
|
||||||
"watn3y/bloaterbotv3/commonlogic"
|
"watn3y/bloaterbot/commonlogic"
|
||||||
"watn3y/bloaterbotv3/config"
|
"watn3y/bloaterbot/config"
|
||||||
"watn3y/bloaterbotv3/text/balonlyl"
|
"watn3y/bloaterbot/text/balonlyl"
|
||||||
|
|
||||||
|
tgbotapi "github.com/go-telegram-bot-api/telegram-bot-api/v5"
|
||||||
|
"github.com/rs/zerolog/log"
|
||||||
)
|
)
|
||||||
|
|
||||||
func Matcher(update tgbotapi.Update, bot *tgbotapi.BotAPI) {
|
func Matcher(update tgbotapi.Update, bot *tgbotapi.BotAPI) {
|
||||||
|
|
|
@ -2,7 +2,7 @@ package webserver
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"net/http"
|
"net/http"
|
||||||
"watn3y/bloaterbotv3/config"
|
"watn3y/bloaterbot/config"
|
||||||
|
|
||||||
"github.com/rs/zerolog/log"
|
"github.com/rs/zerolog/log"
|
||||||
)
|
)
|
||||||
|
@ -13,7 +13,7 @@ func RunWeb() {
|
||||||
|
|
||||||
log.Info().Str("port", config.BotConfig.Webserver.Port).Str("path", "./videos").Msg("Starting webserver")
|
log.Info().Str("port", config.BotConfig.Webserver.Port).Str("path", "./videos").Msg("Starting webserver")
|
||||||
|
|
||||||
err := http.ListenAndServe(":" + config.BotConfig.Webserver.Port, nil)
|
err := http.ListenAndServe(":"+config.BotConfig.Webserver.Port, nil)
|
||||||
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Panic().Err(err).Msg("Failed to start webserver")
|
log.Panic().Err(err).Msg("Failed to start webserver")
|
||||||
|
|
Loading…
Reference in a new issue