Skip to content
Snippets Groups Projects
Commit c48f93b5 authored by Sami's avatar Sami
Browse files

Migrate: More updates

parent 5cfd45fa
Branches
No related tags found
No related merge requests found
......@@ -37,6 +37,7 @@ if __name__ == '__main__':
except:
print(f'Failed to load extension {extension}.', file=sys.stderr)
traceback.print_exc()
bot.run(dev_token)
#
# bot.run(production_token)
......@@ -17,6 +17,7 @@ import itertools
import sys
import traceback
from functools import partial
from typing import List
import discord
import youtube_dl
......@@ -310,11 +311,14 @@ class Music:
vc.resume()
await ctx.send(f'**`{ctx.author}`**: Resumed the song!')
@commands.command(name='vote_skip')
@commands.command(name='vote_skip', enabled=False)
async def vote_skip_(self, ctx):
"""Skips the song if the required votes have been acquired"""
vc = ctx.voice_client
votes = []
votes: List[str] = []
votes_needed = int(3)
vote_count = int(0)
if not vc or not vc.is_connected():
return await ctx.send('I am not currently playing anything!', delete_after=20)
......@@ -326,9 +330,15 @@ class Music:
if not {ctx.author} in votes:
votes.append(f'{ctx.author}')
await ctx.send(f"There is now {len(votes)} votes!")
await ctx.send(votes)
elif {ctx.author} in votes:
await ctx.send(f"**`{ctx.author}`**: You have already voted")
if len(votes) == votes_needed or len(votes) > votes_needed:
await ctx.send("We have enough votes to skip, skipping.")
vc.stop()
@commands.command(name='skip')
@checks.song_requester_or_dj()
async def skip_(self, ctx):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment