pinger_bot.ext.commands.statistic#
Module for the statistic command.
Module Contents#
Functions#
|
Get the embed when a server not in database. |
|
Get the ping from yesterday. |
|
Create plot for the server. |
|
|
|
Some statistic about the server. It's working, even if server is offline. |
|
Load the |
Attributes#
|
- plugin[source]#
lightbulb.Pluginobject.
- async get_not_in_db_embed(ip: str) hikari.embeds.Embed[source]#
Get the embed when a server not in database.
See source code for more information.
- Parameters:
ip – The IP address of the server to reference in text.
- Returns:
The embed where server not in database.
- async get_yesterday_ping(pings: List[pinger_bot.models.Ping]) pinger_bot.models.Ping | None[source]#
Get the ping from yesterday.
Yesterday - it is period between 23-25 hours.
- async create_plot(pings: List[pinger_bot.models.Ping], ip: str) matplotlib.figure.Figure[source]#
Create plot for the server.
- Parameters:
pings – List of server’s
pings.ip – IP of the server, which referenced in text. Better set it to
display_ip.
- Returns:
Figureobject.
- async transform_figure_to_bytes(figure: matplotlib.figure.Figure) io.BytesIO[source]#
- async statistic(ctx: lightbulb.context.slash.SlashContext, ip: str) None[source]#
Some statistic about the server. It’s working, even if server is offline.
- Parameters:
ctx – The context of the command.
ip – The IP address of the server.
- load(bot_instance: pinger_bot.bot.PingerBot) None[source]#
Load the
plugin.