Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bug-fixes #21

Merged
merged 1 commit into from
Oct 31, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ KIWI_API_KEY_MULTICITY = 'Your secret kiwi api key used for searching Multi-city


# DATABASE PATH
DATABASE_PATH = 'database\database.db'
DATABASE_PATH = 'database.db'

# USER TYPES - LIST TYPE - INSERT CHAT_ID USERS INTO LIST
ADMINISTRATORS = []
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,9 @@ Powered by the Kiwi flight API, this bot makes it easy to search for the best de
| ----------------- | -------------------------------------------------------- | ---------------------- |
| `BOT_TOKEN` | Your Telegram Bot Token | None |
| `KIWI_API_KEY_STD`| Your KIWI API key for Oneway and Return flight search | None |
| `KIWI_API_KEY_MULTICITY `| Your KIWI API key for Multicity flight search | None |
| `DATABASE_PATH` | Your database file path | `database\database.db` |
| `ADMINISTRATOR` | Holds a list of telegram chat id's for admin rights | [Integer] |
| `KIWI_API_KEY_MULTICITY `| Your KIWI API key for Multicity flight search | None |
| `DATABASE_PATH` | Your database file path | `database.db` |
| `ADMINISTRATOR` | Holds a list of telegram chat id's for admin rights | [Integer] |


### Database
Expand Down
3 changes: 1 addition & 2 deletions handlers/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
from telegram import Update
from telegram.ext import ContextTypes
from telegram.constants import ChatAction
import json
from utils.database import DB
from telegram.constants import ParseMode
from utils.flight_search import validate_number, is_int_0
Expand Down Expand Up @@ -42,7 +41,7 @@ async def admin_dashboard(update: Update, context: ContextTypes.DEFAULT_TYPE):

<b>USER DATA</b>
👫 Total Users: {USER_COUNT}
🔔 Tolal Flight Alerts: {FA_COUNT}
🔔 Total Flight Alerts: {FA_COUNT}

<b>JOBS</b>
<i>Flight Tracker Job</i>
Expand Down
2 changes: 1 addition & 1 deletion utils/decorators.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ async def wrapped(update, context, *args, **kwargs):
else:
button = single_button(
text='🔔 Manage flight alerts', callback_data='get_flight_alerts')
return await context.bot.send_message(chat_id=chat_id, text=f'❗Only {file["FT_LIMIT"]} flights alert are allowed to be tracked at this time.', reply_markup=button)
return await context.bot.send_message(chat_id=chat_id, text=f'❗Only {ft_limit} flights alert are allowed to be tracked at this time.', reply_markup=button)
else:
return await func(update, context, *args, **kwargs)
return wrapped
Expand Down
Loading