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

What is the correct syntax to specify multiple channels to exclude from deletion? #47

Closed
larryqiann opened this issue Jul 16, 2022 · 4 comments

Comments

@larryqiann
Copy link

I have tried to use the syntax ./discord-delete-darwin-arm64 partial -v -o 60 --skip 8xxxxxxx 6xxxxxxx 6xxxxxxxxx, but the application appears to have deleted some threads with those channel IDs.

Is there any way to have the application show what it believes the excluded channels are?

Thanks!

@larryqiann
Copy link
Author

After looking at the code for "pflag" which is where the flag parsing function is from, it seems that the values have to be comma-separated.

As such, I'm guessing it's more like --skip="8xxxxx,6xxxxx,6xxxxxxx" instead

https://github.com/spf13/pflag/blob/master/string_slice.go

// StringSliceVar defines a string flag with specified name, default value, and usage string.
// The argument p points to a []string variable in which to store the value of the flag.
// Compared to StringArray flags, StringSlice flags take comma-separated value as arguments and split them accordingly.
// For example:
//   --ss="v1,v2" --ss="v3"
// will result in
//   []string{"v1", "v2", "v3"}
func StringSliceVar(p *[]string, name string, value []string, usage string) {
	CommandLine.VarP(newStringSliceValue(value, p), name, "", usage)
}

// StringSliceVarP is like StringSliceVar, but accepts a shorthand letter that can be used after a single dash.
func StringSliceVarP(p *[]string, name, shorthand string, value []string, usage string) {
	CommandLine.VarP(newStringSliceValue(value, p), name, shorthand, usage)
}

@fosspill
Copy link
Contributor

fosspill commented Jul 16, 2022

This is well documented in the https://github.com/cedws/discord-delete/wiki/Skipping-specific-channels page. This is also linked directly from the main readme.

Basically: ./discord-delete partial -s 777813370090815590 -s 796286628817272843 -s 805364751726280745

Hopefully that's helpful :)

@cedws
Copy link
Owner

cedws commented Jul 16, 2022

Hope the above answers your question.

@cedws cedws closed this as completed Jul 16, 2022
@larryqiann
Copy link
Author

Thank you for the update. I am sorry I missed this, I do remember being on that documentation page but must have missed the example with multiple. (might have also clicked on the wrong version)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants