Skip to content
This repository has been archived by the owner on Sep 12, 2024. It is now read-only.

Commit

Permalink
Some fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
TheHamkerCat committed Aug 22, 2021
1 parent 0ec7b82 commit 9dceee7
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,6 @@ async def joinvc(_, message, manual=False):
return await message.reply_text(
"__**Bot Is Already In The VC**__"
)
await message.delete()
os.popen(f"cp etc/sample_input.raw {PLAYOUT_FILE}")
vc = pytgcalls.GroupCallFactory(
app, CLIENT_TYPE, OUTGOING_AUDIO_BITRATE_KBIT
Expand Down Expand Up @@ -198,12 +197,10 @@ async def queuer(_, message):
and not message.reply_to_message
):
return await message.reply_text(usage)
await message.delete()
if "call" not in db:
return await message.reply_text(
"**Use /joinvc First!**"
)
await message.delete()
if message.reply_to_message:
if message.reply_to_message.audio:
service = "telegram"
Expand All @@ -212,7 +209,6 @@ async def queuer(_, message):
return await message.reply_text(
"**Reply to a telegram audio file**"
)
await message.delete()
else:
text = message.text.split("\n")[0]
text = text.split(None, 2)[1:]
Expand All @@ -223,12 +219,14 @@ async def queuer(_, message):
else:
service = get_default_service()
song_name = " ".join(text)
if "http" in song_name or ".com" in song_name:
return await message.reply("Links aren't supported.")

requested_by = message.from_user.first_name
if "queue" not in db:
db["queue"] = asyncio.Queue()
if not db["queue"].empty() or db.get("running"):
await message.reply_text("__**Added To Queue.__**")
await message.delete()

await db["queue"].put(
{
Expand Down

0 comments on commit 9dceee7

Please sign in to comment.