Spaces:
Paused
Paused
BinaryONe commited on
Commit ·
24a7c47
1
Parent(s): ab091a0
Minor Changes
Browse files
YukkiMusic/__init__.py
CHANGED
|
@@ -34,6 +34,9 @@ sudo()
|
|
| 34 |
# Bot Client
|
| 35 |
app = YukkiBot()
|
| 36 |
|
|
|
|
|
|
|
|
|
|
| 37 |
# Assistant Client
|
| 38 |
userbot = Userbot()
|
| 39 |
|
|
|
|
| 34 |
# Bot Client
|
| 35 |
app = YukkiBot()
|
| 36 |
|
| 37 |
+
# Define GROUP as a global variable
|
| 38 |
+
#global GROUP # Declare GROUP as global
|
| 39 |
+
|
| 40 |
# Assistant Client
|
| 41 |
userbot = Userbot()
|
| 42 |
|
YukkiMusic/plugins/play/webapp.py
CHANGED
|
@@ -49,11 +49,10 @@ from .Chat_Selecter import chat_selecter
|
|
| 49 |
|
| 50 |
|
| 51 |
# Define GROUP as a global variable
|
| 52 |
-
|
| 53 |
|
| 54 |
@app.on_message(filters.command("select_group") & filters.user(OWNER_ID))
|
| 55 |
async def add_user(client, message):
|
| 56 |
-
|
| 57 |
# Print and debug
|
| 58 |
print(MEMBERS_GROUPS, type(MEMBERS_GROUPS))
|
| 59 |
|
|
@@ -75,7 +74,8 @@ async def add_user(client, message):
|
|
| 75 |
|
| 76 |
# Debug information
|
| 77 |
print(user_id, type(user_id), number_list[int(user_id)], type(number_list[user_id]))
|
| 78 |
-
|
|
|
|
| 79 |
# Update the global GROUP variable
|
| 80 |
GROUP = number_list[user_id]
|
| 81 |
|
|
@@ -131,6 +131,8 @@ async def raw_update_handler(client, message: Message):
|
|
| 131 |
_ = get_string(language)
|
| 132 |
user_id = message.from_user.id
|
| 133 |
user_name = message.from_user.first_name
|
|
|
|
|
|
|
| 134 |
print(GROUP)
|
| 135 |
chat_id = GROUP
|
| 136 |
#video_url=f'https://www.youtube.com/watch?v={id}'
|
|
|
|
| 49 |
|
| 50 |
|
| 51 |
# Define GROUP as a global variable
|
| 52 |
+
GROUP =int() # Declare GROUP as global
|
| 53 |
|
| 54 |
@app.on_message(filters.command("select_group") & filters.user(OWNER_ID))
|
| 55 |
async def add_user(client, message):
|
|
|
|
| 56 |
# Print and debug
|
| 57 |
print(MEMBERS_GROUPS, type(MEMBERS_GROUPS))
|
| 58 |
|
|
|
|
| 74 |
|
| 75 |
# Debug information
|
| 76 |
print(user_id, type(user_id), number_list[int(user_id)], type(number_list[user_id]))
|
| 77 |
+
|
| 78 |
+
global GROUP
|
| 79 |
# Update the global GROUP variable
|
| 80 |
GROUP = number_list[user_id]
|
| 81 |
|
|
|
|
| 131 |
_ = get_string(language)
|
| 132 |
user_id = message.from_user.id
|
| 133 |
user_name = message.from_user.first_name
|
| 134 |
+
|
| 135 |
+
global GROUP
|
| 136 |
print(GROUP)
|
| 137 |
chat_id = GROUP
|
| 138 |
#video_url=f'https://www.youtube.com/watch?v={id}'
|