Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/DasWolke/CloudStorm
/ functions
Functions
67 in github.com/DasWolke/CloudStorm
⨍
Functions
67
◇
Types & classes
10
↓ 7 callers
Method
_write
* Method to raw write messages to the server. * @since 0.4.1 * @param packet Buffer containing the message to send. * @param opcode WebSocket sp
src/BetterWs.ts:269
↓ 7 callers
Method
resume
* Send an OP 6 RESUME to the gateway. * @since 0.1.4
src/DiscordConnector.ts:308
↓ 7 callers
Method
sendMessage
* Sends a message to the server in the format of { op: number, d: any } (before any encoding/compression). * @since 0.12.0 * @param data Packet to
src/DiscordConnector.ts:447
↓ 6 callers
Method
_reconnect
* Reset this connector to be ready to resume or hard reconnect, then connect. * @since 0.3.0 * @param resume Whether or not the client intends to
src/DiscordConnector.ts:215
↓ 4 callers
Method
clearHeartBeat
* Clear the heart beat interval, set it to null and set the cached heartbeat_interval as 0. * @since 0.3.0
src/DiscordConnector.ts:261
↓ 3 callers
Method
close
* Disconnects from the server. * This can only be called when connected (returns a promise) or half-close (returns the same promise) * @since 0.1.
src/BetterWs.ts:258
↓ 3 callers
Method
connect
* Create a new connection to Discord. * @since 0.1.4
src/Shard.ts:51
↓ 3 callers
Method
heartbeat
* Send an OP 1 HEARTBEAT to the gateway. * @since 0.1.4
src/DiscordConnector.ts:328
↓ 2 callers
Method
_checkPresenceData
* Checks presence data and fills in missing elements. * @since 0.1.4 * @param data Data to send. * @returns Data after it's fixed/checked.
src/DiscordConnector.ts:482
↓ 2 callers
Function
loop
()
src/BetterWs.ts:442
↓ 2 callers
Function
readETF
(data: Buffer, start: number)
src/BetterWs.ts:439
↓ 2 callers
Function
readRange
(socket: Socket, index: number, bytes: number)
src/BetterWs.ts:416
↓ 1 callers
Method
_addListener
* Add event listeners to a shard to that the manager can act on received events. * @since 0.1.4 * @param shard Shard to add the event listeners to
src/ShardManager.ts:63
↓ 1 callers
Method
_checkDisconnect
* Checks if all shards spawned by this manager are disconnected. * @since 0.1.4
src/ShardManager.ts:105
↓ 1 callers
Method
_checkReady
* Checks if all shards spawned by this manager are ready. * @since 0.1.4
src/ShardManager.ts:92
↓ 1 callers
Method
_checkRequestGuildMembersData
* Checks request guild members data and fills in missing elements. * @since 0.1.4 * @param data Data to send. * @returns Data after it's fixed/c
src/DiscordConnector.ts:521
↓ 1 callers
Method
_checkVoiceStateUpdateData
* Checks voice state update data and fills in missing elements. * @since 0.1.4 * @param data Data to send. * @returns Data after it's fixed/chec
src/DiscordConnector.ts:508
↓ 1 callers
Method
_processFrame
* Transforms/reads raw messages from the server and emits the appropriate event. * @since 0.4.1 * @param opcode WebSocket spec op code. * @param
src/BetterWs.ts:326
↓ 1 callers
Method
_updateEndpoint
* Update the endpoint shard websockets will connect to. * @since 0.1.4 * @param gatewayUrl Base gateway wss url to update the cached endpoint to.
src/Client.ts:215
↓ 1 callers
Method
connect
* Connect to Discord. * @since 0.1.4
src/DiscordConnector.ts:133
↓ 1 callers
Function
createReq
(address: string, options: BetterWs["options"])
src/BetterWs.ts:394
↓ 1 callers
Function
eventSwitch
* Call with an emitter and an object of callbacks, and the first event to be emitted will call the callback. * If the callback returns a promise, wai
src/eventSwitch.ts:8
↓ 1 callers
Method
fetchConnectInfo
* Method to grab initial connection info from Discord. * Should only be called automatically by the lib unless you are a large bot with a max_concur
src/Client.ts:78
↓ 1 callers
Method
getGatewayBot
* Get the GatewayData including recommended amount of shards and other helpful info. * @since 0.1.4 * @returns Object with url and shards to use t
src/Client.ts:107
↓ 1 callers
Method
handleDispatch
* Handle dispatch events. * @since 0.1.4 * @param message Message received from the websocket.
src/DiscordConnector.ts:348
↓ 1 callers
Method
handleWsClose
* Handle a close from the underlying websocket. * @since 0.1.4 * @param code Websocket close code. * @param reason Close reason if any.
src/DiscordConnector.ts:385
↓ 1 callers
Method
identify
* Send an OP 2 IDENTIFY to the gateway. * @since 0.1.4
src/DiscordConnector.ts:275
↓ 1 callers
Method
messageAction
* Called with a parsed Websocket message to execute further actions. * @since 0.1.4 * @param message Message that was received.
src/DiscordConnector.ts:160
↓ 1 callers
Method
presenceUpdate
* Update the status of all currently connected shards which have been spawned by this manager. * @since 0.3.0 * @param data Data to send.
src/ShardManager.ts:119
↓ 1 callers
Method
reset
* Hard reset this connector. * @since 0.1.4
src/DiscordConnector.ts:236
↓ 1 callers
Method
setHeartBeat
* Sets the this.heartbeatTimeout Interval. * @since 0.8.5
src/DiscordConnector.ts:248
↓ 1 callers
Method
shardPresenceUpdate
* Update the status of a single connected shard which has been spawned by this manager. * @since 0.3.0 * @param shardId id of the shard. * @para
src/ShardManager.ts:134
↓ 1 callers
Method
spawn
* Create shard instances and add them to the connection queue. * @since 0.1.4
src/ShardManager.ts:38
↓ 1 callers
Function
startup
()
examples/basic/index.js:8
↓ 1 callers
Function
startup
()
examples/amqp/index.js:23
↓ 1 callers
Function
writeETF
(data: any)
src/BetterWs.ts:560
Method
_onReadable
* Handler for when there is data in the socket's Buffer to read. * @since 0.3.1
src/BetterWs.ts:300
Method
connect
* Create one or more connections (depending on the selected amount of shards) to the Discord gateway. * @since 0.1.4 * @returns This function retu
src/Client.ts:65
Method
connect
* Connects to the server. * @since 0.5.0
src/BetterWs.ts:233
Method
constructor
* Create a new Client to connect to the Discord gateway. * @param token Token received from creating a discord bot user, which will be used to conne
src/Client.ts:37
Method
constructor
* Creates a new lightweight WebSocket. * @param address The http(s):// or ws(s):// URL corresponding to the server to connect to. * @param options
src/BetterWs.ts:59
Method
constructor
* Creates a new Discord Connector. * @param id id of the shard that created this class. * @param client Main client instance.
src/DiscordConnector.ts:101
Method
constructor
* Create a new ShardManager.
src/ShardManager.ts:30
Method
constructor
* Create a new Shard. * @param id id of the shard. * @param client Main class used for forwarding events.
src/Shard.ts:27
Method
disconnect
* Disconnect the bot gracefully, * you will receive a 'disconnected' event once the ShardManager successfully closes all shard websocket connections
src/Client.ts:116
Method
disconnect
* Close the websocket connection and disconnect. * @since 0.1.4
src/DiscordConnector.ts:144
Method
disconnect
* Disconnect all shards facilitated by this manager. * @since 0.1.4
src/ShardManager.ts:52
Method
disconnect
* Close the current connection to Discord. * @since 0.1.4
src/Shard.ts:59
Method
fn
()
src/DiscordConnector.ts:451
Method
getGateway
* Get the gateway endpoint to connect to. * @since 0.1.4 * @returns String url with the Gateway Endpoint to connect to.
src/Client.ts:97
Function
l
(...args: Array<any>)
src/eventSwitch.ts:13
Method
latency
* Time in ms it took for Discord to acknowledge an OP 1 HEARTBEAT. * @since 0.3.0
src/Shard.ts:43
Method
presenceUpdate
* Send an OP 3 PRESENCE_UPDATE to Discord, which updates the status of all shards facilitated by this client's ShardManager. * @since 0.3.0 * @ret
src/Client.ts:136
Method
presenceUpdate
* Send an OP 3 PRESENCE_UPDATE to the gateway. * @since 0.3.0 * @param data Presence data to send.
src/DiscordConnector.ts:418
Method
presenceUpdate
* Send an OP 3 PRESENCE_UPDATE to Discord. * @since 0.3.0 * @param data Data to send.
src/Shard.ts:68
Method
requestGuildMembers
* Send an OP 8 REQUEST_GUILD_MEMBERS to Discord. * @since 0.1.4 * @param shardId id of the shard that should send the payload. * @param data Req
src/Client.ts:205
Method
requestGuildMembers
* Send an OP 8 REQUEST_GUILD_MEMBERS to the gateway. * @since 0.1.4 * @param data Data to send.
src/DiscordConnector.ts:437
Method
requestGuildMembers
* Send an OP 8 REQUEST_GUILD_MEMBERS with a certain shard. * @since 0.1.4 * @param shardId id of the shard. * @param data Data to send.
src/ShardManager.ts:164
Method
requestGuildMembers
* Send an OP 8 REQUEST_GUILD_MEMBERS to Discord. * @since 0.1.4 * @param data Data to send.
src/Shard.ts:86
Function
resolve
(bit: IntentResolvable = 0)
src/Intents.ts:43
Method
sendMessage
* Sends a message to the server. * @since 0.1.4 * @param data What to send to the server. * @returns A Promise that resolves when the message pa
src/BetterWs.ts:243
Method
sendMsg
()
src/DiscordConnector.ts:450
Method
shardPresenceUpdate
* Send an OP 3 PRESENCE_UPDATE to Discord, which updates the status of a single shard facilitated by this client's ShardManager. * @since 0.11.0 *
src/Client.ts:158
Method
voiceStateUpdate
* Send an OP 4 VOICE_STATE_UPDATE to Discord. this does **not** allow you to send audio with CloudStorm itself, * it just provides the necessary dat
src/Client.ts:182
Method
voiceStateUpdate
* Send an OP 4 VOICE_STATE_UPDATE to the gateway. * @since 0.1.4 * @param data Voice state update data to send.
src/DiscordConnector.ts:427
Method
voiceStateUpdate
* Send an OP 4 VOICE_STATE_UPDATE with a certain shard. * @since 0.1.4 * @param shardId id of the shard. * @param data Data to send.
src/ShardManager.ts:149
Method
voiceStateUpdate
* Send an OP 4 VOICE_STATE_UPDATE to Discord. * @since 0.1.4 * @param data Data to send
src/Shard.ts:77