How can I hide specific channels from all members (update)? [duplicate] - discord

This question already has an answer here:
How to create a private channel in a Discord server (not a user/bot DM) using JDA: Java Discord API
(1 answer)
Closed 2 years ago.
I want to hide a channel from #everyone and later on grant permissions to some specific members, which can then access to the channel.
How can I add that permissions/rules to a channel?

Problem was solved by updating the JDA, which brought some new features:
*VOICECHANNEL*.createPermissionOverride(voiceChannel.getGuild().getPublicRole()).setDeny(Permission.VIEW_CHANNEL).queue();
voiceChannel.getGuild().getPublicRole() gets the #everyone role
.setDeny can be replaced with .setAllow

Related

How can I create a new user in Firebase without sign in automatically? [duplicate]

This question already has answers here:
Firebase create user without sign in [duplicate]
(1 answer)
Firebase kicks out current user
(19 answers)
Closed last month.
Using React js and Firebase.
I am new to firebase and generally programming. In a new project, a admin user should be able to create new users centrally.
createUserWithEmailAndPassword(auth, email, password1)
By using this method, I am able to create new users. Nevertheless, I get logged in in this new users automatically. Is there any solution to avoid the automatic log in?
I already found some stack overflow questions from 2016 and 2018 and the common question is, that I need to run the Firebase Admin SDK on a server. Is this the only solution?
I would prefer to practice a little bit more my new ReactJS and Firebase knowledge before starting with these server side topics.

Is it possible to detect users click emoji on specific channel for specific server?

I think I need some answer from discord api experts.
I'm wondering if someone can detect using bots below logics.
If we enter the server, we will have initial channel. (for example Welcome)
There some rules will be described and we will have emojis like check / symbols for the server.
And after user click, bot can detect the user id and can send direct message to him/her.
Is it possible for the outside guy of the server? (I mean without any discord related api key)
Thanks
Since I don't have exp with this just went through the discord docs, but didn't find proper resources.

Is it safe to use uid to store data in firebase database? [duplicate]

This question already has answers here:
Is auth.uid a shared secret?
(2 answers)
Firebase security rules - is Auth generated UID ought to be kept secret? [duplicate]
(1 answer)
Firebase Database - Risks associated with exposing uid on the client side?
(1 answer)
can i login into a user's account if I just know UID in firebase [duplicate]
(2 answers)
Closed 9 months ago.
I plan on creating an application on flutter that uses firebase auth and cloud firestore. My plan is to create a user and the use the user's uid(iser id) to store and modify data in the database. So a specific id refers to a specific user.
I wanted to know if it is safe to directly save the user id in the flutter app after the user login because if someone were to somehow get access to the user id they would have access to their data in the database.
Would advise to use your custom ID along side with UID. When your app grows, you don't want to be sharing the UID or passing it around. Also while setting firebase rules, you'll be referring to UIDs, which should be kept private.
generate a random string for the ID.
And for sensitive user data, set a rule in firestore, to only allow reading of the document if request.auth.uid == user.uid. This will prevent unwanted access. Read up a bit more on firestore rules, might be relevant for your use case.

How to add fields to Firebase Auth? [duplicate]

This question already has answers here:
Adding new data to firebase users
(2 answers)
Adding Custom Attributes to Firebase Auth
(2 answers)
Firebase: setting additional user properties
(2 answers)
Closed 1 year ago.
I am totally new to Firebase (typically use sql), but I need to do a few things ---
I have a register page with 2 fields name, password, and it is just using that auth feature in firebase
I need to add company name to that, as well as a couple of other custom fields. How do I do this?
Take a look at this picture to see the way it is set up in the auth feature in firebase:
How would I add those fields in there for when I create the user, and then also use them programatically?
Sorry Firebase Auth do not support that yet as adding custom fields to The Console .. But I also solved this issue by using Database (Cloud Firestore or Realtime Database) as I can add custom fileds linked to the user using his UID as I create Collection 'users' when user signup I create document to the user with his UID then store this fileds (e.g fileds you mentioned) .. So this is the best way to do that as Firebase Auth do not support that yet
Wish I helped you :)

Remember comments information with cookies angular [duplicate]

This question already has answers here:
How to access cookies in AngularJS?
(9 answers)
Closed 5 years ago.
My Review book doesn't have login. When a user submits comment form (name, surname, email, review), I want to use cookies so that when he goes to All reviews list, he would be able to edit/delete it's posts without login. Is that possible?
Of course. That is what $cookies is for.
For a complete example check out: https://stackoverflow.com/a/10985815/5739073

Resources