Skip to content

Commit

Permalink
Merge pull request #6 from offish/v1.2.4
Browse files Browse the repository at this point in the history
v1.2.4
  • Loading branch information
offish authored Dec 2, 2020
2 parents e66b9f9 + ddf6e7d commit f5303d1
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 11 deletions.
2 changes: 1 addition & 1 deletion express/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
__title__ = 'tf2-express'
__author__ = 'offish'
__license__ = 'MIT'
__version__ = '1.2.3'
__version__ = '1.2.4'

15 changes: 5 additions & 10 deletions express/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,17 +6,12 @@
init()


def log(color, sort, bot: str, text, offer_id = ''):
title = f'{f.GREEN}tf2-express | '

if bot:
title = f'{title}[{bot}] '

if offer_id:
text = f'({f.YELLOW}{offer_id}{f.WHITE}) {text}'

def log(color: int, sort: str, bot: str, text: str, offer_id: str = ''):
name = f' {f.GREEN}[{bot}]' if bot else ''
text = f'({f.YELLOW}{offer_id}{f.WHITE}) {text}' \
if offer_id else text
time = datetime.now().time().strftime('%H:%M:%S')
print(f'{title}{f.WHITE}{time} - {color + sort}{f.WHITE}: {text}{f.WHITE}')
print(f'{f.GREEN}tf2-express | {f.WHITE}{time} - {color + sort}{name}{f.WHITE}: {text}{f.WHITE}')


class Log:
Expand Down

0 comments on commit f5303d1

Please sign in to comment.