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

When a user send a message I want to reply to the message and send a DM #22

Closed
nmolenaar opened this issue Jun 30, 2020 · 1 comment
Closed

Comments

@nmolenaar
Copy link

nmolenaar commented Jun 30, 2020

Hey guys,

Thank you for the library its been working greet so far.
Just wondering how would some one reply to a user message in a channel by DM?

req.user.getDMChannel(req.cache) match { case Some(channel) => client.requestsHelper.runMany( req.textChannel.sendMessage(s"Ill DM you @${req.user.username}"), channel.sendMessage("Sup") )(req.cache)

This works great if the user already has an DM window open with the bot but creating a new window for a DM is a tricky situation I cannot seem to solve.

@Katrix
Copy link
Owner

Katrix commented Jun 30, 2020

req.user.createDMChannel. Next time ask in the Discord first before opening an issue. Also, the cache is intended to be passed around implicitly.

@Katrix Katrix closed this as completed Jun 30, 2020
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

2 participants