Skip to content

Commit

Permalink
core: add version info
Browse files Browse the repository at this point in the history
Signed-off-by: Mr.Miss <[email protected]>
  • Loading branch information
Mr.Miss committed Mar 30, 2021
1 parent 92564d6 commit 2073d5e
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
7 changes: 6 additions & 1 deletion anjani_bot/core/anjani.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,12 +19,14 @@
import logging
import time
from typing import List, Optional
from sys import version_info

import aiohttp
import aiorun
import pyrogram

from ..utils import get_readable_time
from ..version import __version__
from . import pool
from .database import DataBase
from .plugin_extender import PluginExtender # pylint: disable=R0401
Expand All @@ -42,6 +44,7 @@ class Anjani(TelegramBot, DataBase, PluginExtender):
def __init__(self):
self.stopping = False

self.version = __version__
self._start_time = time.time()

# Init Base
Expand All @@ -52,10 +55,12 @@ def __str__(self):
output += f"Username : {self.username}\n"
output += f"ID : {self.identifier}\n"
output += f"Uptime: {self.uptime}\n"
output += f"Pyrogram: {self.client.app_version}\n"
output += f"Language: {self.language}\n"
output += f"Loaded Plugins:{json.dumps(list(self.plugins.keys()), indent=2)}\n"
output += f"Staff list:{json.dumps(self.staff, indent=2)}\n"
output += f"Python: {version_info[0]}.{version_info[1]}.{version_info[2]}\n"
output += f"Pyrogram: {pyrogram.__version__}\n"
output += f"Anjani: {self.version}\n"
return output

@property
Expand Down
19 changes: 19 additions & 0 deletions anjani_bot/version.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
"""Anjani - Telegram group management bot"""
# Copyright (C) 2020 - 2021 UserbotIndo Team, <https://github.com/userbotindo.git>
#
# This program is free software: you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation, either version 3 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.

__version__ = "1.1.0"
__license__ = "GNU General Public License v3.0 or later (LGPLv3+)"
__copyright__ = "Copyright (C) 2020 - 2021 UserbotIndo Team, <https://github.com/userbotindo.git>"

0 comments on commit 2073d5e

Please sign in to comment.