mirror of
https://github.com/Matthww/TuneBot.git
synced 2026-09-21 22:07:48 +00:00
Added context shortcut to get the lavalink player
This commit is contained in:
+3
-2
@@ -9,6 +9,7 @@ import humanize
|
||||
import datetime
|
||||
import lavalink
|
||||
from bot import ChristmasBot
|
||||
from context import CustomContext
|
||||
from utils.EmbedGenerator import EmbedGenerator
|
||||
from utils.paginator import HelpPaginator
|
||||
from utils.database import AutoJoin
|
||||
@@ -56,9 +57,9 @@ class InformationCog(commands.Cog, name="Information"):
|
||||
slash_commands=True,
|
||||
)
|
||||
@commands.cooldown(rate=1, per=5, type=commands.BucketType.user)
|
||||
async def wlinfo(self, ctx: Context):
|
||||
async def wlinfo(self, ctx: CustomContext):
|
||||
"""Retrieve various Node/Server/Player information."""
|
||||
player = self.bot.lavalink.player_manager.get(ctx.guild.id)
|
||||
player = ctx.get_player()
|
||||
node = player.node
|
||||
|
||||
used = humanize.naturalsize(node.stats.memory_used)
|
||||
|
||||
Reference in New Issue
Block a user