README.md (3534B)
1 # Auth 2 3 Auth is a Discord Bot to verify user, giving server owner the ability to pull back members in case of deletetion or forgot login. 4 5 # Getting Start 6 7 ### 1. Create a bot and copy TOKEN, CLIENT ID and CLIENT SECRET in [Discord Developer Portal](https://discord.com/developers/applications) (Bot Tab) 8 ![Discord Token](https://cdn.discordapp.com/attachments/837865823225511946/1233736241376137216/getting_start_token.png?ex=662e2de9&is=662cdc69&hm=a1199ad3f800c61f5b6686a6279e93962db3046bd78e194d1643cbeafcf1c6df) 9 ![Discord Client](https://cdn.discordapp.com/attachments/837865823225511946/1233736241040850984/getting_start_client.png?ex=662e2de9&is=662cdc69&hm=31b6679d650abf2706fd9c1994e8844a91904c13cf33bfee527796ff105ee027) 10 ### 2. Enable Intents as below 11 ![Discord Intents](https://cdn.discordapp.com/attachments/837865823225511946/1233734791698972702/getting_start_intents.png?ex=662e2c90&is=662cdb10&hm=aa39490e9a2488806e8c809e207384b37207aaa6047367e436b5c89409cda19b) 12 ### 3. Set the permissions as below (OAuth2 Tab) 13 Tick these boxes in SCOPES: 14 - bot 15 - applications.commands 16 17 Tick these boxes in BOT PERMISSIONS: 18 - Manage Server 19 - Manage Roles 20 - Manage Channels 21 - Create Instant Invite 22 - Read Messages/View Channels 23 - Send Messages 24 - Manage Messages 25 - Read Message History 26 27 Then, use the Link below to invite your bot to Servers. 28 ### 4. Create a Database in [MongoDB](https://mongodb.com) 29 Go to Overview > Data Services > Connect > Drivers. 30 Copy the code in Step 3\ 31 ![Mongo](https://cdn.discordapp.com/attachments/837865823225511946/1233734792621723738/getting_start_mongo.png?ex=662e2c90&is=662cdb10&hm=27b9e02e2b8268d551010f0ed67536c74b49f012ca4c2ee330f6f7e591e6b7d2) 32 ### 5. Choose the host you are using 33 - [Replit](#Replit) 34 - [Other Host](#Other-Host) 35 36 ## Replit 37 ### 6. Create a new project by importing from github 38 ![Replit Import](https://cdn.discordapp.com/attachments/837865823225511946/1233748914897686528/getting_start_import.png?ex=662e39b7&is=662ce837&hm=1823173d343f2d963a312398f099f21e4413a68aea718e8c6cd63c029e80577d) 39 ### 7. Add the information below in Secrets 40 ![Replit Secret](https://cdn.discordapp.com/attachments/837865823225511946/1233737177112772608/getting_start_replit_secret.png?ex=662e2ec8&is=662cdd48&hm=7d4b9f1d678b89bfc37cb1f865c270919710e5fec590a75930948f0df420710f) 41 42 ## Other Host 43 ### 6. Clone the repository and install the dependencies 44 ```cmd 45 git clone https://github.com/night0721/auth-bot.git 46 cd auth-bot 47 npm i 48 ``` 49 ### 7. Create a .env file and paste the code below, and replace XXX with a valid value 50 ```Dotenv 51 TOKEN=XXX 52 CLIENT_ID=XXX 53 CLIENT_SECRET=XXX 54 MONGO=mongodb+srv://XXX 55 CALLBACK_URL=http://XXX.XXX/api/auth/discord/redirect 56 PORT=XXX 57 api=https://api.night0721.xyz 58 ``` 59 ![Dotenv File](https://cdn.discordapp.com/attachments/837865823225511946/1233738177693352017/getting_start_dotenv.png?ex=662e2fb7&is=662cde37&hm=f62ef3ed8f6920da5acba8bebe6e1e0388def9b1623ffcf573455bc1011d5533) 60 61 ### 8. Run the server, and now enjoy! 62 ```cmd 63 npm run dev 64 ``` 65 Join our Discord Server for update's news! 66 67 ## Support 68 69 If you need support, you can join the [Discord Server](https://discord.gg/SbQHChmGcp) 70 71 ## License 72 73 This project is licensed under the GNU Public License v3.0. See [LICENSE](https://github.com/night0721/Auth/blob/master/LICENSE) for more information. 74 75 ## Contribution 76 77 If you have any ideas for improvements or new features, please feel free to fork the project and create a pull request or open an issue. 78 All contributions are welcome, including translations, documentation, and code.