Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot find token #105

Open
ghost opened this issue Jan 22, 2023 · 8 comments
Open

Cannot find token #105

ghost opened this issue Jan 22, 2023 · 8 comments

Comments

@ghost
Copy link

ghost commented Jan 22, 2023

I cannot find the Discord token.

The [find_token.py](https://github.com/terminal-discord/weechat-discord/blob/master/find_token.py) script is unable to find a token.

The website discordapp.com seems to redirect to discord.com.

When I connect to Discord through the web interface, there is no discordapp.com in the local storage, while the discord.com entry does not contain an entry called "token".

@Noskcaj19
Copy link
Member

Hi,

Discord changed their domain from discordapp.com to discord.com some time ago, but everything should work the same.

You probably can't see the token in localstorage because Discord tries to prevent you from getting it by deleting it as soon as the page loads. With a fast network connection or when using Firefox it's very difficult to grab the token before it gets deleted.

That method of getting the token wasn't very good anyway, so I rewrote the section with a different method that should be much more reliable and easy. (it's a few more steps though..)

As far as the find_token.py script goes, were you by chance logged-in in Firefox? The script didn't search Firefox logins, so that might have been why it didn't find anything.

If you were using Firefox, I just changed the script so that it should search Firefox for tokens and made it search a little better. If it still doesn't work, let me know.

Thanks

@ghost
Copy link
Author

ghost commented Jan 22, 2023

Yes I'm using Firefox.

I'm logged in in Firefox.

Even the new find_token.py returns "No Discord tokens found".

Other than that, may i suggest a shebang in that file?

Will try with the new README instructions.

@Noskcaj19
Copy link
Member

Interesting that it doesn't work... do you know where your profile is? If the profile is outside of the home directory, the script won't find it.

I've added a shebang, thanks for the suggestion.

@ghost
Copy link
Author

ghost commented Jan 22, 2023

My Firefox profile is under /home/[USERNAME]/.mozilla/firefox/[STRING].default.

I got the token with the README instructions (should specify that the "browser" is firefox?).

I tried AUR's weechat-discord-git but I can't connect.

Now I'm trying AUR's weechat-discord-mk3-git.

@ghost
Copy link
Author

ghost commented Jan 22, 2023

The mk3 branch allowed me to reach a "discord: ready as: [MY_USERNAME]" message.

I'm not sure what I have to do next.

I think i need to add a server with "/discord server add [NAME]"?

But where do I find the name of the server (a.k.a. guild)?

It looks like the "textual" name of the server doesn't work, as it doesn't work the code in the URL.

@Noskcaj19
Copy link
Member

Tab complete is the intended way of getting the server name, the server name form for the command is the textual server name with spaces as underscores and some symbols removed (to deal with weechat command parsing) (source here)

mk3 is very unpolished, and master has bitrot a lot, I'm trying to see if master will be simple to fix.

@ghost
Copy link
Author

ghost commented Jan 22, 2023

I'm in!

I used tab complete to add the server, and then used it again to add a channel.

Using the mk3 branch.

Thank!

I'm so happy right now.

I can use a single application to manage all my chats without going through their proprietary stuff 😄

@ghost
Copy link
Author

ghost commented Jan 27, 2023

@Noskcaj19 So how do I reconnect when weechat starts?

It looks like it doesn't connect to discord automatically, and /discord connect has no effect.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant