new command in sys info + music.py fixes

This commit is contained in:
esef committed 2026-06-08 12:58:29 +03:00
1 parent fff6db930f
commit 68265f853a
2 files changed
+17

No files matched your search

+13
View File
@@ -85,5 +85,18 @@ class SysInfo(commands.Cog):
reply = f'CPU: {cpu}% | RAM: {ram}% | Disk: {disk}%' reply = f'CPU: {cpu}% | RAM: {ram}% | Disk: {disk}%'
await ctx.reply(reply) 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): async def setup(bot):
await bot.add_cog(SysInfo(bot)) await bot.add_cog(SysInfo(bot))
+4
View File
@@ -142,6 +142,10 @@ class Music(commands.Cog):
t.extras = {"requester": str(ctx.author)} t.extras = {"requester": str(ctx.author)}
st.queue.append(t) 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( embed = discord.Embed(
title="📋 Playlist Queued", title="📋 Playlist Queued",
description=f"**{results.name}**", description=f"**{results.name}**",