Skip to content
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

[Status] Command to clear deleted channels #101

Closed
Vexed01 opened this issue Aug 25, 2022 · 0 comments · Fixed by #104
Closed

[Status] Command to clear deleted channels #101

Vexed01 opened this issue Aug 25, 2022 · 0 comments · Fixed by #104
Labels
approved I'll be implementing this soon cog: status Relating to the Status cog good first issue Good for newcomers type: enhancement New feature or request

Comments

@Vexed01
Copy link
Owner

Vexed01 commented Aug 25, 2022

What cog is this feature request for?

Status

Describe the feature request in as much detail as possible

Add a command to clear channels from Config that have been deleted. It should be owner only and tell them the total number removed.

I have made the simple code to delete the channels:

all_cs = await self.config.all_channels()

for c in all_cs:
  chan = bot.get_channel(c)
  if chan is None:
    await self.config.channel_from_id(c).clear()

A note should also be added to the unfindable channel log about the command's existance which notes that this could be caused by a deleted channel or not having a fully chunked bot. The TODO should be removed. Both are in this file:

# TODO: maybe remove from config
_log.info(f"I can't find the channel with id {c_id} - skipping")

@Vexed01 Vexed01 added type: enhancement New feature or request good first issue Good for newcomers cog: status Relating to the Status cog approved I'll be implementing this soon labels Aug 25, 2022
Vexed01 pushed a commit that referenced this issue Nov 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved I'll be implementing this soon cog: status Relating to the Status cog good first issue Good for newcomers type: enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant