@@ -36,37 +36,9 @@ set_bot_credentials() {
36
36
fi
37
37
38
38
yellow " --------------Getting credntials--------------"
39
- python3 << EOF
40
- import os
41
- import pickle
42
-
43
- # File to store the allowed_ids and admin_id
44
- pickle_file = '/root/spotbot/spotbot_config.pkl'
45
-
46
- def save_allowed_ids():
47
- data = {'allowed_ids': allowed_ids,
48
- 'admin_id': admin_id,
49
- 'spotdl_client_id': spotdl_client_id,
50
- 'spotdl_client_secret': spotdl_client_secret,
51
- 'telegram_bot_token': telegram_bot_token,
52
- }
53
- with open(pickle_file, 'wb') as f:
54
- pickle.dump(data, f)
55
-
56
- # Initialize allowed_ids and admin_id from pickle if available, else start fresh
57
- allowed_ids = []
58
- admin_id = int(input("Enter the admin's Telegram user ID: "))
59
- telegram_bot_token = input("\nEnter Telegram Bot Token from @Botfather: ")
60
- spotify_cred = input("\nDo you want to use your own spotify credentials (y/n): ")
61
- if spotify_cred == 'y':
62
- spotdl_client_id = input("\n Enter your Spotify client ID: ")
63
- spotdl_client_secret = input("\n Enter your Spotify client secret: ")
64
- elif spotify_cred == 'n':
65
- spotdl_client_id = '5f573c9620494bae87890c0f08a60293'
66
- spotdl_client_secret = '212476d9b0f3472eaa762d90b19b0ba8'
67
- save_allowed_ids()
68
- EOF
39
+ python3 spotbot/set_cred.py
69
40
yellow " ----------------------------------------------"
41
+ echo
70
42
readp " Press Enter to continue..."
71
43
}
72
44
get_spotbot_add_service () {
0 commit comments