diff --git a/bot.py b/bot.py index adc6fdc..f2cfb2c 100755 --- a/bot.py +++ b/bot.py @@ -43,7 +43,7 @@ class TuxBot(commands.AutoShardedBot): super().__init__(command_prefix=_prefix_callable, pm_help=None, help_command=None, description=description, help_attrs=dict(hidden=True), - activity=discord.Game(name=Texts().get('Stating...'))) + activity=discord.Game(name=Texts().get('Starting...'))) self.uptime: datetime = datetime.datetime.utcnow() self.config = config diff --git a/cogs/basics.py b/cogs/basics.py index 2d56eea..ba8ce30 100644 --- a/cogs/basics.py +++ b/cogs/basics.py @@ -1,3 +1,4 @@ +import os import platform import time @@ -15,6 +16,12 @@ class Basics(commands.Cog): def __init__(self, bot: TuxBot): self.bot = bot + @staticmethod + def _latest_commits(): + cmd = 'git log -n 3 -s --format="[\`%h\`](https://git.gnous.eu/gnouseu/tuxbot-bot/commits/%H) %s (%cr)"' + + return os.popen(cmd).read().strip() + """---------------------------------------------------------------------""" @commands.command(name='ping') @@ -33,7 +40,7 @@ class Basics(commands.Cog): """---------------------------------------------------------------------""" - @commands.command(name='info') + @commands.command(name='info', aliases=['about']) async def _info(self, ctx: commands.Context): proc = psutil.Process() with proc.oneshot(): @@ -41,6 +48,12 @@ class Basics(commands.Cog): e = discord.Embed( title=f"{Texts('basics').get('Information about TuxBot')}", color=0x89C4F9) + + e.add_field( + name=f"__{Texts('basics').get('Latest changes')}__", + value=self._latest_commits(), + inline=False) + e.add_field( name=f"__:busts_in_silhouette: " f"{Texts('basics').get('Development')}__", @@ -79,10 +92,29 @@ class Basics(commands.Cog): inline=True ) + e.add_field( + name=f"__{Texts('basics').get('Links')}__", + value="[tuxbot.gnous.eu](https://tuxbot.gnous.eu/) " + "| [gnous.eu](https://gnous.eu/) " + f"| [{Texts('basics').get('Invite')}](https://discordapp.com/oauth2/authorize?client_id=301062143942590465&scope=bot&permissions=268749888)", + inline=False + ) + e.set_footer(text=f'version: {self.bot.version}') await ctx.send(embed=e) + """---------------------------------------------------------------------""" + + @commands.command(name='credits') + async def _credits(self, ctx: commands.Context): + e = discord.Embed( + title=Texts('basics').get('Contributors'), + description=f"- **Romain#5117** https://git.gnous.eu/Romain\n" + f"- **Outout#4039** https://git.gnous.eu/mael", + color=0x89C4F9 + ) + def setup(bot: TuxBot): bot.add_cog(Basics(bot)) diff --git a/locales/en/LC_MESSAGES/basics.po b/locales/en/LC_MESSAGES/basics.po index ebf8a66..7aaceda 100644 --- a/locales/en/LC_MESSAGES/basics.po +++ b/locales/en/LC_MESSAGES/basics.po @@ -18,6 +18,9 @@ msgstr "" msgid "Information about TuxBot" msgstr "" +msgid "Latest changes" +msgstr "" + msgid "Development" msgstr "" @@ -34,4 +37,10 @@ msgid "Channels count" msgstr "" msgid "Members count" +msgstr "" + +msgid "Links" +msgstr "" + +msgid "Invite" msgstr "" \ No newline at end of file diff --git a/locales/fr/LC_MESSAGES/base.mo b/locales/fr/LC_MESSAGES/base.mo index eb70dc4..d01053d 100644 Binary files a/locales/fr/LC_MESSAGES/base.mo and b/locales/fr/LC_MESSAGES/base.mo differ diff --git a/locales/fr/LC_MESSAGES/basics.mo b/locales/fr/LC_MESSAGES/basics.mo index 8a09184..f5581a0 100644 Binary files a/locales/fr/LC_MESSAGES/basics.mo and b/locales/fr/LC_MESSAGES/basics.mo differ diff --git a/locales/fr/LC_MESSAGES/basics.po b/locales/fr/LC_MESSAGES/basics.po index 0b3cc80..278efff 100644 --- a/locales/fr/LC_MESSAGES/basics.po +++ b/locales/fr/LC_MESSAGES/basics.po @@ -18,6 +18,9 @@ msgstr "" msgid "Information about TuxBot" msgstr "Informations sur TuxBot" +msgid "Latest changes" +msgstr "Derniers changements" + msgid "Development" msgstr "Développement" @@ -34,4 +37,10 @@ msgid "Channels count" msgstr "Nombre de salons" msgid "Members count" -msgstr "Nombre de membres" \ No newline at end of file +msgstr "Nombre de membres" + +msgid "Links" +msgstr "Liens" + +msgid "Invite" +msgstr "Invitation" \ No newline at end of file