mirror of
https://github.com/nexy7574/LCC-bot.git
synced 2024-09-19 18:16:34 +01:00
fix info.py
This commit is contained in:
parent
7c791153f8
commit
551e858dcd
3 changed files with 7 additions and 6 deletions
|
@ -203,7 +203,7 @@ class Events(commands.Cog):
|
||||||
|
|
||||||
@commands.Cog.listener()
|
@commands.Cog.listener()
|
||||||
async def on_voice_state_update(
|
async def on_voice_state_update(
|
||||||
self,
|
self,
|
||||||
member: discord.Member,
|
member: discord.Member,
|
||||||
*_
|
*_
|
||||||
):
|
):
|
||||||
|
|
|
@ -14,8 +14,8 @@ try:
|
||||||
import fanshim
|
import fanshim
|
||||||
import apa102
|
import apa102
|
||||||
import RPi.GPIO as GPIO
|
import RPi.GPIO as GPIO
|
||||||
except (ImportError, AttributeError):
|
except ImportError:
|
||||||
fanshim = GPIO = None
|
fanshim = GPIO = apa102 = None
|
||||||
|
|
||||||
|
|
||||||
class InfoCog(commands.Cog):
|
class InfoCog(commands.Cog):
|
||||||
|
@ -28,6 +28,7 @@ class InfoCog(commands.Cog):
|
||||||
"SENSORS": "\N{thermometer}",
|
"SENSORS": "\N{thermometer}",
|
||||||
"UPTIME": "\N{alarm clock}",
|
"UPTIME": "\N{alarm clock}",
|
||||||
}
|
}
|
||||||
|
|
||||||
def __init__(self, bot):
|
def __init__(self, bot):
|
||||||
self.bot = bot
|
self.bot = bot
|
||||||
|
|
||||||
|
@ -182,7 +183,7 @@ class InfoCog(commands.Cog):
|
||||||
embed.add_field(
|
embed.add_field(
|
||||||
name=f"{self.EMOJIS['NETWORK']} Network",
|
name=f"{self.EMOJIS['NETWORK']} Network",
|
||||||
value=f"**Sent:** {humanize.naturalsize(network.bytes_sent, binary=binary)}\n"
|
value=f"**Sent:** {humanize.naturalsize(network.bytes_sent, binary=binary)}\n"
|
||||||
f"**Received:** {humanize.naturalsize(network.bytes_recv, binary=binary)}",
|
f"**Received:** {humanize.naturalsize(network.bytes_recv, binary=binary)}",
|
||||||
inline=False,
|
inline=False,
|
||||||
)
|
)
|
||||||
embed.add_field(
|
embed.add_field(
|
||||||
|
@ -196,4 +197,4 @@ class InfoCog(commands.Cog):
|
||||||
|
|
||||||
|
|
||||||
def setup(bot):
|
def setup(bot):
|
||||||
bot.add_cog(InfoCog(bot))
|
bot.add_cog(InfoCog(bot))
|
||||||
|
|
|
@ -1,3 +1,3 @@
|
||||||
[pycodestyle]
|
[pycodestyle]
|
||||||
max-line-length = 120
|
max-line-length = 120
|
||||||
ignore = W293
|
ignore = W293,W291
|
||||||
|
|
Loading…
Reference in a new issue