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

Question mostly #6

Open
ShiroUwUs7 opened this issue Nov 18, 2021 · 9 comments
Open

Question mostly #6

ShiroUwUs7 opened this issue Nov 18, 2021 · 9 comments

Comments

@ShiroUwUs7
Copy link

possible to commit: https://github.com/l3v11/gclone.o for gclone to allow the use of --drive-impersonate [email protected]? (with domain delegated access.) so the SA's can rotate and drop files into a root drive with a example: 'My Drive/Meidia/files now go here' instead of 'teamdrive/media/files go here' ?

@Rekulous
Copy link
Owner

Can you reword this issue please because I can't really comprehend on what you are trying to say?

Also just note that I won't be doing many updates for now, so don't expect any changes from this issue to be committed.

@ShiroUwUs7
Copy link
Author

ShiroUwUs7 commented Nov 19, 2021

Can you reword this issue please because I can't really comprehend on what you are trying to say?

Sure. So on rclone you need to use --drive-impersonate to impersonate delegated SA's as if you don't then they will upload there own 15gb acc and not the master admin account (on google workspace that has the unlimited storage.)
Was wondering if that could be added to then allow the bot to use root folder id's as a destination as a sub command, instead of being tied down to just team drives like CloneBot is on telegram.

Also just note that I won't be doing many updates for now, so don't expect any changes from this issue to be committed.

No problem at all :) just a suggestion

@Rekulous
Copy link
Owner

Sure. So on rclone you need to use --drive-impersonate to impersonate delegated SA's as if you don't then they will upload there own 15gb acc and not the master admin account (on google workspace that has the unlimited storage.) Was wondering if that could be added to then allow the bot to use root folder id's as a destination as a sub command, instead of being tied down to just team drives like CloneBot is on telegram.

Hm not so sure about that. I'll probably look into it more in the future. Thanks for suggesting

@ShiroUwUs7
Copy link
Author

ShiroUwUs7 commented Nov 19, 2021

Hm not so sure about that. I'll probably look into it more in the future. Thanks for suggesting

I found main command in: https://github.com/Rekulous/CloneCord-Bot/blob/main/CloneCord.py#L234 and L254 but I'm not sure how to format it via python. but it should be as simple as removing the check for only team drives and adding the sub flag --drive-impersonate "[email protected]" and letting us edit it before forking.. Just the format confuses me lol. its not the same as auto clone.

@ShiroUwUs7
Copy link
Author

ShiroUwUs7 commented Nov 19, 2021

sudo Python3 CloneCord.py

<===============================|| Running CloneCord Version 5 BETA! ||===============================>
Connected to bot: DriveUwUs
Bot ID: 911321895985635368
CloneCord is Ready!
CloneCord Status Ready!
Python Version: 3.9.5
Discord.py API version: 1.7.3
==================================================================================================================================================
----------------------------------------------------------------------------------------------------------------------
GClone Version:

