Comments (4)
I'm... not actually sure how this would be implemented. I'm assuming that "changing the contents" of a file constitutes not entirely replacing it. It's hard to take any inspiration from existing text editors because most of them assume some form of context (in the form of cursor position), and Discord doesn't really have any.
A generally good yardstick for whether the implementation of a command makes any intuitive sense is whether it's painful to use on mobile. An implementation that is extremely awkward on mobile is generally just an awkward implementation in general - so with that in mind, creating an interface that would feel like it actually works on mobile seems close to an insurmountable task, with the amount of interactivity Discord gives you out of the gate.
It feels like a task that the newer bot integrations might be well suited to, but I have no personal interest in maintaining features that require verification (since it would mean it wouldn't be accessible to all users of Jishaku), and I doubt they will ever make their way into Jishaku by other means (because I don't plan on verifying and would be unable to personally audit them).
If you're just overwriting files, you could probably get away with jsk sh echo "..." > file
or running jsk py
to grab and download an attachment.
But if you're wanting some means to actually edit (not replace) files within Jishaku, then it'll require a lot more thought and discussion on how you're expecting such an interface to work.
from jishaku.
@Gorialis What you could do is a user dose cat and gets the content then dose a command and just edit the info from the cat. Then that info overwrites the file.
from jishaku.
This is probably a stupid idea but I might try implementing the ed
editor as a Feature. I doubt that it'll be merged but I can post it as a gist and link to it.
Edit: Looks like I have ~3k lines of c code to recreate, although I can probably reuse stuff from python's standard library like re
for regexes.
from jishaku.
There was an experiment I did at one point that would allow you to edit the contents of a file through a Modal. The character limit and usability concerns prevented it from really being useful in any serious context, though, so it never got in.
from jishaku.
Related Issues (20)
- jsk ast fails with an error in certain cases HOT 2
- ability to add user who can run jishaku on the fly HOT 2
- Button disable
- Add Whois command HOT 2
- Unsupport discord.py v1.7.x HOT 1
- Python 3.9.13 not supported HOT 1
- Proper user configurable jsk py dict vars HOT 1
- change jishaku commands names HOT 1
- Jishaku version occasionally appears as vNone in selftest HOT 4
- Adding asqlite to options for the sql features HOT 3
- Unhandled code branch in `jishaku voice` command.
- Cog already loaded when loading it HOT 1
- I canβt use jishaku shell command HOT 2
- `jishaku timeit` raises an AttributeError upon use. HOT 1
- Tracking: need for a new release
- KeyError on Python version 3.11.0 HOT 3
- AttributeError: 'Context' object has no attribute 'add_reaction' HOT 2
- Question about next possible release to pypi HOT 2
- Convert message links to Message objects in REPLs HOT 1
- [Tracking] import_expression doesn't function correctly in 3.12 HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from jishaku.