discord-drive


Namediscord-drive JSON
Version 0.0.11 PyPI version JSON
download
home_pagehttps://github.com/thedomino1313/DiscordDrive
SummaryUse Google Drive via Discord!
upload_time2024-04-20 17:28:14
maintainerNone
docs_urlNone
authorRyan Karch, Dominic Beyer
requires_pythonNone
licenseMIT
keywords discord google drive
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
## Usage:
1. Install the library:
   ```
   pip install discord-drive
   ```
2. Follow the official [Google Drive Developer quick-start instructions](https://developers.google.com/drive/api/quickstart/python) to generate your credentials file.
3. Save the credentials file as `credentials.json` in the running directory of your Discord bot.
4. Open Google Drive, go to the directory that you want to root the bot to, and get the link.
   - It should be of format: `https://drive.google.com/drive/folders/folder_id`
5. Create a Discord bot using Pycord, and add the DiscordDrive command suite to it with the following code:
   ```python
   from discord_drive import DriveAPICommands
   bot.add_cog(DriveAPICommands(bot, "<link from step 5>"))
   ```
6. Run the bot, and use `/authenticate` to ensure that DiscordDrive is authorized to access your Google Account.

## Commands:
`/authenticate`: Regenerates the token needed to enable the API. If re-authentication is needed, the bot will DM the caller a link and wait for the authentication code given to the caller by Google\
`/cd <directory>`: Navigates the caller down into a child directory of their current directory. Autocomplete is provided for hints.\
`/download <file> <timeout (optional)> <public (optional)>`: Gives the user the file (or a link) to download the file specified. Files have autocomplete. Timeout defaults to 60 seconds, where the file will then no longer be allowed to be downloaded. Public defaults to False, where no other users can see the file.\
`/ls`: Shows the caller the contents of their current directory.\
`/pwd`: Shows the caller the file path of their current directory.\
`/share <file> <user> <timeout (optional)>`: Sends a specified server member a dm with a file from the caller's current directory. Files and users have autocomplete. Timeout defaults to 60 seconds, where the file will then no longer be allowed to be downloaded.\
`/upload <attachment>`: Uploads a file or zip file to the caller's current directory. Zip files must contain just the files, and no folders, as they will not be read.

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/thedomino1313/DiscordDrive",
    "name": "discord-drive",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": "Discord, Google Drive",
    "author": "Ryan Karch, Dominic Beyer",
    "author_email": null,
    "download_url": "https://files.pythonhosted.org/packages/43/30/76461e657197dbf8b05a39cf516a690f59ff8c82fa36475d42dddf0661c9/discord_drive-0.0.11.tar.gz",
    "platform": null,
    "description": "\n## Usage:\n1. Install the library:\n   ```\n   pip install discord-drive\n   ```\n2. Follow the official [Google Drive Developer quick-start instructions](https://developers.google.com/drive/api/quickstart/python) to generate your credentials file.\n3. Save the credentials file as `credentials.json` in the running directory of your Discord bot.\n4. Open Google Drive, go to the directory that you want to root the bot to, and get the link.\n   - It should be of format: `https://drive.google.com/drive/folders/folder_id`\n5. Create a Discord bot using Pycord, and add the DiscordDrive command suite to it with the following code:\n   ```python\n   from discord_drive import DriveAPICommands\n   bot.add_cog(DriveAPICommands(bot, \"<link from step 5>\"))\n   ```\n6. Run the bot, and use `/authenticate` to ensure that DiscordDrive is authorized to access your Google Account.\n\n## Commands:\n`/authenticate`: Regenerates the token needed to enable the API. If re-authentication is needed, the bot will DM the caller a link and wait for the authentication code given to the caller by Google\\\n`/cd <directory>`: Navigates the caller down into a child directory of their current directory. Autocomplete is provided for hints.\\\n`/download <file> <timeout (optional)> <public (optional)>`: Gives the user the file (or a link) to download the file specified. Files have autocomplete. Timeout defaults to 60 seconds, where the file will then no longer be allowed to be downloaded. Public defaults to False, where no other users can see the file.\\\n`/ls`: Shows the caller the contents of their current directory.\\\n`/pwd`: Shows the caller the file path of their current directory.\\\n`/share <file> <user> <timeout (optional)>`: Sends a specified server member a dm with a file from the caller's current directory. Files and users have autocomplete. Timeout defaults to 60 seconds, where the file will then no longer be allowed to be downloaded.\\\n`/upload <attachment>`: Uploads a file or zip file to the caller's current directory. Zip files must contain just the files, and no folders, as they will not be read.\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Use Google Drive via Discord!",
    "version": "0.0.11",
    "project_urls": {
        "Homepage": "https://github.com/thedomino1313/DiscordDrive"
    },
    "split_keywords": [
        "discord",
        " google drive"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "b76cf70b1dbaafbd8d4e70e64df800bf1363ba9420be1da8d99fdb26840ff6a4",
                "md5": "877b5dc473d886b600fd24c4c550b824",
                "sha256": "16662f197681e0e4cbfd2b1aa42448ec0c9ed745fab3c8defa78fde3a0bd21ee"
            },
            "downloads": -1,
            "filename": "discord_drive-0.0.11-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "877b5dc473d886b600fd24c4c550b824",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 12802,
            "upload_time": "2024-04-20T17:28:12",
            "upload_time_iso_8601": "2024-04-20T17:28:12.760467Z",
            "url": "https://files.pythonhosted.org/packages/b7/6c/f70b1dbaafbd8d4e70e64df800bf1363ba9420be1da8d99fdb26840ff6a4/discord_drive-0.0.11-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "433076461e657197dbf8b05a39cf516a690f59ff8c82fa36475d42dddf0661c9",
                "md5": "5c07ff61fd00f85a2672aa0351cff505",
                "sha256": "1125b8f467ff8a16738483a149798ab7ca3241a9ad4c3d4322f3265b06c48b81"
            },
            "downloads": -1,
            "filename": "discord_drive-0.0.11.tar.gz",
            "has_sig": false,
            "md5_digest": "5c07ff61fd00f85a2672aa0351cff505",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 12287,
            "upload_time": "2024-04-20T17:28:14",
            "upload_time_iso_8601": "2024-04-20T17:28:14.304785Z",
            "url": "https://files.pythonhosted.org/packages/43/30/76461e657197dbf8b05a39cf516a690f59ff8c82fa36475d42dddf0661c9/discord_drive-0.0.11.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-04-20 17:28:14",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "thedomino1313",
    "github_project": "DiscordDrive",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "discord-drive"
}
        
Elapsed time: 0.24448s