mirror of
https://github.com/litruv/DAdmin.git
synced 2026-07-24 02:36:11 +10:00
starterpack v2
This commit is contained in:
@@ -7,7 +7,6 @@ const WebSocket = require('ws');
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
name: "Websockets Server (8080)",
|
name: "Websockets Server (8080)",
|
||||||
init: (dclient) => {
|
init: (dclient) => {
|
||||||
client = dclient
|
|
||||||
|
|
||||||
|
|
||||||
const server = https.createServer({
|
const server = https.createServer({
|
||||||
@@ -19,7 +18,28 @@ module.exports = {
|
|||||||
wss.on('connection', function connection(ws) {
|
wss.on('connection', function connection(ws) {
|
||||||
ws.on('message', function incoming(message) {
|
ws.on('message', function incoming(message) {
|
||||||
if (message == "name")
|
if (message == "name")
|
||||||
ws.send(JSON.stringify({ type: 'starterpack', user: dclient.user }))
|
ws.send(JSON.stringify(
|
||||||
|
{
|
||||||
|
type: 'starterpack',
|
||||||
|
user: {
|
||||||
|
avatar: dclient.avatar,
|
||||||
|
avatarURL: dclient.avatarURL,
|
||||||
|
bot: dclient.bot,
|
||||||
|
client: dclient.client,
|
||||||
|
createdAt: dclient.createdAt,
|
||||||
|
createdTimestamp: dclient.createdTimestamp,
|
||||||
|
defaultAvatarURL: dclient.defaultAvatarURL,
|
||||||
|
discriminator: dclient.discriminator,
|
||||||
|
displayAvatarURL: dclient.displayAvatarURL,
|
||||||
|
id: dclient.id,
|
||||||
|
lastMessage: dclient.lastMessage,
|
||||||
|
lastMessageID: dclient.lastMessageID,
|
||||||
|
presence: dclient.presence,
|
||||||
|
tag: dclient.tag,
|
||||||
|
username: dclient.username,
|
||||||
|
verified: dclient.verified
|
||||||
|
}
|
||||||
|
}))
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user