topisani / discurses Goto Github PK
View Code? Open in Web Editor NEWA Python discord CLI focused on usability
License: MIT License
A Python discord CLI focused on usability
License: MIT License
Could someone make an AUR package?
All I can find is a file called "discurses". The description is not specific enough
Should probably be done from the channel selector menu
Discurses Version: 0.3.3
When in the server panel, and the Space button is pressed the channel list is shown. However if you press Space again on a channel, chat messages and the user list are wiped and will not be shown again no matter what is done. The message bar still switches. Pressing Enter works as intended, however Space causes this bug.
Let me know if you need more information. Thanks!
Could an argument be added to specify a login token manually? This would be helpful, since I manage multiple Discord accounts.
I figure it could be implemented with an option like discurses --token="ajsdlkjsdanfkjdsanflsdfb728342836423"
.
If you're planning on doing more stuff with the "config" file as it currently is, then it'd be most convenient if the token could be overridden, along with another option to manually specify a config file. Thanks in advance, this is the one good custom Discord client I've seen so far, so I'm looking forward to seeing it develop.
I'm running
sudo -H pip3.6 install discurses
and I get the error:
File "", line 1, in
File "/tmp/pip-install-gawvt9ev/discurses/setup.py", line 5, in
from pip.req import parse_requirements
ModuleNotFoundError: No module named 'pip.req'
Command "python setup.py egg_info" failed with error code 1 in /tmp/install/gawvt9ev/discurses/
Title pretty much describes it. Ive installed it in an chrooted ubuntu. Cant launch it from terminal, command doesent exist
~/.config> python3 -m discurses /usr/bin/python3: No module named discurses.__main__; 'discurses' is a package and cannot be directly executed
In menus, especially the channel selector, hitting a letter should jump to the first entry starting with that letter.
I just cant get the application started, even after checking all dependencies and similar.
npm should add the command discurses, right?
> localStorage.getItem("token")
Uncaught ReferenceError: localStorage is not defined
at <anonymous>:1:1
(anonymous) @ VM943:1
Unable to get token for .yaml
file, the localStorage function is no longer there.
When i try to start discurses i get this error:
➜ discurses
Traceback (most recent call last):
File "/usr/bin/discurses", line 7, in <module>
from discurses.__main__ import main
File "/usr/lib/python3.7/site-packages/discurses/__main__.py", line 1, in <module>
from . import discord
File "/usr/lib/python3.7/site-packages/discurses/discord.py", line 7, in <module>
from discord import Channel, Message
ImportError: cannot import name 'Channel' from 'discord' (/usr/lib/python3.7/site-packages/discord/__init__.py)
Screenshot: https://imgur.com/EBunr3F
Arch x86_64
discurses from pip
I'm in 27 servers if that makes a difference.
Traceback (most recent call last): │+ /r/Android: 17 │
File "/usr/lib/python3.6/site-packages/discord/client.py", line 307, in _run_event │
yield from getattr(self, event)(*args, **kwargs)lehome: 4 │
File "/usr/lib/python3.6/site-packages/discurses/discord.py", line 36, in eh │
f(*args, **kwargs) │+ Discord Electronics Server: 16 │
File "/usr/lib/python3.6/site-packages/discurses/ui/message_list.py", line 42, in _on_message │
if message.timestamp.date() != self.list_walker[-1].message.timestamp.date(): │
IndexError: list index out of range │+ Facepunch CD/TG/A: 21
When attempting to start discurses for a first time, I receive this error:
Traceback (most recent call last): File "/usr/bin/discurses", line 7, in <module> from discurses.__main__ import main File "/usr/lib/python3.6/site-packages/discurses/__main__.py", line 1, in <module> from . import discord File "/usr/lib/python3.6/site-packages/discurses/discord.py", line 9, in <module> import discurses.config as config File "/usr/lib/python3.6/site-packages/discurses/config.py", line 10, in <module> with open(CONFIG_FILE_PATH, 'r') as file: FileNotFoundError: [Errno 2] No such file or directory: '/home/piqle/.config/discurses.yaml'
This is a fresh Manjaro i3 install.
$ discurses
Gives this error
Traceback (most recent call last):
File "/usr/bin/discurses", line 11, in <module>
load_entry_point('discurses==0.2.4', 'console_scripts', 'discurses')()
File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 560, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2648, in load_entry_point
return ep.load()
File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2302, in load
return self.resolve()
File "/usr/lib/python3.5/site-packages/pkg_resources/__init__.py", line 2308, in resolve
module = __import__(self.module_name, fromlist=['__name__'], level=0)
File "/usr/lib/python3.5/site-packages/discurses/__init__.py", line 1, in <module>
import discurses.discord
File "/usr/lib/python3.5/site-packages/discurses/discord.py", line 10, in <module>
import discurses.config as config
File "/usr/lib/python3.5/site-packages/discurses/config.py", line 10, in <module>
with open(CONFIG_FILE_PATH, 'r') as file:
FileNotFoundError: [Errno 2] No such file or directory: '/home/nagra/.config/discurses.yaml'
Hello,
Installed according to the Readme on my RasPi B+, but when I try running it it returns the following:
Traceback (most recent call last):
File "/usr/local/bin/discurses", line 9, in <module>
load_entry_point('discurses==0.3.0', 'console_scripts', 'discurses')()
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 356, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2476, in load_entry_point
return ep.load()
File "/usr/lib/python3/dist-packages/pkg_resources.py", line 2190, in load
['__name__'])
File "/usr/local/lib/python3.4/dist-packages/discurses/__init__.py", line 1, in <module>
from . import discord
File "/usr/local/lib/python3.4/dist-packages/discurses/discord.py", line 32
async def eh(*args, **kwargs):
^
SyntaxError: invalid syntax
Can you help?
Im trying to run discurses behind a proxy
I tried configuring the https proxy in ubuntu but discurses just crashes
Hi,
Here is my configuration :
/root/.config/discurses.yaml
But it doesn't work.
gnoring exception in on_ready
Traceback (most recent call last):
File "/root/.pyenv/versions/3.6.5/lib/python3.6/site-packages/discord/client.py", line 307, in _run_event
yield from getattr(self, event)(*args, **kwargs)
File "/root/.pyenv/versions/3.6.5/lib/python3.6/site-packages/discurses/discord.py", line 52, in on_ready
self.ui.on_ready()
File "/root/.pyenv/versions/3.6.5/lib/python3.6/site-packages/discurses/ui/main.py", line 152, in on_ready
self.set_tab(0)
File "/root/.pyenv/versions/3.6.5/lib/python3.6/site-packages/discurses/ui/main.py", line 137, in set_tab
self.discord, [], None, name=str(tab + 1)))
File "/root/.pyenv/versions/3.6.5/lib/python3.6/site-packages/discurses/ui/chat.py", line 46, in __init__
self.w_server_tree = ServerTree(self)
File "/root/.pyenv/versions/3.6.5/lib/python3.6/site-packages/discurses/ui/server_tree.py", line 15, in __init__
key=lambda s: s.name):
TypeError: '<' not supported between instances of 'NoneType' and 'str'
Could you help me please ?
Thanks !
I am using i3wm, relying heavily on the alt key. So far as I can tell I have not assigned alt+b to anything, so there should not be any conflicts with other programs. When I use it to try and get the member list, nothing happens. I have tried it in several different places, including chat, server list, etc. So far, I have gotten nothing from alt+b.
Yup, pretty self explanitory, i gotta fix that
https://docs.python.org/3.7/whatsnew/3.7.html#changes-in-python-behavior
File "~/.pyenv/versions/3.7.0/lib/python3.7/site-packages/discurses/discord.py", line 69
def async(self, f):
^
SyntaxError: invalid syntax
After selecting a message and pressing Y, it displayed an error saying I needed xclip. Having installed xclip, doing this doesn't change the contents of xclip at all.
Where's the thingy?
When you hit the enter key on any channel in any server that you do not have permissions to view, it will wipe all the messages already sent, and the messages that are being sent afterwards. You can still send messages though. I'm not sure if any other people have this problem, but it's been pretty notable to me.
If you need anymore information I'd be glad to provide it.
like which keys to use to navigate the cli or maybe make a builtin help page, like pressing ctrl-h or something
how to mention people on the server?
When selecting a server (but no channel), you can send messages (in my case, they show up on the default #general channel) but you don't see any messages in the list (because no channels are selected).
I suggest that if a server is selected, but not a channel, a default channel should be selected for viewing as well as for sending messages.
Thanks for the project!
Traceback (most recent call last):
File "/usr/local/bin/discurses", line 7, in
from discurses import main
File "/usr/local/lib/python3.5/dist-packages/discurses/init.py", line 1, in
from . import discord
File "/usr/local/lib/python3.5/dist-packages/discurses/discord.py", line 10, in
import discurses.ui as ui
File "/usr/local/lib/python3.5/dist-packages/discurses/ui/init.py", line 10, in
from discurses.ui.chat import ChatWindow
File "/usr/local/lib/python3.5/dist-packages/discurses/ui/chat.py", line 15, in
class ChatWindow(urwid.WidgetWrap, HasModal):
File "/usr/local/lib/python3.5/dist-packages/discurses/ui/chat.py", line 24, in ChatWindow
class FocusTarget(enum.Enum):
File "/usr/local/lib/python3.5/dist-packages/discurses/ui/chat.py", line 25, in FocusTarget
CHANNEL_SELECTOR = enum.auto()
AttributeError: module 'enum' has no attribute 'auto'
I checked my PATH and installed the latest version of Python to no avail.
When I have discurses open, the status bar that displays who is currently typing almost always says that I am typing. It is perfectly accurate for other people, but not for me. When I type a message, it will turn on, and then it will stop at the proper time. Then after a few seconds it will turn itself on again and stay on about 90% of the time the application is open. This makes it display me as currently typing for other people as well.
When I first log in, I have a choice of servers and channels. If I select a server, everything works. If I expand the tree and select a specific channel, then pushing the down arrow to switch channels does not work. It only displays the current channel. Alt + s still works to go back though. I am not sure if this is a bug, or if it was intended. At the same time, if I select a server but not a channel at the start, all messages from all channels are shown on one screen, even though I am sending to only one channel. I like this, but again am not sure if it is a bug. (Not sending a picture of that for privacy reasons).
On platforms without notify-send (e.g. macOS), "sh: notify-send: command not found" gets spammed within Discurses.
Nuthin, huh? Shoot, you don't need a million dollars to do nuthin, man... just take a look at my cousin, man... he's broke and don't do sh*t!
This error happens whenever you press enter or space twice in a channel under a server, it also freezes
Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC, making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words, consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source. Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC. This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..", comes from a line in section 1.10.32.
The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum" by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.
from @warshanks
So I tried to reinstall and I got this
pip3.6 install discurses Collecting discurses Using cached discurses-0.3.0.tar.gz Complete output from command python setup.py egg_info: Traceback (most recent call last): File "<string>", line 1, in <module> File "/tmp/pip-install-swwsrz2u/discurses/setup.py", line 5, in <module> from pip.req import parse_requirements ModuleNotFoundError: No module named 'pip.req'
----------------------------------------
Command "python setup.py egg_info" failed with error code 1 in /tmp/pip-install-swwsrz2u/discurses/
The concerned line should not appear in setup.py anyway.
Still, I have no problem while setting up discurses.
A few things that should be configurable
Commands should be global, instead of widget specific. Then each widget makes some basic fields avaliable for key/mousepress shortcuts.
A command prompt should also be added.
Example command:
select-send-channel <channel>
Example shortcut
MESSAGE_LIST_ITEM("s"): "select-send-channel %m.channel"
This may be done in direct python instead, but it needs to be configurable.
When I added my token to the file, I did the rename and everything and I put the file into ~/.config/
I put it in that folder, not any other folder. I am on mac, and all it says when I type discurses
into terminal, is: "Logging in... Hang tight!"
I found the log file, and this is what it contained:
18-08-2017 19:29:39 [INFO] discurses: Now logging!
18-08-2017 19:29:39 [INFO] discurses: Now logging!
18-08-2017 19:29:39 [WARNING] discord.client: PyNaCl is not installed, voice will NOT be supported
18-08-2017 19:29:39 [WARNING] discord.client: PyNaCl is not installed, voice will NOT be supported
18-08-2017 19:29:39 [INFO] discord.client: logging in using static token
18-08-2017 19:29:39 [INFO] discord.client: logging in using static token
18-08-2017 19:29:40 [INFO] discord.gateway: Created websocket connected to wss://gateway.discord.gg?encoding=json&v=6
18-08-2017 19:29:40 [INFO] discord.gateway: Created websocket connected to wss://gateway.discord.gg?encoding=json&v=6
18-08-2017 19:29:40 [INFO] discord.gateway: sent the identify payload to create the websocket
18-08-2017 19:29:40 [INFO] discord.gateway: sent the identify payload to create the websocket
18-08-2017 19:29:43 [ERROR] asyncio: Task exception was never retrieved
future: <Task finished coro=<ConnectionState._delay_ready() done, defined at /Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/discord/state.py:166> exception=AttributeError('_member_count',)>
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/asyncio/tasks.py", line 239, in _step
result = coro.send(None)
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/discord/state.py", line 180, in _delay_ready
chunks.extend(self.chunks_needed(server))
File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/site-packages/discord/state.py", line 163, in chunks_needed
for chunk in range(math.ceil(server._member_count / 1000)):
AttributeError: _member_count
18-08-2017 19:29:54 [DEBUG] discurses.discord: Running 0 event handlers for on_message
18-08-2017 19:29:54 [DEBUG] discurses.discord: Running 0 event handlers for on_message
18-08-2017 19:29:57 [DEBUG] discurses.ui.main: Keypres reached global map: ('mouse press', 1.0, 71, 11)
18-08-2017 19:29:57 [DEBUG] discurses.ui.main: Keypres reached global map: ('mouse press', 1.0, 71, 11)
18-08-2017 19:29:57 [DEBUG] discurses.ui.main: Keypres reached global map: ('mouse release', 0, 71, 11)
18-08-2017 19:29:57 [DEBUG] discurses.ui.main: Keypres reached global map: ('mouse release', 0, 71, 11)
18-08-2017 19:30:02 [DEBUG] discurses.discord: Running 0 event handlers for on_message
18-08-2017 19:30:02 [DEBUG] discurses.discord: Running 0 event handlers for on_message
Due to updated ToS you're unable to pull your own token anymore.
Will there be a workaround for this?
I'm not entirely sure this is what causes the bug, but the filename I was trying to use was
~/import/3ffd2e08ab2741ba9faeab1f1c6c4c894004c048.jpg. Absolute paths didn't work, either, so I think it's the length of the filename which causes the bug.
It might be worth nothing that the normal "File not found!" response doesn't appear if you enter an invalid filename of about the same length.
The terminal has no characters, as if you're entering a password into something like sudo. If you open discurses or close it(which doesn't work btw) the terminal accepts input but characters don't show up. An easy fix for this is to run "reset" in the shell. https://askubuntu.com/questions/171449/shell-does-not-show-typed-in-commands-reset-works-but-what-happened?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa Open that link, it explains what I mean.
Just got Discurses up and running, I like it. but goodness gracious the notification spam is insane if you're in many servers. Is there any way to disabled the notifications entirely?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.