discord jda remove @everyone from channel 1

discord jda remove @everyone from channel

channel.createPermissionOverride(guild.getPublicRole())
	.setAllow(Permission.EMPTY_PERMISSIONS)
	.reason("Remove @everyone from the channel")
	.queue();

Here is what the above code is Doing:
1. We’re getting the channel object from the guild object.
2. We’re creating a permission override for the channel.
3. We’re setting the permission override to allow no permissions.
4. We’re setting the reason for the permission override.
5. We’re queueing the permission override.

Similar Posts