added .env
This commit is contained in:
@@ -25,6 +25,7 @@ class Audio(commands.Cog):
|
||||
if any('Escape from Tarkov' in str(user.activity) for user in after.channel.members):
|
||||
logging.info('Skip playing by Game')
|
||||
else:
|
||||
# Prepare list of audio
|
||||
from lib.Comands import read_json
|
||||
_role = await read_json(member.guild.id, 'tigger_role')
|
||||
# Read audio from DB
|
||||
@@ -46,12 +47,12 @@ class Audio(commands.Cog):
|
||||
full_audio = def_audio_db + audio_db
|
||||
await play_audio(random.choice(full_audio), self.bot, after.channel)
|
||||
elif len(member.roles) == 1 or _role is None:
|
||||
logging.info(f'Skip playing')
|
||||
logging.info(f'Skip playing by role')
|
||||
elif any(str(role.id) in _role for role in member.roles):
|
||||
logging.info(f'Play audio from list by role')
|
||||
await play_audio(random.choice(def_audio_ls), self.bot, after.channel)
|
||||
else:
|
||||
logging.info(f'Skip playing')
|
||||
logging.info(f'Skip playing by any else')
|
||||
|
||||
@commands.command(name="upload_audio")
|
||||
async def upload_audio(self, ctx, user=None):
|
||||
|
||||
Reference in New Issue
Block a user