migrate to docker
This commit is contained in:
@@ -8,7 +8,7 @@ from aiogram.types import (
|
||||
|
||||
from bot.modules.database import db
|
||||
from bot.modules.deezer import DeezerBytestream, deezer
|
||||
from bot.utils.config import config
|
||||
from bot.utils import env
|
||||
|
||||
router = Router()
|
||||
|
||||
@@ -20,7 +20,7 @@ async def on_new_chosen(chosen_result: ChosenInlineResult, bot: Bot):
|
||||
).to_bytestream()
|
||||
|
||||
audio = await bot.send_audio(
|
||||
chat_id=config.telegram.files_chat,
|
||||
chat_id=env.FILES_CHAT,
|
||||
audio=BufferedInputFile(
|
||||
file=bytestream.file,
|
||||
filename=bytestream.filename,
|
||||
|
||||
@@ -6,7 +6,7 @@ from aiogram.types import BufferedInputFile, ChosenInlineResult, InputMediaAudio
|
||||
from bot.modules.database import db
|
||||
from bot.modules.settings import UserSettings
|
||||
from bot.modules.youtube.downloader import YouTubeBytestream
|
||||
from bot.utils.config import config
|
||||
from bot.utils import env
|
||||
|
||||
router = Router()
|
||||
|
||||
@@ -42,7 +42,7 @@ async def on_cached_chosen(
|
||||
)
|
||||
|
||||
message = await bot.forward_message(
|
||||
config.telegram.files_chat, config.telegram.files_chat, db.recoded[song_id]
|
||||
env.FILES_CHAT, env.FILES_CHAT, db.recoded[song_id]
|
||||
)
|
||||
|
||||
song_io: BytesIO = await bot.download( # type: ignore
|
||||
@@ -60,7 +60,7 @@ async def on_cached_chosen(
|
||||
await bytestream.rerender()
|
||||
|
||||
audio = await bot.send_audio(
|
||||
chat_id=config.telegram.files_chat,
|
||||
chat_id=env.FILES_CHAT,
|
||||
audio=BufferedInputFile(
|
||||
file=bytestream.file,
|
||||
filename=bytestream.filename,
|
||||
|
||||
@@ -8,7 +8,7 @@ from aiogram.types import (
|
||||
|
||||
from bot.modules.database import db
|
||||
from bot.modules.soundcloud import SoundCloudBytestream, soundcloud
|
||||
from bot.utils.config import config
|
||||
from bot.utils import env
|
||||
|
||||
router = Router()
|
||||
|
||||
@@ -22,7 +22,7 @@ async def on_new_chosen(chosen_result: ChosenInlineResult, bot: Bot):
|
||||
).to_bytestream()
|
||||
|
||||
audio = await bot.send_audio(
|
||||
chat_id=config.telegram.files_chat,
|
||||
chat_id=env.FILES_CHAT,
|
||||
audio=BufferedInputFile(
|
||||
file=bytestream.file,
|
||||
filename=bytestream.filename,
|
||||
|
||||
@@ -12,7 +12,7 @@ from bot.modules.settings import UserSettings
|
||||
from bot.modules.spotify import spotify
|
||||
from bot.modules.youtube import AgeRestrictedError, youtube
|
||||
from bot.modules.youtube.song import SongItem
|
||||
from bot.utils.config import config
|
||||
from bot.utils import env
|
||||
|
||||
router = Router()
|
||||
|
||||
@@ -55,7 +55,7 @@ async def on_new_chosen(
|
||||
bytestream = await yt_song.to_bytestream()
|
||||
|
||||
audio = await bot.send_audio(
|
||||
chat_id=config.telegram.files_chat,
|
||||
chat_id=env.FILES_CHAT,
|
||||
audio=BufferedInputFile(
|
||||
file=bytestream.file,
|
||||
filename=bytestream.filename,
|
||||
@@ -87,7 +87,7 @@ async def on_new_chosen(
|
||||
).to_bytestream()
|
||||
|
||||
audio = await bot.send_audio(
|
||||
chat_id=config.telegram.files_chat,
|
||||
chat_id=env.FILES_CHAT,
|
||||
audio=BufferedInputFile(
|
||||
file=bytestream.file,
|
||||
filename=bytestream.filename,
|
||||
@@ -130,7 +130,7 @@ async def on_new_chosen(
|
||||
await bytestream.rerender()
|
||||
|
||||
audio = await bot.send_audio(
|
||||
chat_id=config.telegram.files_chat,
|
||||
chat_id=env.FILES_CHAT,
|
||||
audio=BufferedInputFile(
|
||||
file=bytestream.file,
|
||||
filename=bytestream.filename,
|
||||
|
||||
@@ -9,7 +9,7 @@ from aiogram.types import (
|
||||
from bot.modules.database import db
|
||||
from bot.modules.settings import UserSettings
|
||||
from bot.modules.youtube import AgeRestrictedError, youtube
|
||||
from bot.utils.config import config
|
||||
from bot.utils import env
|
||||
|
||||
router = Router()
|
||||
|
||||
@@ -32,7 +32,7 @@ async def on_new_chosen(
|
||||
return
|
||||
|
||||
audio = await bot.send_audio(
|
||||
chat_id=config.telegram.files_chat,
|
||||
chat_id=env.FILES_CHAT,
|
||||
audio=BufferedInputFile(
|
||||
file=bytestream.file,
|
||||
filename=bytestream.filename,
|
||||
@@ -61,7 +61,7 @@ async def on_new_chosen(
|
||||
await bytestream.rerender()
|
||||
|
||||
audio = await bot.send_audio(
|
||||
chat_id=config.telegram.files_chat,
|
||||
chat_id=env.FILES_CHAT,
|
||||
audio=BufferedInputFile(
|
||||
file=bytestream.file,
|
||||
filename=bytestream.filename,
|
||||
|
||||
Reference in New Issue
Block a user