Initial Commit
This commit is contained in:
3
.gitignore
vendored
Normal file
3
.gitignore
vendored
Normal file
@@ -0,0 +1,3 @@
|
|||||||
|
node_modules
|
||||||
|
.env
|
||||||
|
config.json
|
||||||
118
bun.lock
Normal file
118
bun.lock
Normal file
@@ -0,0 +1,118 @@
|
|||||||
|
{
|
||||||
|
"lockfileVersion": 1,
|
||||||
|
"workspaces": {
|
||||||
|
"": {
|
||||||
|
"name": "blitzcrank",
|
||||||
|
"dependencies": {
|
||||||
|
"@biomejs/biome": "^2.0.6",
|
||||||
|
"discord.js": "^14.21.0",
|
||||||
|
"sequelize": "^6.37.7",
|
||||||
|
},
|
||||||
|
},
|
||||||
|
},
|
||||||
|
"packages": {
|
||||||
|
"@biomejs/biome": ["@biomejs/biome@2.0.6", "", { "optionalDependencies": { "@biomejs/cli-darwin-arm64": "2.0.6", "@biomejs/cli-darwin-x64": "2.0.6", "@biomejs/cli-linux-arm64": "2.0.6", "@biomejs/cli-linux-arm64-musl": "2.0.6", "@biomejs/cli-linux-x64": "2.0.6", "@biomejs/cli-linux-x64-musl": "2.0.6", "@biomejs/cli-win32-arm64": "2.0.6", "@biomejs/cli-win32-x64": "2.0.6" }, "bin": { "biome": "bin/biome" } }, "sha512-RRP+9cdh5qwe2t0gORwXaa27oTOiQRQvrFf49x2PA1tnpsyU7FIHX4ZOFMtBC4QNtyWsN7Dqkf5EDbg4X+9iqA=="],
|
||||||
|
|
||||||
|
"@biomejs/cli-darwin-arm64": ["@biomejs/cli-darwin-arm64@2.0.6", "", { "os": "darwin", "cpu": "arm64" }, "sha512-AzdiNNjNzsE6LfqWyBvcL29uWoIuZUkndu+wwlXW13EKcBHbbKjNQEZIJKYDc6IL+p7bmWGx3v9ZtcRyIoIz5A=="],
|
||||||
|
|
||||||
|
"@biomejs/cli-darwin-x64": ["@biomejs/cli-darwin-x64@2.0.6", "", { "os": "darwin", "cpu": "x64" }, "sha512-wJjjP4E7bO4WJmiQaLnsdXMa516dbtC6542qeRkyJg0MqMXP0fvs4gdsHhZ7p9XWTAmGIjZHFKXdsjBvKGIJJQ=="],
|
||||||
|
|
||||||
|
"@biomejs/cli-linux-arm64": ["@biomejs/cli-linux-arm64@2.0.6", "", { "os": "linux", "cpu": "arm64" }, "sha512-ZSVf6TYo5rNMUHIW1tww+rs/krol7U5A1Is/yzWyHVZguuB0lBnIodqyFuwCNqG9aJGyk7xIMS8HG0qGUPz0SA=="],
|
||||||
|
|
||||||
|
"@biomejs/cli-linux-arm64-musl": ["@biomejs/cli-linux-arm64-musl@2.0.6", "", { "os": "linux", "cpu": "arm64" }, "sha512-CVPEMlin3bW49sBqLBg2x016Pws7eUXA27XYDFlEtponD0luYjg2zQaMJ2nOqlkKG9fqzzkamdYxHdMDc2gZFw=="],
|
||||||
|
|
||||||
|
"@biomejs/cli-linux-x64": ["@biomejs/cli-linux-x64@2.0.6", "", { "os": "linux", "cpu": "x64" }, "sha512-geM1MkHTV1Kh2Cs/Xzot9BOF3WBacihw6bkEmxkz4nSga8B9/hWy5BDiOG3gHDGIBa8WxT0nzsJs2f/hPqQIQw=="],
|
||||||
|
|
||||||
|
"@biomejs/cli-linux-x64-musl": ["@biomejs/cli-linux-x64-musl@2.0.6", "", { "os": "linux", "cpu": "x64" }, "sha512-mKHE/e954hR/hSnAcJSjkf4xGqZc/53Kh39HVW1EgO5iFi0JutTN07TSjEMg616julRtfSNJi0KNyxvc30Y4rQ=="],
|
||||||
|
|
||||||
|
"@biomejs/cli-win32-arm64": ["@biomejs/cli-win32-arm64@2.0.6", "", { "os": "win32", "cpu": "arm64" }, "sha512-290V4oSFoKaprKE1zkYVsDfAdn0An5DowZ+GIABgjoq1ndhvNxkJcpxPsiYtT7slbVe3xmlT0ncdfOsN7KruzA=="],
|
||||||
|
|
||||||
|
"@biomejs/cli-win32-x64": ["@biomejs/cli-win32-x64@2.0.6", "", { "os": "win32", "cpu": "x64" }, "sha512-bfM1Bce0d69Ao7pjTjUS+AWSZ02+5UHdiAP85Th8e9yV5xzw6JrHXbL5YWlcEKQ84FIZMdDc7ncuti1wd2sdbw=="],
|
||||||
|
|
||||||
|
"@discordjs/builders": ["@discordjs/builders@1.11.2", "", { "dependencies": { "@discordjs/formatters": "^0.6.1", "@discordjs/util": "^1.1.1", "@sapphire/shapeshift": "^4.0.0", "discord-api-types": "^0.38.1", "fast-deep-equal": "^3.1.3", "ts-mixer": "^6.0.4", "tslib": "^2.6.3" } }, "sha512-F1WTABdd8/R9D1icJzajC4IuLyyS8f3rTOz66JsSI3pKvpCAtsMBweu8cyNYsIyvcrKAVn9EPK+Psoymq+XC0A=="],
|
||||||
|
|
||||||
|
"@discordjs/collection": ["@discordjs/collection@1.5.3", "", {}, "sha512-SVb428OMd3WO1paV3rm6tSjM4wC+Kecaa1EUGX7vc6/fddvw/6lg90z4QtCqm21zvVe92vMMDt9+DkIvjXImQQ=="],
|
||||||
|
|
||||||
|
"@discordjs/formatters": ["@discordjs/formatters@0.6.1", "", { "dependencies": { "discord-api-types": "^0.38.1" } }, "sha512-5cnX+tASiPCqCWtFcFslxBVUaCetB0thvM/JyavhbXInP1HJIEU+Qv/zMrnuwSsX3yWH2lVXNJZeDK3EiP4HHg=="],
|
||||||
|
|
||||||
|
"@discordjs/rest": ["@discordjs/rest@2.5.1", "", { "dependencies": { "@discordjs/collection": "^2.1.1", "@discordjs/util": "^1.1.1", "@sapphire/async-queue": "^1.5.3", "@sapphire/snowflake": "^3.5.3", "@vladfrangu/async_event_emitter": "^2.4.6", "discord-api-types": "^0.38.1", "magic-bytes.js": "^1.10.0", "tslib": "^2.6.3", "undici": "6.21.3" } }, "sha512-Tg9840IneBcbrAjcGaQzHUJWFNq1MMWZjTdjJ0WS/89IffaNKc++iOvffucPxQTF/gviO9+9r8kEPea1X5J2Dw=="],
|
||||||
|
|
||||||
|
"@discordjs/util": ["@discordjs/util@1.1.1", "", {}, "sha512-eddz6UnOBEB1oITPinyrB2Pttej49M9FZQY8NxgEvc3tq6ZICZ19m70RsmzRdDHk80O9NoYN/25AqJl8vPVf/g=="],
|
||||||
|
|
||||||
|
"@discordjs/ws": ["@discordjs/ws@1.2.3", "", { "dependencies": { "@discordjs/collection": "^2.1.0", "@discordjs/rest": "^2.5.1", "@discordjs/util": "^1.1.0", "@sapphire/async-queue": "^1.5.2", "@types/ws": "^8.5.10", "@vladfrangu/async_event_emitter": "^2.2.4", "discord-api-types": "^0.38.1", "tslib": "^2.6.2", "ws": "^8.17.0" } }, "sha512-wPlQDxEmlDg5IxhJPuxXr3Vy9AjYq5xCvFWGJyD7w7Np8ZGu+Mc+97LCoEc/+AYCo2IDpKioiH0/c/mj5ZR9Uw=="],
|
||||||
|
|
||||||
|
"@sapphire/async-queue": ["@sapphire/async-queue@1.5.5", "", {}, "sha512-cvGzxbba6sav2zZkH8GPf2oGk9yYoD5qrNWdu9fRehifgnFZJMV+nuy2nON2roRO4yQQ+v7MK/Pktl/HgfsUXg=="],
|
||||||
|
|
||||||
|
"@sapphire/shapeshift": ["@sapphire/shapeshift@4.0.0", "", { "dependencies": { "fast-deep-equal": "^3.1.3", "lodash": "^4.17.21" } }, "sha512-d9dUmWVA7MMiKobL3VpLF8P2aeanRTu6ypG2OIaEv/ZHH/SUQ2iHOVyi5wAPjQ+HmnMuL0whK9ez8I/raWbtIg=="],
|
||||||
|
|
||||||
|
"@sapphire/snowflake": ["@sapphire/snowflake@3.5.3", "", {}, "sha512-jjmJywLAFoWeBi1W7994zZyiNWPIiqRRNAmSERxyg93xRGzNYvGjlZ0gR6x0F4gPRi2+0O6S71kOZYyr3cxaIQ=="],
|
||||||
|
|
||||||
|
"@types/debug": ["@types/debug@4.1.12", "", { "dependencies": { "@types/ms": "*" } }, "sha512-vIChWdVG3LG1SMxEvI/AK+FWJthlrqlTu7fbrlywTkkaONwk/UAGaULXRlf8vkzFBLVm0zkMdCquhL5aOjhXPQ=="],
|
||||||
|
|
||||||
|
"@types/ms": ["@types/ms@2.1.0", "", {}, "sha512-GsCCIZDE/p3i96vtEqx+7dBUGXrc7zeSK3wwPHIaRThS+9OhWIXRqzs4d6k1SVU8g91DrNRWxWUGhp5KXQb2VA=="],
|
||||||
|
|
||||||
|
"@types/node": ["@types/node@24.0.7", "", { "dependencies": { "undici-types": "~7.8.0" } }, "sha512-YIEUUr4yf8q8oQoXPpSlnvKNVKDQlPMWrmOcgzoduo7kvA2UF0/BwJ/eMKFTiTtkNL17I0M6Xe2tvwFU7be6iw=="],
|
||||||
|
|
||||||
|
"@types/validator": ["@types/validator@13.15.2", "", {}, "sha512-y7pa/oEJJ4iGYBxOpfAKn5b9+xuihvzDVnC/OSvlVnGxVg0pOqmjiMafiJ1KVNQEaPZf9HsEp5icEwGg8uIe5Q=="],
|
||||||
|
|
||||||
|
"@types/ws": ["@types/ws@8.18.1", "", { "dependencies": { "@types/node": "*" } }, "sha512-ThVF6DCVhA8kUGy+aazFQ4kXQ7E1Ty7A3ypFOe0IcJV8O/M511G99AW24irKrW56Wt44yG9+ij8FaqoBGkuBXg=="],
|
||||||
|
|
||||||
|
"@vladfrangu/async_event_emitter": ["@vladfrangu/async_event_emitter@2.4.6", "", {}, "sha512-RaI5qZo6D2CVS6sTHFKg1v5Ohq/+Bo2LZ5gzUEwZ/WkHhwtGTCB/sVLw8ijOkAUxasZ+WshN/Rzj4ywsABJ5ZA=="],
|
||||||
|
|
||||||
|
"debug": ["debug@4.4.1", "", { "dependencies": { "ms": "^2.1.3" } }, "sha512-KcKCqiftBJcZr++7ykoDIEwSa3XWowTfNPo92BYxjXiyYEVrUQh2aLyhxBCwww+heortUFxEJYcRzosstTEBYQ=="],
|
||||||
|
|
||||||
|
"discord-api-types": ["discord-api-types@0.38.13", "", {}, "sha512-FELWJRgLVQuR7Az8RhdEZE0k6QNjSW9PCUcU1iyP2Gke8HrJmnMceSS9pD93UM64s3tvZzJPajpPLjWZJylf4g=="],
|
||||||
|
|
||||||
|
"discord.js": ["discord.js@14.21.0", "", { "dependencies": { "@discordjs/builders": "^1.11.2", "@discordjs/collection": "1.5.3", "@discordjs/formatters": "^0.6.1", "@discordjs/rest": "^2.5.1", "@discordjs/util": "^1.1.1", "@discordjs/ws": "^1.2.3", "@sapphire/snowflake": "3.5.3", "discord-api-types": "^0.38.1", "fast-deep-equal": "3.1.3", "lodash.snakecase": "4.1.1", "magic-bytes.js": "^1.10.0", "tslib": "^2.6.3", "undici": "6.21.3" } }, "sha512-U5w41cEmcnSfwKYlLv5RJjB8Joa+QJyRwIJz5i/eg+v2Qvv6EYpCRhN9I2Rlf0900LuqSDg8edakUATrDZQncQ=="],
|
||||||
|
|
||||||
|
"dottie": ["dottie@2.0.6", "", {}, "sha512-iGCHkfUc5kFekGiqhe8B/mdaurD+lakO9txNnTvKtA6PISrw86LgqHvRzWYPyoE2Ph5aMIrCw9/uko6XHTKCwA=="],
|
||||||
|
|
||||||
|
"fast-deep-equal": ["fast-deep-equal@3.1.3", "", {}, "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q=="],
|
||||||
|
|
||||||
|
"inflection": ["inflection@1.13.4", "", {}, "sha512-6I/HUDeYFfuNCVS3td055BaXBwKYuzw7K3ExVMStBowKo9oOAMJIXIHvdyR3iboTCp1b+1i5DSkIZTcwIktuDw=="],
|
||||||
|
|
||||||
|
"lodash": ["lodash@4.17.21", "", {}, "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="],
|
||||||
|
|
||||||
|
"lodash.snakecase": ["lodash.snakecase@4.1.1", "", {}, "sha512-QZ1d4xoBHYUeuouhEq3lk3Uq7ldgyFXGBhg04+oRLnIz8o9T65Eh+8YdroUwn846zchkA9yDsDl5CVVaV2nqYw=="],
|
||||||
|
|
||||||
|
"magic-bytes.js": ["magic-bytes.js@1.12.1", "", {}, "sha512-ThQLOhN86ZkJ7qemtVRGYM+gRgR8GEXNli9H/PMvpnZsE44Xfh3wx9kGJaldg314v85m+bFW6WBMaVHJc/c3zA=="],
|
||||||
|
|
||||||
|
"moment": ["moment@2.30.1", "", {}, "sha512-uEmtNhbDOrWPFS+hdjFCBfy9f2YoyzRpwcl+DqpC6taX21FzsTLQVbMV/W7PzNSX6x/bhC1zA3c2UQ5NzH6how=="],
|
||||||
|
|
||||||
|
"moment-timezone": ["moment-timezone@0.5.48", "", { "dependencies": { "moment": "^2.29.4" } }, "sha512-f22b8LV1gbTO2ms2j2z13MuPogNoh5UzxL3nzNAYKGraILnbGc9NEE6dyiiiLv46DGRb8A4kg8UKWLjPthxBHw=="],
|
||||||
|
|
||||||
|
"ms": ["ms@2.1.3", "", {}, "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA=="],
|
||||||
|
|
||||||
|
"pg-connection-string": ["pg-connection-string@2.9.1", "", {}, "sha512-nkc6NpDcvPVpZXxrreI/FOtX3XemeLl8E0qFr6F2Lrm/I8WOnaWNhIPK2Z7OHpw7gh5XJThi6j6ppgNoaT1w4w=="],
|
||||||
|
|
||||||
|
"retry-as-promised": ["retry-as-promised@7.1.1", "", {}, "sha512-hMD7odLOt3LkTjcif8aRZqi/hybjpLNgSk5oF5FCowfCjok6LukpN2bDX7R5wDmbgBQFn7YoBxSagmtXHaJYJw=="],
|
||||||
|
|
||||||
|
"semver": ["semver@7.7.2", "", { "bin": { "semver": "bin/semver.js" } }, "sha512-RF0Fw+rO5AMf9MAyaRXI4AV0Ulj5lMHqVxxdSgiVbixSCXoEmmX/jk0CuJw4+3SqroYO9VoUh+HcuJivvtJemA=="],
|
||||||
|
|
||||||
|
"sequelize": ["sequelize@6.37.7", "", { "dependencies": { "@types/debug": "^4.1.8", "@types/validator": "^13.7.17", "debug": "^4.3.4", "dottie": "^2.0.6", "inflection": "^1.13.4", "lodash": "^4.17.21", "moment": "^2.29.4", "moment-timezone": "^0.5.43", "pg-connection-string": "^2.6.1", "retry-as-promised": "^7.0.4", "semver": "^7.5.4", "sequelize-pool": "^7.1.0", "toposort-class": "^1.0.1", "uuid": "^8.3.2", "validator": "^13.9.0", "wkx": "^0.5.0" } }, "sha512-mCnh83zuz7kQxxJirtFD7q6Huy6liPanI67BSlbzSYgVNl5eXVdE2CN1FuAeZwG1SNpGsNRCV+bJAVVnykZAFA=="],
|
||||||
|
|
||||||
|
"sequelize-pool": ["sequelize-pool@7.1.0", "", {}, "sha512-G9c0qlIWQSK29pR/5U2JF5dDQeqqHRragoyahj/Nx4KOOQ3CPPfzxnfqFPCSB7x5UgjOgnZ61nSxz+fjDpRlJg=="],
|
||||||
|
|
||||||
|
"toposort-class": ["toposort-class@1.0.1", "", {}, "sha512-OsLcGGbYF3rMjPUf8oKktyvCiUxSbqMMS39m33MAjLTC1DVIH6x3WSt63/M77ihI09+Sdfk1AXvfhCEeUmC7mg=="],
|
||||||
|
|
||||||
|
"ts-mixer": ["ts-mixer@6.0.4", "", {}, "sha512-ufKpbmrugz5Aou4wcr5Wc1UUFWOLhq+Fm6qa6P0w0K5Qw2yhaUoiWszhCVuNQyNwrlGiscHOmqYoAox1PtvgjA=="],
|
||||||
|
|
||||||
|
"tslib": ["tslib@2.8.1", "", {}, "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w=="],
|
||||||
|
|
||||||
|
"undici": ["undici@6.21.3", "", {}, "sha512-gBLkYIlEnSp8pFbT64yFgGE6UIB9tAkhukC23PmMDCe5Nd+cRqKxSjw5y54MK2AZMgZfJWMaNE4nYUHgi1XEOw=="],
|
||||||
|
|
||||||
|
"undici-types": ["undici-types@7.8.0", "", {}, "sha512-9UJ2xGDvQ43tYyVMpuHlsgApydB8ZKfVYTsLDhXkFL/6gfkp+U8xTGdh8pMJv1SpZna0zxG1DwsKZsreLbXBxw=="],
|
||||||
|
|
||||||
|
"uuid": ["uuid@8.3.2", "", { "bin": { "uuid": "dist/bin/uuid" } }, "sha512-+NYs2QeMWy+GWFOEm9xnn6HCDp0l7QBD7ml8zLUmJ+93Q5NF0NocErnwkTkXVFNiX3/fpC6afS8Dhb/gz7R7eg=="],
|
||||||
|
|
||||||
|
"validator": ["validator@13.15.15", "", {}, "sha512-BgWVbCI72aIQy937xbawcs+hrVaN/CZ2UwutgaJ36hGqRrLNM+f5LUT/YPRbo8IV/ASeFzXszezV+y2+rq3l8A=="],
|
||||||
|
|
||||||
|
"wkx": ["wkx@0.5.0", "", { "dependencies": { "@types/node": "*" } }, "sha512-Xng/d4Ichh8uN4l0FToV/258EjMGU9MGcA0HV2d9B/ZpZB3lqQm7nkOdZdm5GhKtLLhAE7PiVQwN4eN+2YJJUg=="],
|
||||||
|
|
||||||
|
"ws": ["ws@8.18.3", "", { "peerDependencies": { "bufferutil": "^4.0.1", "utf-8-validate": ">=5.0.2" }, "optionalPeers": ["bufferutil", "utf-8-validate"] }, "sha512-PEIGCY5tSlUt50cqyMXfCzX+oOPqN0vuGqWzbcJ2xvnkzkq46oOpz7dQaTDBdfICb4N14+GARUDw2XV2N4tvzg=="],
|
||||||
|
|
||||||
|
"@discordjs/rest/@discordjs/collection": ["@discordjs/collection@2.1.1", "", {}, "sha512-LiSusze9Tc7qF03sLCujF5iZp7K+vRNEDBZ86FT9aQAv3vxMLihUvKvpsCWiQ2DJq1tVckopKm1rxomgNUc9hg=="],
|
||||||
|
|
||||||
|
"@discordjs/ws/@discordjs/collection": ["@discordjs/collection@2.1.1", "", {}, "sha512-LiSusze9Tc7qF03sLCujF5iZp7K+vRNEDBZ86FT9aQAv3vxMLihUvKvpsCWiQ2DJq1tVckopKm1rxomgNUc9hg=="],
|
||||||
|
}
|
||||||
|
}
|
||||||
12
commands/calendar/ping.ts
Normal file
12
commands/calendar/ping.ts
Normal file
@@ -0,0 +1,12 @@
|
|||||||
|
// import type { ChatInputCommandInteraction } from "discord.js";
|
||||||
|
import { SlashCommandBuilder, } from "discord.js";
|
||||||
|
|
||||||
|
export const data = new SlashCommandBuilder()
|
||||||
|
.setName("ping")
|
||||||
|
.setDescription("Send a ping to the bot");
|
||||||
|
|
||||||
|
export async function execute(interaction) {
|
||||||
|
await interaction.reply(
|
||||||
|
`Pong! This command was run by ${interaction.user.username}, who joined on ${interaction.member.joinedAt}.`
|
||||||
|
);
|
||||||
|
}
|
||||||
117
index.ts
Normal file
117
index.ts
Normal file
@@ -0,0 +1,117 @@
|
|||||||
|
import { token } from "./config.json";
|
||||||
|
import type { Interaction } from "discord.js";
|
||||||
|
import { Client, Events, GatewayIntentBits, MessageFlags, Collection } from "discord.js";
|
||||||
|
import type { SlashCommandBuilder } from "discord.js"
|
||||||
|
|
||||||
|
const BLITZCRANK_BANNER = `
|
||||||
|
****++++++++++*+++
|
||||||
|
**+*+******+********+******+*++*
|
||||||
|
**** *+*+**+*+*+*++++++++++++++*+++++*++++***
|
||||||
|
*=....... + **+*+*+++++++++++++++++++++++++++*++++++++++**
|
||||||
|
............= +****+*+*+++++++++#%%#######%*++++++++++++++**+**+**
|
||||||
|
*.....=@@@@+......+*+++++++++++##*#*++++++++++***%*+++++****++++++*+*++
|
||||||
|
.... @@. ..@% .. ..*++++++++%***++=%=+=======+++++**@+++++++++*++++*++**+
|
||||||
|
.....=@-...:@#.....+*+++++%***++====+====--==-====++**#+++++++++**+++**+*+*
|
||||||
|
.........@@@@-....-*++++#****++==---%:::::-------===+**#++++*++++++++++++***+
|
||||||
|
+.... +@. .........+++%***+++==--::==.::::::+##*-===+**%++++++++++++++++++*+++
|
||||||
|
*.......: .......--:.=@***++++=-::::.*....:=+:...-*-==+***+++++++++**+++++****+*
|
||||||
|
*.......=%:......*+++****+%==-=*+::..--....*-.....=+==++*#++++++++++++++**++++*+**
|
||||||
|
*+ ......+++++++++#+++*-::::::*....#....*+....:+:==++**%++++++++++++++*++++++++*
|
||||||
|
*+++++*+*++++*++++#++#-:.......+...-+...:.#**#=-===+++*#+++++++*++++*++++**+++*+*
|
||||||
|
*++*+++*+*+++++++++#*=#::.......+.::.#::::-=========+++**+++++++++++++++++++*+++*++
|
||||||
|
*+**+++++++++++++++*%*+=-........+-:::-#::---========+++#@=+++++++++++++++++++++++*+*
|
||||||
|
****+++*+**+*+++++++*%**+++:....+#=-----%-----========++@+===+++++++++++++++*+*+*++***
|
||||||
|
***+++++++++++++*++++@****-+#%%*:===----=*-===========%#*@%%%%%%%%%%#*+++++++++++++++**
|
||||||
|
**+*++*++++++++++*++++%#***++++++=========%======#%*==#***%###*******#%%%%@*++++++++++*+*
|
||||||
|
**+*+++++++*+++++*++++*@*****++++++========#==#+===----=+#%#****++++*****@####++++++*+*+*
|
||||||
|
+***++++*++++++++++++++@@#****++++++=======##===---------.%#*@%*+++++++**%#+**#++++*++***
|
||||||
|
*+*+*++++++++++++++++++==%@@#%@@+++++========%##:-----::%*##=#-::#*++++++*@=++#*#+++++++*++
|
||||||
|
*+*+*++++++*++++++++++=%%%@%@#####+++=======-%####+:=**#**--::--=##++++++==++####%+++++++**
|
||||||
|
***++++++++*+++++++++%%%@###%@#*#*%++=========@*#*##%#=-::--=++%+-#=+======+####**%++++*+*+
|
||||||
|
*+*+++++++++++++++++%%%#########%@%%*++======+%@%*##+*-*===#+-=====%=@#===#######**%+++++*+
|
||||||
|
*+*++++++++++++++++%%%####**********#%%%%%%#*+++*#%*#*+#*-:=========%::-*########*#++++++*+
|
||||||
|
*+*++++*++++++++++*##%##*****************+++++++++*#*##@*-===========%*##########*#++++*+*+
|
||||||
|
***+*++*+++*++++++%###*%*****++++++++++++++***####%*#*@*##:===========%###########+++++*+*+
|
||||||
|
++***++++*++++++++%#%*****##*+++++++++++**###%%+=====:@*##%-=========+#%########*++++*+++++
|
||||||
|
*+***++*+*+*++++++%#%%%#++**+++##+++++*####@===========:@###-======%%#%%######%++++++++****
|
||||||
|
***+++*++++++++++##%%####%#*==+=++*####@==+#========----:@#%-=#%%##%*=%*#####+++++++*+*+*
|
||||||
|
+***++*++++++++++##%%%########%%%%%%%*=====-%+-====----::-#%%%##%+-*+##+*#@++++++++++**+*
|
||||||
|
*+*++++++*++++++#%%%%%#######%%@@@==========:*:---:::::#*%%%#+-#*##%%+:#++++++*++++*+*+*
|
||||||
|
*++*+++*++++++++++%%%%######%%@@%@*=======---.*+::.-+*###*+**###%%+:=#*#++++*++++++***+
|
||||||
|
+*++*+**++*++++++++%%%####%@@@@@@%%=====---::.+++**##+++=*%%%%*:-*****#%#*%#*++*++*+*
|
||||||
|
++*+++++++*++++++++++@%%%@@@@@@@@%%-==--::.:#*%##+-++###%#*::#***#**%=:-#**%++++*+++
|
||||||
|
**+++*+++++++++++++++++++%@@@@@@@@%%:-:.=**#%#%*+*###%#=::+*####*%#*=:#***#*+++**+
|
||||||
|
*++***++*+++++++++++++++++++++*#%@%@-#*#%*+*=*%%#%#+::+*#######*%#**##***%+++*+**
|
||||||
|
*++**+++*++++++++++++++++++++++%#%#%%**-+####%#=::+*####%#####*%*####**%+++++++
|
||||||
|
+*+*+*+**+++*++*+++++++++++++*%#%#%*#%*%%#=:+*#####%***##**%#*@###*%*++++**
|
||||||
|
***+*++++++*++++++++*+++++++++%#%#%%%#=-+###########*-::-+##%#%%%%+****++
|
||||||
|
*+++++++++++++++++++++++++++++%%%%++############*%*=-#*###*@#%%%+**+*+
|
||||||
|
*+++*+*+*++++++++++++++++++++#%#####%##################*%#*#%***+++
|
||||||
|
++*+*+**+*+***++++*++++***++*%###%#*%%###%*##%%#####@%%%%***+**
|
||||||
|
*+*++++*+++++++++++++++++++*%#%%+=:..:=+=%#%%%%%%%%%%*+*+*+
|
||||||
|
+*++***++++++++++++++++++++%%#*#*#######%#%%%%%%#+**+*
|
||||||
|
**+*******+++**++**++*++#%%#########%%#%%%**++*+
|
||||||
|
++**+*++++*+*+++++++++@#######%%%#*++*****
|
||||||
|
**+*+*****++********##**+*++*+**+
|
||||||
|
+******************+
|
||||||
|
|
||||||
|
"FIRED UP AND READY TO SERVE!"
|
||||||
|
`;
|
||||||
|
|
||||||
|
const client = new Client({
|
||||||
|
intents: [
|
||||||
|
GatewayIntentBits.Guilds,
|
||||||
|
GatewayIntentBits.GuildMessages,
|
||||||
|
GatewayIntentBits.GuildMembers,
|
||||||
|
GatewayIntentBits.MessageContent,
|
||||||
|
],
|
||||||
|
});
|
||||||
|
|
||||||
|
interface Command {
|
||||||
|
data: SlashCommandBuilder,
|
||||||
|
execute: (i: Interaction) => void
|
||||||
|
};
|
||||||
|
|
||||||
|
// TODO(DWM): The original tutorial has this thing where you walk paths in a
|
||||||
|
// certain folder and look for specially constructed JS objects and
|
||||||
|
// dynamically constructs a set of commands that way. Fucking miss me with
|
||||||
|
// that, a billion times more complicated than it needs to be.
|
||||||
|
|
||||||
|
import * as _pingCommand from './commands/calendar/ping.ts' ;
|
||||||
|
const pingCommand = _pingCommand as Command;
|
||||||
|
|
||||||
|
const commands = new Collection<string, Command>();
|
||||||
|
commands.set(pingCommand.data.name, pingCommand);
|
||||||
|
|
||||||
|
client.on(Events.InteractionCreate, async (interaction: Interaction) => {
|
||||||
|
if (!interaction.isChatInputCommand()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
console.log(interaction.commandName);
|
||||||
|
const command = commands.get(interaction.commandName);
|
||||||
|
if (!command) {
|
||||||
|
console.error(`No matching command ${interaction.commandName}`);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
await command.execute(interaction);
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
if (interaction.replied || interaction.deferred) {
|
||||||
|
await interaction.followUp({
|
||||||
|
content: "There was an error while executing this command",
|
||||||
|
flags: MessageFlags.Ephemeral,
|
||||||
|
});
|
||||||
|
}
|
||||||
|
}
|
||||||
|
// TODO
|
||||||
|
});
|
||||||
|
|
||||||
|
client.once(Events.ClientReady, (readyClient) => {
|
||||||
|
for (const ln of BLITZCRANK_BANNER.split("\n")) {
|
||||||
|
console.log(ln);
|
||||||
|
}
|
||||||
|
console.log(`Logged in as ${readyClient.user.tag}`);
|
||||||
|
});
|
||||||
|
|
||||||
|
client.login(token);
|
||||||
28
package.json
Normal file
28
package.json
Normal file
@@ -0,0 +1,28 @@
|
|||||||
|
{
|
||||||
|
"name": "blitzcrank",
|
||||||
|
"version": "1.0.0",
|
||||||
|
"description": "FIRED UP AND READY TO SERVE",
|
||||||
|
"main": "index.js",
|
||||||
|
"scripts": {
|
||||||
|
"test": "echo \"Error: no test specified\" && exit 1"
|
||||||
|
},
|
||||||
|
"repository": {
|
||||||
|
"type": "git",
|
||||||
|
"url": "git+https://github.com/dwwmmn/blitzcrank.git"
|
||||||
|
},
|
||||||
|
"keywords": [
|
||||||
|
"discord",
|
||||||
|
"bot"
|
||||||
|
],
|
||||||
|
"author": "Drew Malzahn",
|
||||||
|
"license": "MIT",
|
||||||
|
"bugs": {
|
||||||
|
"url": "https://github.com/dwwmmn/blitzcrank/issues"
|
||||||
|
},
|
||||||
|
"homepage": "https://github.com/dwwmmn/blitzcrank#readme",
|
||||||
|
"dependencies": {
|
||||||
|
"@biomejs/biome": "^2.0.6",
|
||||||
|
"discord.js": "^14.21.0",
|
||||||
|
"sequelize": "^6.37.7"
|
||||||
|
}
|
||||||
|
}
|
||||||
21
sync-commands.ts
Normal file
21
sync-commands.ts
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
const { REST, Routes } = require("discord.js");
|
||||||
|
const { appId, guildId, token } = require("./config.json");
|
||||||
|
|
||||||
|
const commands = [require("./commands/calendar/ping.js").data.toJSON()];
|
||||||
|
|
||||||
|
const rest = new REST().setToken(token);
|
||||||
|
|
||||||
|
(async () => {
|
||||||
|
try {
|
||||||
|
console.log(`Started refreshing ${commands.length} slash commands`);
|
||||||
|
const data = await rest.put(
|
||||||
|
Routes.applicationGuildCommands(appId, guildId),
|
||||||
|
{
|
||||||
|
body: commands,
|
||||||
|
},
|
||||||
|
);
|
||||||
|
console.log(`Successfully reloaded ${data.length} slash commands`);
|
||||||
|
} catch (error) {
|
||||||
|
console.error(error);
|
||||||
|
}
|
||||||
|
})();
|
||||||
Reference in New Issue
Block a user