pinger_bot.ext.commands.other#
Module for other commands.
Warning
This includes some owner-only commands, which will be shown as global. We can’t limit it to specific user ID (because of Discord’s limits), so they will leave for better time.
Module Contents#
Functions#
|
Some basic information about me. |
|
Link to invite the bot. |
|
Get the embed for when the IP is not valid. |
|
Show owner of the server. |
|
Get the embed for when the git is not available. |
|
Get latest commit on |
|
Show bot's version. I mean commit hash which was got with git. |
|
Execute SQL statement to database. Only for owner of the bot. |
|
Load the |
Attributes#
|
- plugin[source]#
lightbulb.Pluginobject.
- async about(ctx: lightbulb.context.slash.SlashContext) None[source]#
Some basic information about me.
- Parameters:
ctx – The context of the command.
- async invite(ctx: lightbulb.context.slash.SlashContext) None[source]#
Link to invite the bot.
- Parameters:
ctx – The context of the command.
- async get_who_owner_fail_embed(ip: str) hikari.embeds.Embed[source]#
Get the embed for when the IP is not valid.
See source code for more information.
- Parameters:
ip – The IP address of the server to reference in text.
- Returns:
The embed where command failed.
- async who_owner(ctx: lightbulb.context.slash.SlashContext, ip: str) None[source]#
Show owner of the server.
Note
If given IP without
:, it will be pinged as Java server. You must specify the port if it is Bedrock server.- Parameters:
ctx – The context of the command.
ip – The IP address of the server.
- async git_not_available() hikari.embeds.Embed[source]#
Get the embed for when the git is not available.
See source code for more information.
- Returns:
The embed where command failed.
- async get_bot_latest_version() str[source]#
Get latest commit on
masterbranch and cache it.Cache resets every hour, or every 1024 usages.
- Returns:
Short SHA256 of last commit or translated
Not available.
- async bot_version(ctx) None[source]#
Show bot’s version. I mean commit hash which was got with git.
This also checks if
commit.txtexists, which points to the commit hash in Docker. Please do not set this in another way.
- async sql_cmd(ctx: lightbulb.context.slash.SlashContext, sql: str, commit: str) None[source]#
Execute SQL statement to database. Only for owner of the bot.
- Parameters:
ctx – The context of the command.
sql – SQL statement provided by user.
commit – Commit changes to database. Type
strbecause we pass here translatedYesorNo.
- Returns:
The result of the SQL statement in JSON format if
allparameter isYes. Else -Done!message.
- load(bot_instance: pinger_bot.bot.PingerBot) None[source]#
Load the
plugin.