Skip to content

Commit

Permalink
1.1.8Av
Browse files Browse the repository at this point in the history
fixed ci, and discord info tab
  • Loading branch information
suchencjusz authored Jan 5, 2025
2 parents 6b8c23b + 7eca790 commit 2a9625c
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 13 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/dependency-review.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,6 @@ jobs:
uses: actions/checkout@v4
- name: 'Dependency Review'
uses: actions/dependency-review-action@v4
with:
fail-on-severity: critical
deny-licenses: LGPL-2.0, BSD-2-Clause
6 changes: 0 additions & 6 deletions pyproject.toml

This file was deleted.

14 changes: 7 additions & 7 deletions src/filman_discord/endpoints/info.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,20 +8,20 @@

@info_plugin.command()
@lightbulb.command("info", "informacje o bocie")
@lightbulb.implements(lightbulb.SlashCommand)
async def info_group(ctx: lightbulb.SlashContext) -> None:
@lightbulb.implements(lightbulb.SlashCommandGroup)
async def info_group(_: lightbulb.SlashContext) -> None:
pass


@info_group.child
@lightbulb.command("basic", "podstawowe informacje o bocie")
@lightbulb.implements(lightbulb.SlashCommand)
@lightbulb.implements(lightbulb.SlashSubCommand)
async def info_basic_command(ctx: lightbulb.SlashContext) -> None:
embed = hikari.Embed(title="`Filman`", colour=0xFFC200, timestamp=datetime.now().astimezone())

embed.add_field(
name="Wersja i ostatnia aktualizacja",
value="`1.1.8v` - `2025-01-04`",
value="`1.1.8Av` - `2025-01-05`",
)

embed.add_field(
Expand All @@ -44,16 +44,16 @@ async def info_basic_command(ctx: lightbulb.SlashContext) -> None:

@info_group.child
@lightbulb.command("database", "informacje o bazie danych")
@lightbulb.implements(lightbulb.SlashCommand)
@lightbulb.implements(lightbulb.SlashSubCommand)
async def info_database_command(ctx: lightbulb.SlashContext) -> None:
async with ctx.bot.d.client_session.get("http://filman_server:8000/utils/database_info") as response:
data = await response.json()

embed = hikari.Embed(title="`Filman`", colour=0xFFC200, timestamp=datetime.now().astimezone())

embed.add_field(
name=f"W bazie danych znajduje się {data['users_count']} użytkowników \n którzy wszyscy obejrzeli {data['filmweb_watched_movies']} filmów \n oraz {data['filmweb_watched_series']} seriali, \n a także jest zarejestrowanych {data['discord_guilds']} serwerów.",
value="",
name="Informacje o bazie danych",
value=f"W bazie danych znajduje się {data['users_count']} użytkowników, wszyscy obejrzeli {data['filmweb_watched_movies']} filmów oraz {data['filmweb_watched_series']} seriali, a w bazie jest zarejestrowanych {data['discord_guilds']} serwerów.",
)

embed.set_footer(
Expand Down

0 comments on commit 2a9625c

Please sign in to comment.