Git Product home page Git Product logo

discord-cli's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

discord-cli's Issues

Use GNU Readline

Go can work with C libraries. Currently it is using an unofficial version of this Library. Why not use the official bindings: it has been proven over time that it works. Also provides a finished Vi mode for all the Vi Folks out there.

2 Factor Authentication Support

I wanted to use this but with 2 Factor Authentication enabled I was returned with:

discord-cli - version: v0.3.0-DEVELOP

*Starting Session...2016/10/27 09:54:46 Session Failed
2016/10/27 09:54:46 Unable to fetch discord authentication token. <nil>

Pinned messages raise Unknown events

When a message is pinned, an Unknown event is raised:

> Unknown event.
Unknown event.
Event. Type: CHANNEL_PINS_UPDATE, State: 554 Operation: 0 Direction: 0
Event. Type: CHANNEL_PINS_ACK, State: 552 Operation: 0 Direction: 0
{
        "last_pin_timestamp": "2016-07-08T05:53:11.073283+00:00",
        "channel_id": "CHANNELID"
}
{
        "timestamp": "2016-07-08T05:53:11.073283+00:00",
        "channel_id": "CHANNELID"
}

Notifications

notify-send works pretty well.

Has a dependency on libnotify though, so it needs to check if it is available.

Cannot connect with discord-cli.

After setting up what I thought was a sane configuration, I get this message.

discord-cli - version: v0.3.0-DEVELOP

*Starting Session...2017/03/07 08:54:50 Session Failed
2017/03/07 08:54:50 Unable to fetch discord authentication token. HTTP 400 Bad Request, {"email": ["Not a well formed email address."]}

unrecognized import path - install error

As a preface, this error comes up while trying to install on an RPi running Debian Jessie, and as such it may be a specific issue to that architecture as I have had success installing on my x86_64 laptop. Version of Go is go1.6.2 linux/arm from the Jessie backports.

Trying to install outputs this error message:

package encoding/binary: unrecognized import path "encoding/binary" (import path does not begin with hostname)
package encoding/json: unrecognized import path "encoding/json" (import path does not begin with hostname)
package fmt: unrecognized import path "fmt" (import path does not begin with hostname)
package bytes: unrecognized import path "bytes" (import path does not begin with hostname)
package compress/zlib: unrecognized import path "compress/zlib" (import path does not begin with hostname)
package errors: unrecognized import path "errors" (import path does not begin with hostname)
package bufio: unrecognized import path "bufio" (import path does not begin with hostname)
package compress/flate: unrecognized import path "compress/flate" (import path does not begin with hostname)
package crypto/rand: unrecognized import path "crypto/rand" (import path does not begin with hostname)
package crypto/sha1: unrecognized import path "crypto/sha1" (import path does not begin with hostname)
package crypto/tls: unrecognized import path "crypto/tls" (import path does not begin with hostname)
package encoding/base64: unrecognized import path "encoding/base64" (import path does not begin with hostname)
package io: unrecognized import path "io" (import path does not begin with hostname)
package io/ioutil: unrecognized import path "io/ioutil" (import path does not begin with hostname)
package math/rand: unrecognized import path "math/rand" (import path does not begin with hostname)
package net: unrecognized import path "net" (import path does not begin with hostname)
package net/http: unrecognized import path "net/http" (import path does not begin with hostname)
package net/url: unrecognized import path "net/url" (import path does not begin with hostname)
package strconv: unrecognized import path "strconv" (import path does not begin with hostname)
package strings: unrecognized import path "strings" (import path does not begin with hostname)
package time: unrecognized import path "time" (import path does not begin with hostname)
package unicode/utf8: unrecognized import path "unicode/utf8" (import path does not begin with hostname)
package image: unrecognized import path "image" (import path does not begin with hostname)
package image/jpeg: unrecognized import path "image/jpeg" (import path does not begin with hostname)
package image/png: unrecognized import path "image/png" (import path does not begin with hostname)
package mime/multipart: unrecognized import path "mime/multipart" (import path does not begin with hostname)
package reflect: unrecognized import path "reflect" (import path does not begin with hostname)
package runtime: unrecognized import path "runtime" (import path does not begin with hostname)
package sync: unrecognized import path "sync" (import path does not begin with hostname)
package container/list: unrecognized import path "container/list" (import path does not begin with hostname)
package os: unrecognized import path "os" (import path does not begin with hostname)
package os/signal: unrecognized import path "os/signal" (import path does not begin with hostname)
package sync/atomic: unrecognized import path "sync/atomic" (import path does not begin with hostname)
package syscall: unrecognized import path "syscall" (import path does not begin with hostname)
package unicode: unrecognized import path "unicode" (import path does not begin with hostname)
package unsafe: unrecognized import path "unsafe" (import path does not begin with hostname)
package log: unrecognized import path "log" (import path does not begin with hostname)
package math: unrecognized import path "math" (import path does not begin with hostname)
package os/exec: unrecognized import path "os/exec" (import path does not begin with hostname)
package os/user: unrecognized import path "os/user" (import path does not begin with hostname)
package regexp: unrecognized import path "regexp" (import path does not begin with hostname)

