Client - satom99/litcord GitHub Wiki
Methods
run()
Starts an infinite loop that processes all created clients.
edit({...})
Requires an object containing any of the following attributes.
username
a string to be set as client's display nameor setName(name)
.avatar
a base64 stringor setAvatar(avatar)
.
setStatus({...})
Requires an object containing any of the following attributes.
game
an object containing aname
attributeor setGame(name)
idle
a boolean indicating whether the client is to be shown as awayor setIdle(bool)
createServer(name, region[, icon])
Creates a Guild and returns a Server
structure representing newly created guild.
name
a string representing new guild's name.region
a string representing desired voice region, usually obtained withgetRegions
.icon
a base64 string representing new guild's icon.
getRegions()
Returns an array containing valid guild voice regions.
acceptInvite(code)
Accepts a guild invite.
code
a string representing an invite's unique code.
Attributes
settings
An object containing client's settings.
shard
a guild sharding array.
user
An User
structure representing logged in client's user object.
users
A Cache
object containing loaded users stored as User
structures.
servers
A Cache
object containing guilds the client is in stored as Server
structures.
channels
A Cache
object containing channels stored as Channel
structures.
rest
A Rest
object.
socket
A Socket
object.