A simple terminal based client for Discord using the discord.js API.
If you have any questions feel free to join this server.
Install with npm install -g terminal-discord
The default locations for the config file are ~/.config/terminal-discord or ~/.terminal-discord. It is however also possible to pass a path to a config file like such
$terminal-discord PATH_TO_CONFIG
All settings except Token are optional. Defaults can be found at the beginning of index.js where the config-file is parsed.
Check the example config in the repository for an example.
Discord has made token retrieval more difficult after recent updates. To find your token you have to navigate to the discord browser site, open the developer tools with ctrl+shift+i or similar and find the local storage as shown in the picture.
Once you reload the page the token will pop up for about a second. Copy it and paste it in the config-file.
The maximum length of usernames. If the value is null usernames are not cut short.
If set to false the seperators will be displayed right after the username instead of them being alligned with other seperators.
If allign is set to true then this option controls whether names are leftbound or rightbound.
Separator between username and message content.
Number of messages loaded at a time. If set to null will fetch as many messages as there are rows in the current terminal window.
If not null this corresponds to the index of the guild you want selected at startup.
If not null this corresponds to the index of the channel you want selected at startup.
To get the indices for both guild and channel navigate to your channel and use the /info command.
The prompt used.
%u
is replaced by your usernmame.
%d
by your nickname if present otherwise username.
%c
will be replaced by the channel name.
%g
is replaced by the guild name.
Wether color for usernames is enabled or not.
Default color for users without a role. If not set will default to #FFFFFF.
What background color the message should have when you get mentioned. Only applicable when colorsupport is enabled. Setting this to null disables the feature.
When a user sends multiple messages in a row this controls whether their name should be displayed multiple times or be replaced with a dot.
Whether the nickname should be displayed when available.
Show the timestamp next to a message.
Enable date support to display DD.MM.YYYY in front of the time.
Enter a command while in a channel using /.
q or quit: exits the client
u, update, r, refresh: refreshes manually
nick: changes your nickname
d, delete: deletes the last sent message
e, edit: replace the content of your last sent message with the string after /e. Pressing tab after "/edit " fills in the previous message.
c, channel: select a different channel within the same guild
m, menu: open the channel selection menu to switch to a different channel
o, online: show a list of currently online users
g, gr, group: open group chat selection menu to switch to a different channel
dm, pm: open dm chat selection menu to switch to a different channel
i, info: display basic information about the channel including indices
Note that edit and delete only work on messages sent in the current session. If you haven't sent a message in the current session the command will do nothing.