Change Messages data structure

Currently Messages are being stored inside a map[string]*discordgo.Message
The order is random, sorting takes too long. Make it a queue.

Format bold text

Discord supports bold text with **bold text** tags. Many terminal emulators also support bold text, for example \033[1mbold text\033[0m. Could you add bold text formatting to this client?

List Users inside channel

More functions:

List of users that are:
-Online inside Guild
-Offline inside Guild
-All inside Guild

This is pretty useless inside a big Guild, so there should be more functions. I'm at the moment not sure which.

"permission denied" at install

I'm a rather happy discord-cli user on Arch Linux, but : On a Xubuntu box, when trying to install as per the README I get:

$ go get -u github.com/Rivalo/discord-cli
package github.com/Rivalo/discord-cli: mkdir /usr/share/go/src/github.com: permission denied

golang-go is installed, $GOPATH is set for that user. Obviously I'm missing some something, maybe you can please gimme a light?

Cannot connect to channel

(GU) Conversion Error: strconv.ParseInt: parsing "": invalid syntax
Select a Guild:
[0] UnderDogs
[b] Extra Options
0
Select a Channel:
[b] Go Back

(CH) Conversion Error: strconv.ParseInt: parsing "": invalid syntax
Select a Channel:
[b] Go Back

I can select the Guild, no problem. I cannot select the channels. I have tried copying and pasting parts of the URL into the terminal, with no change. Running on Debian.

Can't install - what do I do with ./discord-cli?

I've got to the last step in your installation instructzioons, (after much cursing! I haven't encountered Go before and don't understand it!), but I don't uunderstand what you nmean by saying "./discord-cli". What do I do with it? I have ended up with a directory by that name, located in /home/ab/.go/src/github.com/Rivalo, but there isn't anything obviously runnable in it.
Would appreciate help as the program itself looks just waht I want!
Thanks very much.

How to mention a user

If I type @user name or @"user name" the user is not mentioned. How can I correctly mention a user?

Parse Embeds

Splitted Issue from #7

Embeds return nothing. The url should be returned.

[General Architectural Ideas]

  • It might be cool to have a server daemon that receives all Discord messages, parses them and sends them to multiple attached clients. This way it would be possible to have multiple Discord Channels open and it would still be lightweight.
  • When working with external C Libraries, and going to a Daemon-Window structure it wouldn't be too far-fetched to just write the client in C since it only handles input/output to the terminal.

Consant Unknown events

I keep getting messages with something like:

Unknown event.
Event. Type: Event, State: number Operation: 0 Direction: 0
{
"user_id": "",
"message_id": "",
"emoji": {
"name": ",
"id": ""
},
"channel_id": ""
}

It happens constantly

Error when server is deleted

I got this error when the current server was deleted:

> Unknown event.
Event. Type: RELATIONSHIP_ADD, State: 5230 Operation: 0 Direction: 0
{
        "user": {
                "username": "REDACTED_USER",
                "id": "REDACTED_ID",
                "discriminator": "2815",
                "avatar": "REDACTED_ID"
        },
        "type": 3,
        "id": "REDACTED_ID"
}
Unknown event.
Event. Type: RELATIONSHIP_ADD, State: 386 Operation: 0 Direction: 0
{
        "user": {
                "username": "REDACTED_USER",
                "id": "REDACTED_ID",
                "discriminator": "2815",
                "avatar": "REDACTED_ID"
        },
        "type": 1,
        "id": "REDACTED_ID"
}
> 

Complete printing overhaul

Needed for #11 functionality,

Editing or deleting already printed messages is quite a problem. This needs a complete overhaul for the way the client is shown. This should either be a a library like termbox-go, or the creation of a very minimal textual interface library.

Problem while setting up config.json. "email": ["Not a well formed email address."]

Hi,
First off thanks for the resource, I believe this package may be outdated but it would be nice to keep on developing it, although I also believe discord may be reluctant on letting people use a CLI API so to circumvent their clickbait and content select traps on their own applications.
Anyways if any of you still using it , Im trying to first connect with it and After I get an error .

Unable to fetch discord authentication token. HTTP 400 Bad Request, {"email": ["Not a well formed email address."]}

I've setted the config.json accordingly such as

{"username":"Myuser","password":"Mypass","messagedefault":true,"messages":10,"email":"[email protected]"}

Anyone has any clue?

Thanks

Retrieve last [int] messages inside channel.

A great feature of Discord is that it saves old messages. Starting discord-cli will only show all new messages after starting.

  • Add :-function that receives the last n messages.
  • Default parameter inside config

captcha-required

After installation I stored my correct login files in the config.json. If I run ./discord-cli it says:

Unable to fetch discord authentication token. HTTP 400 Bad Request, {"captcha_key": ["captcha-required"]}

Display last [n] messages not working

After I connect to a channel, I type :m 2 and press return. This is the output:

Welcome, shrx!

Guild: myguild, Channel: mychannel
Printing last 2 messages!
> 

So, no old messages are displayed. I have the latest 0.3.0-develop version.

Fix printing of own messages

Currently the CLI prints your own message two times:

hi
2016/02/15 00:12:54 > Rivalo > hi

This is bad.

Especially when it are lots of them, and containing lots of text.

I can't find a way to handle this using the https://github.com/chzyer/readline library so this is a painpoint. Currently it not very easy to keep your input line at the bottom in Go without incoming logs tearing your scanf() apart. The readline library completely fixes this without adding any necessary ncurses bindings or necessary layout boxes that keep needing coordinates.

I want the CLI to be lightweight and minimal, just printing lines is the way to go I think.

Unable to unmarshal event data

First problem: It would be fine if it just printed this, but then it prints a whole bunch of json, making the program impossible to use.
I fixed it by commenting out line 241 in ~/go/src/github.com/Rivalo/discordgo_cli/discord.go.
I then found that, on trying to join a channel:

*Starting Session... PASSED!
Select a Guild:
[0] Distance
[1] Ozzyinspace
[2] Toast Airways
[3] TheReadPanda
[4] /r/incremental_games
[5] My Colony
[6] Blacksilver & Co
[7] Solving Stratzenblitz
[8] Kerbal Capitalism Program
[b] Extra Options
Unable to unmarshal event data.
8
Select a Channel:
[b] Go Back
1
(CH) Error: ID is out of bound

There are no options.
Periodically, it will print again Unable to unmarshal event data.

Is it possible that I'm missing a library? If so, which one, and how do I get it?

It's not a problem with the computer it's running on; there's a bot running on it. I tried killing the bot to check if they were conflicting, no dice.

Some more things:

  • Marshall is spelled Marshall, not marshal.
  • The line I commented out earlier should print to stderr so we can suppress it with a bash redirect.

Image parsing.

I have no complete idea about how it should be done. I will first look into libraries that print full images and their terminal support, AAlib that just prints ASCII art could also be an option.

Parse all the messages.

Stuff that is completely horrible and should be fixed:

  • @mentions return <@id>
  • Multi-line comments look bad => Make them single-line
  • Embeds return nothing => Display URL
  • Codetags also return id gibberish, I have currently no idea how to display this properly.

Add Username->Role map

Currently the *Member struct only returns a string of the Role ID.
Which needs a ridiculous amount of API calls and iteration before finally getting the correct *Role struct.
Let's do that in DiscordState beforehand.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.