Documentation
¶
Overview ¶
* This file is part of YukkiMusic. * * YukkiMusic — A Telegram bot that streams music into group voice chats with seamless playback and control. * Copyright (C) 2025 TheTeamVivek * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>.
* This file is part of YukkiMusic. * * YukkiMusic — A Telegram bot that streams music into group voice chats with seamless playback and control. * Copyright (C) 2025 TheTeamVivek * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>.
* This file is part of YukkiMusic. * * YukkiMusic — A Telegram bot that streams music into group voice chats with seamless playback and control. * Copyright (C) 2025 TheTeamVivek * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>.
* This file is part of YukkiMusic. * * YukkiMusic — A Telegram bot that streams music into group voice chats with seamless playback and control. * Copyright (C) 2025 TheTeamVivek * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>.
* This file is part of YukkiMusic. * * YukkiMusic — A Telegram bot that streams music into group voice chats with seamless playback and control. * Copyright (C) 2025 TheTeamVivek * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>.
* This file is part of YukkiMusic. * * YukkiMusic — A Telegram bot that streams music into group voice chats with seamless playback and control. * Copyright (C) 2025 TheTeamVivek * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>.
* This file is part of YukkiMusic. * * YukkiMusic — A Telegram bot that streams music into group voice chats with seamless playback and control. * Copyright (C) 2025 TheTeamVivek * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>.
* This file is part of YukkiMusic. * * YukkiMusic — A Telegram bot that streams music into group voice chats with seamless playback and control. * Copyright (C) 2025 TheTeamVivek * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>.
* This file is part of YukkiMusic. * * YukkiMusic — A Telegram bot that streams music into group voice chats with seamless playback and control. * Copyright (C) 2025 TheTeamVivek * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. * * You should have received a copy of the GNU General Public License * along with this program. If not, see <https://www.gnu.org/licenses/>.
Index ¶
- func AddChatAdmin(c *telegram.Client, chatID, userID int64) error
- func CanAct(key string) bool
- func CleanURL(raw string) string
- func EOR(msg *telegram.NewMessage, text string, opts ...telegram.SendOptions) (m *telegram.NewMessage, err error)
- func ExtractURLs(m *telegram.NewMessage) ([]string, error)
- func ExtractUser(m *telegram.NewMessage) (int64, error)
- func GetDuration(f *telegram.MessageMediaDocument) int
- func GetDurationByFFProbe(filePath string) (int, error)
- func GetFlood(key string) time.Duration
- func GetPeerID(c *telegram.Client, chatId any) (int64, error)
- func GetProgress(mystic *telegram.NewMessage) *telegram.ProgressManager
- func GetProgressBar(playedSec, durationSec int) string
- func IsChatAdmin(c *telegram.Client, chatID, userID int64) (bool, error)
- func MentionHTML(u *telegram.UserObj) string
- func ParseBool(s string) (bool, error)
- func ReloadChatAdmin(c *telegram.Client, chatID int64) ([]int64, error)
- func RemoveChatAdmin(c *telegram.Client, chatID, userID int64) error
- func SetFlood(key string, duration time.Duration)
- func ShortTitle(title string, max ...int) string
- type Cache
- type CacheItem
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddChatAdmin ¶
Adds a user to the cached admin list, auto-reloading if cache is missing
func EOR ¶
func EOR(msg *telegram.NewMessage, text string, opts ...telegram.SendOptions) (m *telegram.NewMessage, err error)
func ExtractURLs ¶
func ExtractURLs(m *telegram.NewMessage) ([]string, error)
func ExtractUser ¶
func ExtractUser(m *telegram.NewMessage) (int64, error)
func GetDuration ¶
func GetDuration(f *telegram.MessageMediaDocument) int
func GetDurationByFFProbe ¶
func GetFlood ¶
GetFlood returns the remaining cooldown time for a key. If zero or negative, the action is allowed.
func GetProgress ¶
func GetProgress(mystic *telegram.NewMessage) *telegram.ProgressManager
func GetProgressBar ¶
func IsChatAdmin ¶
Checks if a user is an admin in a chat
func MentionHTML ¶
func ParseBool ¶
ParseBool converts strings like "on", "off", "enable", "disable", "true", "false" into a boolean value. Returns an error if input is invalid.
func ReloadChatAdmin ¶
Reloads the chat admins from Telegram and updates the cache
func RemoveChatAdmin ¶
Removes a user from the cached admin list, auto-reloading if cache is missing
func SetFlood ¶
SetFlood sets a flood timeout for the key. 'duration' specifies how long the key should be blocked.
func ShortTitle ¶
Types ¶
type Cache ¶
type Cache[K comparable, V any] struct { // contains filtered or unexported fields }