Skip to content
This repository has been archived by the owner on Sep 15, 2023. It is now read-only.

Refactor shell extension to include permitted guilds check #49

Merged
merged 5 commits into from
Aug 10, 2023

Conversation

sweep-ai[bot]
Copy link
Contributor

@sweep-ai sweep-ai bot commented Aug 10, 2023

Description

This PR refactors the shell extension in the codebase to include a check for permitted guilds before processing shell commands. It introduces a new configuration file (config.yml) to store the list of permitted guilds. The doshell method in the Shell class now checks if the guild ID is in the list of permitted guilds and responds with an error message if the guild is not allowed to use shell commands.

Summary of Changes

  • Modified bot/src/exts/shell.py to include logic for checking permitted guilds in the doshell method.
  • Created a new configuration file bot/config.yml to store the list of permitted guilds.
  • Added a new section in bot/config.yml to list the guild IDs that are allowed to use shell commands.

Fixes #48.


To checkout this PR branch, run the following command in your terminal:

git checkout sweep/permitted-guilds-check

To get Sweep to edit this pull request, leave a comment below or in the code. Leaving a comment in the code will only modify the file but commenting below can change the entire PR.

@sweep-ai sweep-ai bot added the sweep Assigns Sweep to an issue or pull request. label Aug 10, 2023
@SomethingGeneric SomethingGeneric merged commit 69cbafe into main Aug 10, 2023
1 check passed
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
sweep Assigns Sweep to an issue or pull request.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Sweep: refactor shell extension to ensure it's being used in a list of allowed servers
1 participant