Methods - Users

createDMChannel
Create a DM Channel manually with the given user.
client.createDMChannel( userID [, callback] );
  • userID: A user ID to create the channel with.
  • callback
    • error
    • response

editNickname
Changes (or assigns) a nickname for a user within a server.
client.editNickname( {opts} [, callback] );
  • opts
    • serverID: The server's ID.
    • userID: The user's ID.
    • nick: The nickname to have shown.
  • callback
    • error
    • response

addToRole
Adds the role to the user.
client.addToRole( {opts} [, callback] );
  • opts
    • serverID: The server's ID.
    • userID: The user's ID.
    • roleID: The role's ID.
  • callback
    • error
    • response

removeFromRole
Removes the role from the user.
client.removeFromRole( {opts} [, callback] );
  • opts
    • serverID: The server's ID.
    • userID: The user's ID.
    • roleID: The role's ID.
  • callback
    • error
    • response

moveUserTo
Move the given user to another voice channel.
client.moveUserTo( {opts} [, callback] );
  • opts
    • serverID: The server's ID.
    • userID: The user's ID.
    • channelID: The voice channel's ID.
  • callback
    • error

kick
Kick the target user from the server.
client.kick( {opts} [, callback] );
  • opts
    • serverID: The server's ID.
    • userID: The user's ID.
  • callback
    • error

ban
Ban the target user from the server.
client.ban( {opts} [, callback] );
  • opts
    • serverID: The server's ID.
    • userID: The user's ID.
    • lastDays: A number that can be 1 or 7, it's optional.
  • callback
    • error

unban
Unban the target user from the server.
client.unban( {opts} [, callback] );
  • opts
    • serverID: The server's ID.
    • userID: The user's ID.
  • callback
    • error

mute
Mute the target user from speaking on the server.
client.mute( {opts} [, callback] );
  • opts
    • serverID: The server's ID.
    • userID: The user's ID.
  • callback
    • error

unmute
Unmute the target user on the server.
client.unmute( {opts} [, callback] );
  • opts
    • serverID: The server's ID.
    • userID: The user's ID.
  • callback
    • error

deafen
Deafen the target user on the server.
client.deafen( {opts} [, callback] );
  • opts
    • serverID: The server's ID.
    • userID: The user's ID.
  • callback
    • error

undeafen
Undeafen the target user on the server.
client.undeafen( {opts} [, callback] );
  • opts
    • serverID: The server's ID.
    • userID: The user's ID.
  • callback
    • error

results matching ""

    No results matching ""