diff --git a/.github/workflows/docker.yml b/.github/workflows/docker.yml index 71a2519..7cae069 100644 --- a/.github/workflows/docker.yml +++ b/.github/workflows/docker.yml @@ -38,6 +38,3 @@ jobs: push: true tags: ${{ steps.meta.outputs.tags }} labels: ${{ steps.meta.outputs.labels }} - - - name: Deploy - run: curl -X POST ${{ secrets.WEBHOOK }} diff --git a/.gitignore b/.gitignore index c6bba59..954fff3 100644 --- a/.gitignore +++ b/.gitignore @@ -128,3 +128,6 @@ dist .yarn/build-state.yml .yarn/install-state.gz .pnp.* + +# Other +src/config.ts diff --git a/src/config.example.ts b/src/config.example.ts new file mode 100644 index 0000000..381382d --- /dev/null +++ b/src/config.example.ts @@ -0,0 +1,32 @@ +import { ColorResolvable } from "discord.js"; + +const embeds = { + default: "#0096FF" as ColorResolvable, + error: "#E74C3C" as ColorResolvable +} + +const emojis = { + connection_bad: "", + connection_excellent: "", + connection_good: "", + cross: "", + ping: "", + reply: "", + tick: "" +} + +const main = { + owner: "" +} + +export { + embeds, + emojis, + main +} + +export default { + embeds, + emojis, + main +} diff --git a/src/config.ts b/src/config.ts deleted file mode 100644 index 3e2d2f1..0000000 --- a/src/config.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { ColorResolvable } from "discord.js"; - -const embeds = { - default: "#0096FF" as ColorResolvable, - error: "#E74C3C" as ColorResolvable -} - -const emojis = { - connection_bad: "<:connection_bad:1149583879179612250>", - connection_excellent: "<:connection_excellent:1149583873538260992>", - connection_good: "<:connection_good:1149583875551539280>", - cross: "<:cross:1149583869956329492>", - ping: "", - reply: "<:reply:1149583863333519390>", - tick: "<:tick:1149583861416730695>" -} - -const main = { - prefix: "r!", - owner: "853158265466257448" -} - -export { - embeds, - emojis, - main -} - -export default { - embeds, - emojis, - main -} diff --git a/src/events/client/ready.ts b/src/events/client/ready.ts index 1f1af05..f5e6a11 100644 --- a/src/events/client/ready.ts +++ b/src/events/client/ready.ts @@ -2,7 +2,7 @@ import Event from "../../classes/Event"; import ExtendedClient from "../../classes/ExtendedClient"; import Discord from "discord.js"; - +import { exec } from "child_process"; import globalCommands from "../../scripts/global-commands"; import Reminder from "../../models/Reminder"; @@ -18,6 +18,17 @@ const event: Event = { // Register Commands await globalCommands(client); + // Automatic Git Pull + setInterval(() => { + exec("git pull", (err: any, stdout: any) => { + if(err) return console.log(err); + if(stdout.includes("Already up to date.")) return; + + console.log(stdout); + process.exit(); + }) + }, 30 * 1000) // 30 seconds + // Manage timeouts let reminders = await Reminder.find({});