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

Getting error with GuzzleHttp getting Channel #176

Open
ChrisYatesUK opened this issue Jan 23, 2022 · 2 comments
Open

Getting error with GuzzleHttp getting Channel #176

ChrisYatesUK opened this issue Jan 23, 2022 · 2 comments

Comments

@ChrisYatesUK
Copy link

Only just installed composer and started using this so may be something stupid that I'm doing wrong..
$bountyecon is the channel ID
When trying to call $discord->channel->getChannel($bountyecon);
I'm getting :
Fatal error: Uncaught TypeError: Argument 2 passed to GuzzleHttp\Command\Guzzle\GuzzleClient::getCommand()

@thorerik
Copy link

Can you provide a minimal example that shows the issue, you have provided no context past the single function call, which works for me.

@ChrisYatesUK
Copy link
Author

ChrisYatesUK commented Jan 30, 2022

After getting the token following oauth2 login I'm using
$token = $_SESSION['access_token'];
$discord = new DiscordClient(['token' => '$token','tokenType' => 'OAuth']);
var_dump($discord->channel->getChannelMessages(['channel.id' => 924525362489221180]));

Not had issues with APIs before but always had an issue using api's with oauth so I know I'm being stupid somewhere

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