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

SlackTaskClient is getting method_deprecated errors several API's #272

Open
ramonsmits opened this issue Mar 24, 2021 · 4 comments · May be fixed by #274
Open

SlackTaskClient is getting method_deprecated errors several API's #272

ramonsmits opened this issue Mar 24, 2021 · 4 comments · May be fixed by #274

Comments

@ramonsmits
Copy link

SlackTaskClient is getting method_deprecated errors several API's

  • GetDirectMessageListAsync
  • GetChannelListAsync

As I want to use the Task based client I'm not sure how to resolve these issues.

@ifonya105
Copy link

SlackTaskClient is getting method_deprecated errors several API's

  • GetDirectMessageListAsync
  • GetChannelListAsync

As I want to use the Task based client I'm not sure how to resolve these issues.

@ramonsmits try now from the latest, it should be fixed.

@ramonsmits
Copy link
Author

@ifonya105 Just tested GetDirectMessageListAsync and it still returns the same message.

Maybe the SlackTaskClient hasn't been updated yet?

@ramonsmits
Copy link
Author

Tested is with SlackClient which gives me the same result:

var client = new SlackTaskClient(Token);
var channels = await client.GetDirectMessageListAsync();

@ramonsmits
Copy link
Author

Ok, so GetDirectMessageListAsync should be removed I guess.

I got it to work by doing the following:

var client = new SlackTaskClient(Token);
var users = await client.GetUserListAsync();
var user = users.members.Single(x => x.name.Equals(name));

var response = await client.JoinDirectMessageChannelAsync(user.id);
channelId = response.channel.id;

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

Successfully merging a pull request may close this issue.

2 participants