Conversation
vivekashok1221
left a comment
There was a problem hiding this comment.
Thank you for opening this PR 🐍
|
This latest commit fixes the problems you mentioned, but i noticed it's impossible to include the last line when slicing (i.e.
Additionally, I was wondering: Do we ever want to support |
I'm not really used to writing tests, especially for discord bots, but I could take a look at the code base and draft a PR for it later on (should I open an issue about it?) |
I like option 2 since it's consistent with how slicing in Python works. If we deviate from it, people might think it's a bug. re: writing tests
Sure (you don't need to open an issue IMO but you can if you want to) |
…_index % zen_lines would be 0, even though it's the last line
…rn all lines from the second to the last)
|
i implemented both 2 and 3, and from my quick tests all seems functional now. I'll take a look into the repo tests to see how I'd implement that |
Co-authored-by: Vivek Ashokkumar <vivekashok1221@gmail.com>
|
I drafted some tests for the zen command. I tried to keep a balance between hard-coding / developing answers myself. I don't think it's ready yet, but I'd love some opinions on it :) |
Implemented the feature in issue #3289.
Now, the
!zencommand accepts arguments in the formstart:stop, and will return the corresponding zen lines.Additionally, since the indices can now no longer simply be passed as integers, the
zen_rule_indexargument to the zen command was removed, and now indices are parsed from a regex expression.