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

Make bot switch channel? #54

Open
lolcatw opened this issue Sep 2, 2022 · 5 comments
Open

Make bot switch channel? #54

lolcatw opened this issue Sep 2, 2022 · 5 comments

Comments

@lolcatw
Copy link

lolcatw commented Sep 2, 2022

Hello!
Is there a way currently to switch to another channel?
Thank you!

@lolcatw
Copy link
Author

lolcatw commented Sep 2, 2022

To anyone reading this, this is how I fixed things on my end:

function switchChannel(id){
	
	// switch channel
	// i couldnt figure out how to use native switchChannel lol
	client.connection.writeProto(
		"UserState",
		{
			session: client.user.session,
			actor: client.user.session,
			channelId: id
		}
	);
}

@Gielert
Copy link
Owner

Gielert commented Sep 2, 2022

Hmm, there is a client.switchChannel function (see here) which accepts a channel id. Doesn't that work?

@lolcatw
Copy link
Author

lolcatw commented Sep 2, 2022

im getting "client.switchChannel is not a function." writeProto works on the exact same object!

as arguments, im simply giving it an ID to switch to!

@Gielert
Copy link
Owner

Gielert commented Sep 2, 2022

What version did you install? switchChannel has been implemented since 1.4.0

@lolcatw
Copy link
Author

lolcatw commented Sep 2, 2022

What version did you install? switchChannel has been implemented since 1.4.0

woops, i see that I'm using [email protected]! I see what's happening here. Since your package has a vulnerability, I went ahead and did npm audit fix --force, which downgraded noodle.js to 1.3.0!

Many thanks for your time, I will see if I can contribute later.

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