Ignoring exception in on_ready
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/discord/client.py", line 343, in _run_event
    await coro(*args, **kwargs)
  File "/home/shadows/CloneCord-Bot/CloneCord.py", line 81, in on_ready
    subprocess.run(
  File "/usr/lib/python3.9/subprocess.py", line 505, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.9/subprocess.py", line 1821, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'gclone version'

Running cat bot.log:

2021-11-19 19:10:10,604:DEBUG:discord.client: on_ready has successfully been registered as an event
2021-11-19 19:10:10,605:INFO:discord.client: logging in using static token
2021-11-19 19:10:10,747:DEBUG:discord.http: GET https://discord.com/api/v7/users/@me with None has returned 200
2021-11-19 19:10:10,747:DEBUG:discord.http: GET https://discord.com/api/v7/users/@me has received {'id': '911321895985635368', 'username': 'CloneCord-Bot', 'avatar': 'd417ed3d7ac46d455666768dc1e98a40', 'discriminator': '6902', 'public_flags': 0, 'flags': 0, 'bot': True, 'banner': None, 'banner_color': None, 'accent_color': None, 'bio': '', 'locale': 'en-US', 'mfa_enabled': True, 'email': None, 'verified': True}
2021-11-19 19:10:10,780:DEBUG:discord.http: GET https://discord.com/api/v7/gateway with None has returned 200
2021-11-19 19:10:10,780:DEBUG:discord.http: GET https://discord.com/api/v7/gateway has received {'url': 'wss://gateway.discord.gg'}
2021-11-19 19:10:10,886:DEBUG:discord.gateway: Created websocket connected to wss://gateway.discord.gg?encoding=json&v=6&compress=zlib-stream
2021-11-19 19:10:10,887:DEBUG:discord.client: Dispatching event socket_raw_receive
2021-11-19 19:10:10,887:DEBUG:discord.gateway: For Shard ID None: WebSocket Event: {'t': None, 's': None, 'op': 10, 'd': {'heartbeat_interval': 41250, '_trace': ['["gateway-prd-main-gz5q",{"micros":0.0}]']}}
2021-11-19 19:10:10,887:DEBUG:discord.client: Dispatching event socket_response
2021-11-19 19:10:10,887:DEBUG:discord.client: Dispatching event socket_raw_send
2021-11-19 19:10:10,887:DEBUG:discord.client: Dispatching event socket_raw_send
2021-11-19 19:10:10,888:INFO:discord.gateway: Shard ID None has sent the IDENTIFY payload.
2021-11-19 19:10:10,930:DEBUG:discord.client: Dispatching event socket_raw_receive
2021-11-19 19:10:10,930:DEBUG:discord.gateway: For Shard ID None: WebSocket Event: {'t': None, 's': None, 'op': 11, 'd': None}
2021-11-19 19:10:10,930:DEBUG:discord.client: Dispatching event socket_response
2021-11-19 19:10:11,059:DEBUG:discord.client: Dispatching event socket_raw_receive
2021-11-19 19:10:11,060:DEBUG:discord.gateway: For Shard ID None: WebSocket Event: {'t': 'READY', 's': 1, 'op': 0, 'd': {'v': 6, 'user_settings': {}, 'user': {'verified': True, 'username': 'DriveUwUs', 'mfa_enabled': True, 'id': '911321895985635368', 'flags': 0, 'email': None, 'discriminator': '6902', 'bot': True, 'avatar': 'd417ed3d7ac46d455666768dc1e98a40'}, 'session_id': 'ddefff1b6e38dce28a7696bc634cfc79', 'relationships': [], 'private_channels': [], 'presences': [], 'guilds': [], 'guild_join_requests': [], 'geo_ordered_rtc_regions': ['us-central', 'us-south', 'atlanta', 'us-east', 'newark'], 'application': {'id': '911321895985635368', 'flags': 827392}, '_trace': ['["gateway-prd-main-gz5q",{"micros":131736,"calls":["discord-sessions-green-prd-2-42",{"micros":130702,"calls":["start_session",{"micros":71798,"calls":["api-prd-main-22dx",{"micros":67586,"calls":["get_user",{"micros":10373},"add_authorized_ip",{"micros":4971},"get_guilds",{"micros":3752},"coros_wait",{"micros":1}]}]},"guilds_connect",{"micros":1,"calls":[]},"presence_connect",{"micros":47291,"calls":[]}]}]}]']}}
2021-11-19 19:10:11,060:DEBUG:discord.client: Dispatching event socket_response
2021-11-19 19:10:11,060:INFO:discord.gateway: Shard ID None has connected to Gateway: ["gateway-prd-main-gz5q",{"micros":131736,"calls":["discord-sessions-green-prd-2-42",{"micros":130702,"calls":["start_session",{"micros":71798,"calls":["api-prd-main-22dx",{"micros":67586,"calls":["get_user",{"micros":10373},"add_authorized_ip",{"micros":4971},"get_guilds",{"micros":3752},"coros_wait",{"micros":1}]}]},"guilds_connect",{"micros":1,"calls":[]},"presence_connect",{"micros":47291,"calls":[]}]}]}] (Session ID: ddefff1b6e38dce28a7696bc634cfc79).
2021-11-19 19:10:11,074:DEBUG:discord.client: Dispatching event connect
2021-11-19 19:10:13,075:DEBUG:discord.client: Dispatching event ready
2021-11-19 19:10:13,075:DEBUG:discord.gateway: Sending "{"op":3,"d":{"game":{"flags":0,"type":3,"name":"/help to get help! CloneCord V6 BETA"},"afk":false,"since":0.0,"status":"online"}}" to change status
2021-11-19 19:10:13,076:DEBUG:discord.client: Dispatching event socket_raw_send

gclon version command regularly:

shadows@shadowdrive:~/CloneCord-Bot$ gclone version
rclone v1.57.0-mod1.3.2
- os/version: ubuntu 21.04 (64 bit)
- os/kernel: 5.11.0-1022-gcp (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.17.3
- go/linking: static
- go/tags: none
shadows@shadowdrive:~/CloneCord-Bot$

@ShiroUwUs7
Copy link
Author

ShiroUwUs7 commented Nov 19, 2021

When i run: gclone config it brings up my normal rclone mounts... hm
still having issue above however even if updated to latest version of gclone.

Current remotes:

Name                 Type
====                 ====
GMC                  drive
GMD                  drive
GMDbackups           crypt
GMDmain              drive
GMDmedia             crypt
GSD                  drive

e) Edit existing remote
n) New remote
d) Delete remote
r) Rename remote
c) Copy remote
s) Set configuration password
q) Quit config
e/n/d/r/c/s/q>

