Skip to content
This repository has been archived by the owner on Dec 16, 2021. It is now read-only.

Dm A Specific Person #159

Closed
NepXDNep opened this issue Oct 5, 2019 · 10 comments
Closed

Dm A Specific Person #159

NepXDNep opened this issue Oct 5, 2019 · 10 comments
Assignees
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest

Comments

@NepXDNep
Copy link

NepXDNep commented Oct 5, 2019

Title says it all, would like to have this feature

@Bios-Marcel Bios-Marcel added the enhancement New feature or request label Oct 5, 2019
@Bios-Marcel
Copy link
Owner

Bios-Marcel commented Oct 11, 2019

This could be done via a new command. I currently have no better idea.

Examples:

dm Marcel#7299
dm 264748158972723201

Since we can't search users, as discordgo doesn't support the endpoint and I haven't been able to figure it out myself yet, this will always work by User ID, but not by Username if the user is not in your cache :/

If a chat is already open, that can simply be reused, otherwise discordgo.UserChannelCreate needs to be invoked.

@Russia9
Copy link

Russia9 commented Nov 25, 2019

Hey. I'm doing it now, please assign me

@Russia9
Copy link

Russia9 commented Dec 6, 2019

Help Wanted:
When using cmd.session.UserChannelCreate (userID) twice, this function returns an empty channel.
Except for this issue, everything is ready.

@Bios-Marcel
Copy link
Owner

You aren't supposed to create one if it already exists. The discord client just calls Session#UserChannels first. I just checked that.

@Russia9
Copy link

Russia9 commented Dec 7, 2019

When I create a channel using cmd.session.UserChannelCreate (userID), it is not recorded in Session#UserChannels. How can I do that?

@Bios-Marcel
Copy link
Owner

Are you testing with a bot account?

@Russia9
Copy link

Russia9 commented Dec 7, 2019

No, with my main

@Bios-Marcel
Copy link
Owner

I checked out your branch and it works for me 🤷‍♂️ So I don't know what the problem could be

@Russia9
Copy link

Russia9 commented Dec 14, 2019

Hi. Sorry for not responding for a long time. If I try now to enter the dm USER#ID command twice in my branch, after the second time there will be an empty dialog.

@Bios-Marcel
Copy link
Owner

I finally managed to properly add this without bugs I think :D

I updated the API for it to V8:

6927e36

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
enhancement New feature or request good first issue Good for newcomers hacktoberfest
Projects
None yet
Development

No branches or pull requests

3 participants