Adding reset command, some variable to config

This commit is contained in:
Rafael Vargas 2022-01-06 13:21:18 -04:00
parent a391ab1720
commit 06a00e227d
3 changed files with 15 additions and 1 deletions

View File

@ -45,6 +45,7 @@ HELP_SHUFFLE = 'Shuffle the songs playing'
HELP_PLAY = '(title/youtube/spotify) - Plays a song'
HELP_MOVE = '(x, y) - Moves a song from position x to y in queue'
HELP_REMOVE = '(x, -1) - Remove a song in the position x or -1 for the last song'
HELP_RESET = 'Reset the Player of a guild'
HELP_WARFRAME = f'({BOT_PREFIX}warframe help for more)'
HELP_RANDOM = '(x) - Return a random number between 1 and x'
HELP_ESCOLHA = '(x, y, z...) - Choose randomly one item passed'
@ -53,6 +54,11 @@ HELP_DROP = '(user_name) - Try to remove the user from the current voice channel
HELP_FRASE = "Send a randomly phrase, perhaps you get the braba"
HELP_HELP = 'This command :)'
NO_CHANNEL = 'To play some music, connect to any voice channel first.'
INVALID_INPUT = 'This type of input was too strange, try something better'
DOWNLOADING_ERROR = 'An error occurred while downloading'
SONG_ADDED = 'Song added to the Queue'
ABSOLUTE_PATH = ''
COOKIE_PATH = '/config/cookies/cookies.txt'

View File

@ -11,7 +11,7 @@ class Control(commands.Cog):
def __init__(self, bot: Client):
self.__bot = bot
self.__comandos = {
'MUSIC': ['resume', 'pause', 'loop', 'stop', 'skip', 'play', 'queue', 'clear', 'np', 'shuffle', 'move', 'remove'],
'MUSIC': ['resume', 'pause', 'loop', 'stop', 'skip', 'play', 'queue', 'clear', 'np', 'shuffle', 'move', 'remove', 'reset'],
'WARFRAME': ['warframe'],
'RANDOM': ['escolha', 'cara', 'random'],
'HELP': ['help'],

View File

@ -1,6 +1,14 @@
import re
def is_connected(ctx):
try:
voice_channel = ctx.guild.voice_client.channel
return voice_channel
except:
return None
def format_time(duration):
if not duration:
return "00:00"