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
Fix Issue CSSUoB#154 (Archive Single Channel) #178
Open
edwinchan129
wants to merge
6
commits into
CSSUoB:main
Choose a base branch
from
edwinchan129:archive-single-channel
base: main
Could not load branches
Branch not found: {{ refName }}
Could not load tags
Nothing to show
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Contributor
edwinchan129
commented
Apr 24, 2024
- Modify autocomplete to only display channels
- Modify archive to change permission for one channel
- Modify archive to add archive- before channel.name to mark it as archived
Moved invite URL generation to global function within utils/generate_invite_url.py. Deleted utils/__main__.py and utils/base_utility_function.py. Removed main() from utils/init.py. Moved call to generate_invite_url() to startup.py. - If main guild not set, invite URL will be outputted and bot will be shutdown. - If main guild is set, invite URL will only be outputted if CONSOLE_LOG_LEVEL in environment variable set to DEBUG. I had to modify tests for generate_invite_url() in test/tests_util.py reflect new behavior as it no longer takes in command line arguments. - You may need to modify it accordingly to remove irrelevant test cases and adjust to new behavior.
- Modify autocomplete to only display channels - Modify archive to change permission for one channel - Modify archive to add archive- before channel.name to mark it as archived
…129/TeX-Bot-Py-V2 into archive-single-channel
CarrotManMatt
changed the title
Fix Issue CSSUoB#154
Fix Issue CSSUoB#154 (Archive Single Channel)
Apr 24, 2024
CarrotManMatt
added
enhancement
New feature or request
good first issue
Good for newcomers
labels
Apr 24, 2024
CarrotManMatt
requested changes
Apr 25, 2024
if category.permissions_for(interaction_user).is_superset( | ||
discord.OptionChoice(name=channel.name, value=str(channel.id)) | ||
for channel | ||
in main_guild.channels |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would reccomend using main_guild.text_channels
to ensure only text channels are archived. Archiving other channel types is out of scope for this command
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.