-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
6 changed files
with
135 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
__version__ = "2.0.0" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
from __init__ import __version__ | ||
from platform import python_version | ||
from datetime import datetime | ||
import hikari | ||
import arc | ||
import miru | ||
|
||
start_time = datetime.now() | ||
plugin = arc.GatewayPlugin("Core") | ||
arc.loader(lambda client: client.add_plugin(plugin)) | ||
arc.unloader(lambda client: client.remove_plugin(plugin)) | ||
|
||
|
||
@plugin.include | ||
@arc.slash_command("about", "Shows you some info about the bot.") | ||
async def about( | ||
context: arc.GatewayContext, | ||
): | ||
libraries = f"- Python {python_version()}\n" | ||
libraries += f"- Hikari {hikari.__version__}\n" | ||
libraries += f"- Arc {arc.__version__}\n" | ||
libraries += f"- Miru {miru.__version__}" | ||
|
||
embed = hikari.Embed( | ||
color=0x00DD99, | ||
title="About", | ||
description=""" | ||
SCNewsBot is a Discord bot created for the r/starcitizen | ||
Discord server to help with writing news posts. | ||
""", | ||
) | ||
embed.add_field(name="Version", value="v" + __version__) | ||
embed.add_field(name="Author", value="[mudkip](https://mudkip.dev)") | ||
embed.add_field(name="Uptime", value=f"<t:{round(start_time.timestamp())}:R>") | ||
embed.add_field(name="Libraries", value=libraries) | ||
|
||
view = miru.View() | ||
view.add_item( | ||
miru.LinkButton( | ||
label="Source Code", | ||
url="https://github.com/mudkipdev/scnewsbot/tree/rewrite", | ||
) | ||
) | ||
|
||
await context.respond( | ||
embed=embed, | ||
components=view, | ||
flags=hikari.MessageFlag.EPHEMERAL, | ||
) |