How do I move a user to a specific channel on discord using the discord.py API
By : learning_in_progress
Date : March 29 2020, 07:55 AM
I hope this helps . client.move_member takes two arguments: a Member and a Channel. We can use discord.utils.find to get the channel from the servers list of channels. code :
channel = discord.utils.find(lambda x: x.name == 'afk', message.server.channels)
await client.move_member(message.author, channel)
|
Hierarchy issues when kicking | Discord.js
By : dolphus
Date : March 29 2020, 07:55 AM
will be helpful for those in need I cannot figure out how to fix this issue When using this code I get the error : , As I can see here: code :
var kUser = msg.mentions.users.first() || msg.guild.members.get(args[0]);
var kUser = msg.mentions.users.first() // Returns a User object
var kUser = msg.guild.members.get(args[0]) // Returns a Member object
var kUser = msg.mentions.members.first() || msg.guild.members.get(args[0]);
|
How do you have a Discord bot remove a user reaction to a message in discord.py?
By : user3535701
Date : March 29 2020, 07:55 AM
fixed the issue. Will look into that further You can use either Message.remove_reaction or Reaction.remove. A Reaction object represents a specific emoji reaction to a Message, so if the Reaction object you have is not for the emoji reaction that you want to remove, using Reaction.remove will attempt to remove the wrong emoji reaction.
|
How to create a private channel in a Discord server (not a user/bot DM) using JDA: Java Discord API
By : Tarakanadh
Date : March 29 2020, 07:55 AM
Does that help You can create a "private" channel by using permission overrides. For this you first need to create that channel using createTextChannel(name) which will return a ChannelAction. This interface allows you to do some additional configuration such as permission overrides (we need this). You need to deny the VIEW_CHANNEL permission for the public role @everyone and allow it for the specific role/member that you want to give access to. code :
public static void createTextChannel(Member member, String name) {
Guild guild = member.getGuild();
guild.createTextChannel(name)
.addPermissionOverride(member, EnumSet.of(Permission.VIEW_CHANNEL), null)
.addPermissionOverride(guild.getPublicRole(), null, EnumSet.of(Permission.VIEW_CHANNEL))
.queue(); // this actually sends the request to discord.
}
|
Kicking Discord Users Through Bot in CS
By : paul
Date : March 29 2020, 07:55 AM
seems to work fine This is the command I use to kick people, checking for the correct permissions etc. (Make sure the bot has kick permissions itself ofcourse)
|