-
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add database upgrade, and break role sync
wip Fix sync user function Fix sync and unsync commands wip
- Loading branch information
Brandyn
committed
Feb 4, 2024
1 parent
04e03b5
commit fc02a75
Showing
15 changed files
with
435 additions
and
212 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,19 @@ | ||
{ | ||
// Use IntelliSense to learn about possible attributes. | ||
// Hover to view descriptions of existing attributes. | ||
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387 | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Launch Program", | ||
"skipFiles": [ | ||
"<node_internals>/**" | ||
], | ||
"program": "${workspaceFolder}/index.js" | ||
} | ||
] | ||
} | ||
"version": "0.2.0", | ||
"configurations": [ | ||
{ | ||
"type": "node", | ||
"request": "launch", | ||
"name": "Launch Program", | ||
"skipFiles": ["<node_internals>/**"], | ||
"program": "${workspaceFolder}/index.js" | ||
}, | ||
{ | ||
"type": "node-terminal", | ||
"name": "Run Script: start", | ||
"request": "launch", | ||
"command": "npm run start", | ||
"cwd": "${workspaceFolder}" | ||
} | ||
] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,25 @@ | ||
const web = require('./src/express') | ||
const web = require("./src/express"); | ||
const ts = require("./src/teamspeak"); | ||
const db = require("./src/database"); | ||
const discord = require("./src/discord"); | ||
const _ = require('lodash'); | ||
const teamspeakClientConnected = require('./src/actions/teamspeakClientConnected'); | ||
const synchroniseUser = require('./src/actions/synchronizeUser'); | ||
|
||
const _ = require("lodash"); | ||
const teamspeakClientConnected = require("./src/actions/teamspeakClientConnected"); | ||
const synchroniseUser = require("./src/actions/synchronizeUser"); | ||
|
||
// Initialize Connections to Servers | ||
async function initialize() { | ||
await ts.connect(); | ||
await discord.connect(); | ||
await db.initializeDatabase(); | ||
ts.client.on("clientconnect", async (e) => { | ||
await teamspeakClientConnected(e) | ||
}) | ||
await ts.connect(); | ||
await discord.connect(); | ||
await db.initializeDatabase(); | ||
|
||
ts.client.on("clientconnect", async (e) => { | ||
await teamspeakClientConnected(e); | ||
}); | ||
|
||
discord.client.on('guildMemberUpdate', member => { | ||
synchroniseUser(member.guild.members.cache.get(member.id)) | ||
}) | ||
discord.client.on("guildMemberUpdate", (member) => { | ||
console.log("Guild Member Update"); | ||
synchroniseUser(member.guild.members.cache.get(member.id)); | ||
}); | ||
} | ||
|
||
initialize(); | ||
initialize(); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.