Refractor: Remove portal class #8

Merged
official-Cromatin merged 2 commits from refractor/remove-portal-class into main 2025-09-21 16:38:37 +02:00
5 changed files with 14 additions and 3 deletions
Showing only changes of commit 2f33d840f3 - Show all commits
+1
View File
@@ -0,0 +1 @@
0.5.2
+1 -1
View File
@@ -21,7 +21,7 @@ class Debug_Command(Base_Cog):
embed = discord.Embed(title="Debug Information")
embed.add_field(name="Version",
value=f"`{portal.PROGRAM_VERSION}`",
value=ctx.client.VERSION,
inline=True)
embed.add_field(name="Uptime",
value=f"{get_elapsed_time_big(datetime.now().timestamp() - portal.STARTUP_TIMESTAMP)}",
+8
View File
@@ -0,0 +1,8 @@
from pathlib import Path
# Read VERSION file
with open(Path(__file__).resolve().parent / "VERSION") as f:
VERSION = f.read().strip()
__all__ = VERSION
+4 -1
View File
@@ -13,12 +13,13 @@ from utils.portal import Portal
import asyncio
from typing import Union
from platforms.reddit import Reddit_Adapter
from const import VERSION
print(" ____ ____ ___________ __________")
print(" / __ \/ __ \/ ___/_ __/ / _/_ __/")
print(" / /_/ / / / /\__ \ / /_____ / / / / ")
print(" / ____/ /_/ /___/ // /_____// / / / ")
print(" /_/ \____//____//_/ /___/ /_/ ")
print(f" /_/ \____//____//_/ /___/ /_/ v{VERSION}")
print(" Copyright (c) 2024-2025 Lars Winzer")
print()
print(" Source: https://github.com/official-Cromatin/Post-It")
@@ -44,6 +45,8 @@ class MyBot(commands.Bot):
self.__portal:Portal
self.__first_on_ready = False
self.VERSION = VERSION
def set_portal(self, portal:Portal):
self.__portal = portal
-1
View File
@@ -4,7 +4,6 @@ from platforms.reddit import Reddit_Adapter
@Singleton
class Portal:
PROGRAM_VERSION = "0.3"
bot_config:Advanced_ConfigParser = None
platforms_config:Advanced_ConfigParser = None
STARTUP_TIMESTAMP:float = None