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

Adding support for modmails #18

Closed
Creekie1337 opened this issue Jul 31, 2019 · 4 comments
Closed

Adding support for modmails #18

Creekie1337 opened this issue Jul 31, 2019 · 4 comments
Assignees

Comments

@Creekie1337
Copy link

Is your feature request related to a problem? Please describe.
I'd like to automate some flows within Modmails.

Describe the solution you'd like
The ability to get streams of modmails (The new modmail - not the old)

Describe alternatives you've considered
N/A

Additional context
https://not-an-aardvark.github.io/snoowrap/ModmailConversation.html

@brenapp
Copy link
Owner

brenapp commented Jul 31, 2019

This should be pretty quick to implement. If you want to take the lead, that would be fantastic! The most relevant decision you'll have to make is how to distinguish different modmail conversations (maybe compare the JSON object?)

I've set up the Poll class such that it's very very easy to extend and add new streams

@brenapp
Copy link
Owner

brenapp commented Jul 31, 2019

I've gone ahead and implemented a very basic version of ModMailStream (without any testing 😃) in snoowrap@1.1.2, see if you can stress test in for your purposes.

@Creekie1337
Copy link
Author

Hey there, I have updated to the latest version however I am getting the TypeError: ModMailStream is not a constructor error. After looking at your code, I believe you're using the old modmail.

You should be using something like this:
r.getNewModmailConversations({limit: 2}).then(console.log)

@brenapp brenapp self-assigned this Aug 4, 2019
@brenapp
Copy link
Owner

brenapp commented Aug 13, 2019

Upgraded snoowrap to the newest version to get new method. The new version should be working correctly, I've tested it successfully on my test servers, but I don't moderate any larger subreddits which would be better test grounds

@brenapp brenapp closed this as completed Sep 2, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants