{"id":19671260,"url":"https://github.com/knighthacks/discordbot-new","last_synced_at":"2026-05-13T18:36:55.791Z","repository":{"id":49535100,"uuid":"361031117","full_name":"KnightHacks/DiscordBot-New","owner":"KnightHacks","description":null,"archived":false,"fork":false,"pushed_at":"2021-07-01T18:46:09.000Z","size":455,"stargazers_count":0,"open_issues_count":7,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-01-10T03:39:07.661Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/KnightHacks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-04-23T23:48:53.000Z","updated_at":"2021-07-01T18:46:11.000Z","dependencies_parsed_at":"2022-08-01T00:38:06.518Z","dependency_job_id":null,"html_url":"https://github.com/KnightHacks/DiscordBot-New","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KnightHacks%2FDiscordBot-New","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KnightHacks%2FDiscordBot-New/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KnightHacks%2FDiscordBot-New/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/KnightHacks%2FDiscordBot-New/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/KnightHacks","download_url":"https://codeload.github.com/KnightHacks/DiscordBot-New/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240980888,"owners_count":19888344,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-11T17:08:17.698Z","updated_at":"2026-05-13T18:36:50.770Z","avatar_url":"https://github.com/KnightHacks.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Lancelot\n\nThis repository contains the source code for Knight Hacks' Discord bot!\n\n## Getting Started\n\n### Get the Code\n\nYou'll need [`git`](https://git-scm.com/downloads) in order to run the command\nbelow.\n\n```bash\ngit clone https://github.com/KnightHacks/DiscordBot-New.git\n```\n\n### Build the Project\n\nWe use [Docker](https://www.docker.com/get-started) to build and deploy this\nproject. Once you've installed Docker, you should be able to build the project using:\n\n```bash\ndocker build -t lancelot -f Dockerfile.dev .\n```\n\nThen use:\n\n```bash\ndocker run lancelot\n```\n\nto start the project. You can repeat these commands each time you want to build\nand run an updated version of the code.\n\n**This won't work the first time you run this!** You need to get a _token_ to\ndeploy your instance of the bot to a test server.\n\n### Get a Token\n\nYou'll need a token in order to allow your bot to connect to Discord. Go to the\n[Discord Developer Portal](https://discord.com/developers) to set up your\ndeveloper account. You will need to click \"New Application\" and follow the\nprompts to set up your own test instance of Lancelot.\n\nOnce you've set up your test instance of the bot, you'll need to set up a test\nbot user. Click \"Bot\" with the puzzle piece on the left side of the screen.\n\n![sidebar](./docs/bot-sidebar.png)\n\nYou should now be able to copy your token from the middle of the screen.\n**Don't share this!** Anyone who has this token can control your bot account\nand attach other bots to it or worse. Never publish it to source control\nsoftware like Git or GitHub.\n\n![build-a-bot](./docs/build-a-bot.png)\n\nCreate a file called `.env` in the root of the project folder with the token.\nThis file should be automatically ignored by the Git configuration.\n\n```bash\necho \"DISCORD_TOKEN=YOUR_TOKEN_HERE\" \u003e .env\n```\n\nThen go to the discord server which you are testing with and get the guild ID.\nAdd this to your .env\n\n```bash\necho \"GUILD_ID=YOUR_GUILD_ID_HERE\" \u003e\u003e .env\n```\n\n### Set up Permissions\n\nFinally, you'll need to give your test bot the appropriate permissions so it\ncan do things. First, on the \"Bot\" page, turn **on** the \"Server Members\nIntent\" option under \"Privileged Gateway Intents\".\n\nNext, go to the OAuth2 page and **select \"bot\" and \"application.command\" under \"Scopes\"**. A bunch of\npermissions should appear below; the following are recommended settings for the\nbot permissions:\n\n![bot-permissions](./docs/bot-permissions.png)\n\nDiscord will generate an link on the screen which you can use to add the bot to\na server. The simplest thing to do is to make your own testing server and then\nfollow the link, which will prompt you to add the bot to a server you\nadminister.\n\n### Run the Bot\n\nNow, you should be able to build and run the bot locally. It will connect to\nthe server you added it to above and should be interactive!\n\n```bash\ndocker build -t lancelot .\ndocker run lancelot\n```\n\nThe final command should hang with no immediate output if it is working\nproperly. You can use `control-c` to terminate the bot.\n\nTry sending a `!help` message in your server to test the bot!\n\nEach time you make changes to the bot's code, you will need to rerun the above\nto rebuild the bot.\n\nHappy hacking!\n\n### Linting\n\nWe use [flake8](https://flake8.pycqa.org/en/latest/) to lint the project and\nwarn about possible errors. When you create a PR, flake8 will be run\nautomatically to ensure your changes are in compliance. To enable live flake8\nerrors in VSCode, follow the instructions here:\nhttps://code.visualstudio.com/docs/python/linting.\n\n## License\n\nAGPL 3.0\n\nClick the `LICENSE` file in the code above for details about what this means.\nBy contributing to this repository, you agree to license your code under this\nlicense.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknighthacks%2Fdiscordbot-new","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fknighthacks%2Fdiscordbot-new","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fknighthacks%2Fdiscordbot-new/lists"}