Skip to content

Commit

Permalink
Passing pylint
Browse files Browse the repository at this point in the history
  • Loading branch information
SantiiRepair committed Oct 10, 2023
1 parent cfa3bd5 commit d27eba6
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions bot/helpers/queues.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,10 @@ def add_or_create_queue(
]
values: bytes = pickle.dumps(kw)
queue: dict = r.hgetall("queues")
if group_id in queue:
queue[group_id].append(values)
hset = r.hset("queues", group_id, queue[group_id])
giq: list = pickle.loads(queue[group_id])
if group_id in queue:
giq.append(values)
hset = r.hset("queues", group_id, pickle.dumps(giq))
if hset == 0:
return position
return False
Expand Down
4 changes: 2 additions & 2 deletions bot/plugins/commands/leave.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,10 @@
async def _(client: Client, message: Message):
try:
if VOICE_CHATS.get(message.chat.id) is None:
raise Exception("Streaming is not active")
raise Exception("No streams")
await VOICE_CHATS[message.chat.id].leave_current_group_call()
VOICE_CHATS.pop(message.chat.id)
await remove_queue(str(message.chat.id))
remove_queue(str(message.chat.id))
await message.reply(
"**__Goodbye master, just call me if you need me \U0001FAE1 \n\nVoice Chat left successfully__** \u2728",
)
Expand Down
2 changes: 1 addition & 1 deletion bot/plugins/commands/play_song.py
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ async def _(client: Client, message: Message):
[
InlineKeyboardButton("\u23EA", callback_data="back"),
InlineKeyboardButton(
"\u23F8\uFE0F",
"⏸️",
callback_data="pause_or_resume",
),
InlineKeyboardButton(
Expand Down

0 comments on commit d27eba6

Please sign in to comment.