Skip to content

refactor: 🔒 request only necessary permissions #37

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

Draft
wants to merge 3 commits into
base: main
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -79,12 +79,12 @@ Notice the **TOKEN** section of the page, as we will use that in the next step.

### 4. Bot Permissions

In the Bot page, Scroll down and find **Bot Permissions**
In the Bot page, Scroll down and find **Privileged Gateway Intents**

Click the Administrator Box, so it looks as shown:
<img src="imgs/botPerms.webp" alt="Bot Permissions" width="100%"/>
Enable the "MESSAGE CONTENT INTENT" and click "Save Changes"
<img src="imgs/messagePermission.webp" width="100%"/>

### 4. Config File
### 5. Config File

Now go to your IDE or Text Editor, and make a copy of `config template.yaml`. Save the copy as `config.yaml`. This will be the bots config file, and is important to running on discord.

Expand Down Expand Up @@ -128,7 +128,7 @@ If you get stuck on this step, [here is a good reference to help](https://www.al

When you are done getting all of these filled in, your config should be ready to use.

### 5. Create an Invite Link
### 6. Create an Invite Link

Back in the Developer Portal, go to **OAuth2 > URL Generator** and check the `[ ] bot` checkbox. This will show a second set of options called **Bot Permissions**

Expand All @@ -137,7 +137,7 @@ In bot permissions, check the `[ ] Administrator` checkbox and scroll to the bot
The result should look like this below:
<img src="imgs/OAuthChecked.webp" alt="Completed OAuth2" width="100%"/>

### 6. Join the Testing Server and Add the bot.
### 7. Join the Testing Server and Add the bot.

First, join the **[Compsci Bot Testing Server](https://discord.gg/M48HYYYCyT)** if you havent already.

Expand All @@ -153,7 +153,7 @@ Now it should show on the server side panel, but it is not shown as being on.

<img src="imgs/inactive.webp" alt="inactive bot" width="50%"/>

### 7. Running your bot
### 8. Running your bot

You are almost done! Now for the coding part.

Expand Down
2 changes: 1 addition & 1 deletion bot.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
with open("config.yaml") as file:
config = yaml.load(file, Loader=yaml.FullLoader)

intents = nextcord.Intents.default().all()
intents = nextcord.Intents(message_content=True)

bot = Bot(command_prefix=config["bot_prefix"], intents=intents)

Expand Down
Binary file removed imgs/botPerms.webp
Binary file not shown.
Binary file added imgs/messagePermission.webp
Binary file not shown.