Methods - Servers

createServer
Create's a server/guild.
client.createServer( {opts} [, callback] );
  • opts
    • icon: A base64 string of the image you want to use, or null.
    • name: The name of the server.
    • region: The region for voice channels.
      • brazil, frankfurt, amsterdam, london, singapore, us-east, us-central, us-south, us-west, sydney.
  • callback
    • error
    • response

editServer
Edits a server.
client.editServer( {opts} [, callback] );
  • opts
    • serverID: The server's ID that you want to edit.
    • name: The server's name.
    • icon: A base64 string of the image you want to use, or null.
    • region: The region for voice channels, same as createServer's.
    • afk_channel_id: The Snowflake string for a voice channel, or null. Moves a user to this voice channel after the timeout.
    • afk_timeout: Time in seconds before the idle user in a voice channel is moved to the channel matching the afk_channel_id, a number or null.
      • 60, 300, 900, 1800, 3600.
  • callback
    • error
    • response

leaveServer
Leaves a server.
client.leaveServer( serverID [, callback] );
  • serverID: The ID of the server to leave.
  • callback
    • error
    • response

deleteServer
Deletes a server.
client.deleteServer( serverID [, callback] );
  • serverID: The ID of the server to delete.
  • callback
    • error
    • response

transferOwnership
Transfers ownership of the given server to another account.
client.transferOwnership( {opts} [, callback] );
  • opts
    • serverID: The ID of the server to transfer.
    • userID: The ID of the user to transfer the server to.
  • callback
    • error
    • response

acceptInvite
Accepts an invite code. This may not be used with a bot account.
client.acceptInvite( inviteCode [, callback] );
  • inviteCode: Discord client invite code.
  • callback
    • error
    • response

createInvite
Creates an invite code.
client.createInvite( {opts} [, callback] );
  • opts
    • channelID: The channelID or the serverID.
    • max_users: Amount of uses the invite has before it expires. Use 0, the default option, to allow unlimited uses.
    • max_age: The amount of time in seconds before the invite expires. Use 0, the default option, for an invite that doesn't expire.
    • temporary: When set to true, the invitee will be kicked from the server when they disconnect. The default option is false.
  • callback
    • error
    • response

deleteInvite
Cause an invite code to instantly expire.
client.deleteInvite( inviteCode [, callback] );
  • inviteCode: Discord client invite code.
  • callback
    • error
    • response

queryInvite
Receive information about an invite.
client.queryInvite( inviteCode [, callback] );
  • inviteCode: Discord client invite code.
  • callback
    • error
    • response
      • id: id of the server / channel
      • name: name of the server / channel
      • type: text / voice
createRole
Create a new role in the given server.
client.createRole( serverID [,callback] );
  • serverID: ID of the server
  • callback:
    • error
    • response
editRole
Edit a role's information.
client.editRole( {opts} [,callback] );
  • opts

    • serverID: The ID of the server housing the role.
    • roleID: The ID of the role that needs to be edited.
    • name: The role's name.
    • color: A color value as a number. Recommend using Hex numbers, as they can map to HTML colors (0xF35353 === #F35353).
    • hoist: If true, the users in this group are displayed above normal online users.
    • permissions: An Object containing permission mappings for this role. Check the Permission Docs.
    • mentionable: If true, this role is allowed to be mentioned.
  • callback

    • error
    • response

results matching ""

    No results matching ""