diff --git a/cogs/sysinfo.py b/cogs/sysinfo.py index f851f98..94012db 100644 --- a/cogs/sysinfo.py +++ b/cogs/sysinfo.py @@ -84,6 +84,19 @@ class SysInfo(commands.Cog): disk = psutil.disk_usage('/').percent reply = f'CPU: {cpu}% | RAM: {ram}% | Disk: {disk}%' await ctx.reply(reply) + + #this command fetches the current player count for Strinova from the Steam API + #it's a game i play and want to show off to my friends, not an actual sysinfo command## + #i know this is a bit of a weird place for it but i dont want to make a whole new cog just for one command + #holy shit vscode autocomplete knew exactly what i was gonna say wtf;? + @commands.command() + async def strinova(self, ctx): + import aiohttp + async with aiohttp.ClientSession() as session: + async with session.get('https://api.steampowered.com/ISteamUserStats/GetNumberOfCurrentPlayers/v1/?appid=1282270') as r: + data = await r.json() + count = data['response']['player_count'] + await ctx.reply(f'🎮 Strinova — {count:,} players online right now') async def setup(bot): await bot.add_cog(SysInfo(bot)) \ No newline at end of file diff --git a/music/music.py b/music/music.py index 56e0c52..272eedf 100644 --- a/music/music.py +++ b/music/music.py @@ -124,7 +124,7 @@ class Music(commands.Cog): if not vc: vc = await ctx.author.voice.channel.connect(cls=wavelink.Player) vc.autoplay = wavelink.AutoPlayMode.disabled - vc.inactive_timeout = None + vc.inactive_timeout = None st = self.state(ctx.guild.id) @@ -142,6 +142,10 @@ class Music(commands.Cog): t.extras = {"requester": str(ctx.author)} st.queue.append(t) + if not vc.playing and not vc.paused and st.queue: + t.current = st.queue.popleft() + await vc.play(st.current) + embed = discord.Embed( title="📋 Playlist Queued", description=f"**{results.name}**",