-
-
Notifications
You must be signed in to change notification settings - Fork 35
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
a6f55e9
commit f5fd313
Showing
13 changed files
with
225 additions
and
122 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 |
---|---|---|
|
@@ -7,7 +7,9 @@ dist/ | |
built/ | ||
build/ | ||
|
||
src/config/auth-*.ts | ||
src/config/auth.ts | ||
src/config/config-*.ts | ||
|
||
.env | ||
|
||
|
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
import { winston } from "../dtel"; | ||
import CallClient from "../internals/callClient"; | ||
import DTelClient from "../internals/client"; | ||
|
||
export default async(client: DTelClient): Promise<void> => { | ||
winston.info("Received the all clear! Starting calls..."); | ||
|
||
// const allCalls = await client.db.activeCalls.findMany({ | ||
// include: { | ||
// to: { | ||
// include: { | ||
// guild: true, | ||
// }, | ||
// }, | ||
// from: { | ||
// include: { | ||
// guild: true, | ||
// }, | ||
// }, | ||
// }, | ||
// }); | ||
|
||
// for (const call of allCalls) { | ||
// const doc = await CallClient.byID(client, { | ||
// doc: call, | ||
// side: "to", | ||
// }); | ||
|
||
// client.calls.set(call.id, doc); | ||
// } | ||
|
||
if (process.env.SHARDS == "0") { | ||
require("../internals/jobs"); | ||
} | ||
}; |
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,41 +1,23 @@ | ||
import DTelClient from "../internals/client"; | ||
import Commands from "../config/commands"; | ||
import CallClient from "../internals/callClient"; | ||
import config from "../config/config"; | ||
|
||
export default async(client: DTelClient): Promise<void> => { | ||
client.winston.info(`Ready!`); | ||
client.winston.info(`Logged in as ${client.user!.tag}`); | ||
|
||
client.user!.setActivity({ | ||
name: `[${process.env.SHARDS}] Starting up...`, | ||
}); | ||
|
||
// client.application.commands.set(client.commands); | ||
if (process.env.SHARDS === "0") { | ||
client.application!.commands.set(Commands, "385862448747511812"); | ||
client.application!.commands.set(Commands, "398980667553349649"); | ||
|
||
require("../internals/jobs"); | ||
} | ||
|
||
const allCalls = await client.db.activeCalls.findMany({ | ||
include: { | ||
to: { | ||
include: { | ||
guild: true, | ||
}, | ||
}, | ||
from: { | ||
include: { | ||
guild: true, | ||
}, | ||
}, | ||
}, | ||
}); | ||
client.application!.commands.set(Commands); | ||
if (client.application.installParams) config.botInvite = client.generateInvite(client.application.installParams); | ||
|
||
for (const call of allCalls) { | ||
client.calls.set(call.id, await CallClient.byID(client, { | ||
doc: call, | ||
side: "to", | ||
})); | ||
// client.application!.commands.set(Commands, "385862448747511812"); | ||
// client.application!.commands.set(Commands, "398980667553349649"); | ||
} | ||
|
||
if (client.application.installParams) config.botInvite = client.generateInvite(client.application.installParams); | ||
client.shard!.send({ msg: "ready", shardID: Number(process.env.SHARDS) }); | ||
}; |
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.