@Rekulous
Copy link
Owner

sudo Python3 CloneCord.py

<===============================|| Running CloneCord Version 5 BETA! ||===============================>
Connected to bot: DriveUwUs
Bot ID: 911321895985635368
CloneCord is Ready!
CloneCord Status Ready!
Python Version: 3.9.5
Discord.py API version: 1.7.3
==================================================================================================================================================
----------------------------------------------------------------------------------------------------------------------
GClone Version:

Ignoring exception in on_ready
Traceback (most recent call last):
  File "/usr/local/lib/python3.9/dist-packages/discord/client.py", line 343, in _run_event
    await coro(*args, **kwargs)
  File "/home/shadows/CloneCord-Bot/CloneCord.py", line 81, in on_ready
    subprocess.run(
  File "/usr/lib/python3.9/subprocess.py", line 505, in run
    with Popen(*popenargs, **kwargs) as process:
  File "/usr/lib/python3.9/subprocess.py", line 951, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "/usr/lib/python3.9/subprocess.py", line 1821, in _execute_child
    raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'gclone version'

Running cat bot.log:

2021-11-19 19:10:10,604:DEBUG:discord.client: on_ready has successfully been registered as an event
2021-11-19 19:10:10,605:INFO:discord.client: logging in using static token
2021-11-19 19:10:10,747:DEBUG:discord.http: GET https://discord.com/api/v7/users/@me with None has returned 200
2021-11-19 19:10:10,747:DEBUG:discord.http: GET https://discord.com/api/v7/users/@me has received {'id': '911321895985635368', 'username': 'CloneCord-Bot', 'avatar': 'd417ed3d7ac46d455666768dc1e98a40', 'discriminator': '6902', 'public_flags': 0, 'flags': 0, 'bot': True, 'banner': None, 'banner_color': None, 'accent_color': None, 'bio': '', 'locale': 'en-US', 'mfa_enabled': True, 'email': None, 'verified': True}
2021-11-19 19:10:10,780:DEBUG:discord.http: GET https://discord.com/api/v7/gateway with None has returned 200
2021-11-19 19:10:10,780:DEBUG:discord.http: GET https://discord.com/api/v7/gateway has received {'url': 'wss://gateway.discord.gg'}
2021-11-19 19:10:10,886:DEBUG:discord.gateway: Created websocket connected to wss://gateway.discord.gg?encoding=json&v=6&compress=zlib-stream
2021-11-19 19:10:10,887:DEBUG:discord.client: Dispatching event socket_raw_receive
2021-11-19 19:10:10,887:DEBUG:discord.gateway: For Shard ID None: WebSocket Event: {'t': None, 's': None, 'op': 10, 'd': {'heartbeat_interval': 41250, '_trace': ['["gateway-prd-main-gz5q",{"micros":0.0}]']}}
2021-11-19 19:10:10,887:DEBUG:discord.client: Dispatching event socket_response
2021-11-19 19:10:10,887:DEBUG:discord.client: Dispatching event socket_raw_send
2021-11-19 19:10:10,887:DEBUG:discord.client: Dispatching event socket_raw_send
2021-11-19 19:10:10,888:INFO:discord.gateway: Shard ID None has sent the IDENTIFY payload.
2021-11-19 19:10:10,930:DEBUG:discord.client: Dispatching event socket_raw_receive
2021-11-19 19:10:10,930:DEBUG:discord.gateway: For Shard ID None: WebSocket Event: {'t': None, 's': None, 'op': 11, 'd': None}
2021-11-19 19:10:10,930:DEBUG:discord.client: Dispatching event socket_response
2021-11-19 19:10:11,059:DEBUG:discord.client: Dispatching event socket_raw_receive
2021-11-19 19:10:11,060:DEBUG:discord.gateway: For Shard ID None: WebSocket Event: {'t': 'READY', 's': 1, 'op': 0, 'd': {'v': 6, 'user_settings': {}, 'user': {'verified': True, 'username': 'DriveUwUs', 'mfa_enabled': True, 'id': '911321895985635368', 'flags': 0, 'email': None, 'discriminator': '6902', 'bot': True, 'avatar': 'd417ed3d7ac46d455666768dc1e98a40'}, 'session_id': 'ddefff1b6e38dce28a7696bc634cfc79', 'relationships': [], 'private_channels': [], 'presences': [], 'guilds': [], 'guild_join_requests': [], 'geo_ordered_rtc_regions': ['us-central', 'us-south', 'atlanta', 'us-east', 'newark'], 'application': {'id': '911321895985635368', 'flags': 827392}, '_trace': ['["gateway-prd-main-gz5q",{"micros":131736,"calls":["discord-sessions-green-prd-2-42",{"micros":130702,"calls":["start_session",{"micros":71798,"calls":["api-prd-main-22dx",{"micros":67586,"calls":["get_user",{"micros":10373},"add_authorized_ip",{"micros":4971},"get_guilds",{"micros":3752},"coros_wait",{"micros":1}]}]},"guilds_connect",{"micros":1,"calls":[]},"presence_connect",{"micros":47291,"calls":[]}]}]}]']}}
2021-11-19 19:10:11,060:DEBUG:discord.client: Dispatching event socket_response
2021-11-19 19:10:11,060:INFO:discord.gateway: Shard ID None has connected to Gateway: ["gateway-prd-main-gz5q",{"micros":131736,"calls":["discord-sessions-green-prd-2-42",{"micros":130702,"calls":["start_session",{"micros":71798,"calls":["api-prd-main-22dx",{"micros":67586,"calls":["get_user",{"micros":10373},"add_authorized_ip",{"micros":4971},"get_guilds",{"micros":3752},"coros_wait",{"micros":1}]}]},"guilds_connect",{"micros":1,"calls":[]},"presence_connect",{"micros":47291,"calls":[]}]}]}] (Session ID: ddefff1b6e38dce28a7696bc634cfc79).
2021-11-19 19:10:11,074:DEBUG:discord.client: Dispatching event connect
2021-11-19 19:10:13,075:DEBUG:discord.client: Dispatching event ready
2021-11-19 19:10:13,075:DEBUG:discord.gateway: Sending "{"op":3,"d":{"game":{"flags":0,"type":3,"name":"/help to get help! CloneCord V6 BETA"},"afk":false,"since":0.0,"status":"online"}}" to change status
2021-11-19 19:10:13,076:DEBUG:discord.client: Dispatching event socket_raw_send

gclon version command regularly:

shadows@shadowdrive:~/CloneCord-Bot$ gclone version
rclone v1.57.0-mod1.3.2
- os/version: ubuntu 21.04 (64 bit)
- os/kernel: 5.11.0-1022-gcp (x86_64)
- os/type: linux
- os/arch: amd64
- go/version: go1.17.3
- go/linking: static
- go/tags: none
shadows@shadowdrive:~/CloneCord-Bot$

Yes this is a known problem with CloneCord Linux. I don't have time to fix it. Way too many problems and code is messy.

My friend Cerda / AndreVuillemot160 said he's re-working the bot though. So I'll check it out.

@ShiroUwUs7
Copy link
Author

ah I see. well i got it working on windows lol. just the commands are not working at all should it be / (what I chose for the command key) '/clone LinkToFolderToBeCopied FolderIdOfDestination enter'? or am I missing something.

@iamtakingithard
Copy link
Contributor

@Rekulous >My friend Cerda / AndreVuillemot160 said he's re-working the bot though. So I'll check it out.

Currently, the development of it is stalled. Maybe when I will get more experience I will give a shot once again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants