mirror of
https://github.com/toast-ts/Daggerbot-TS.git
synced 2024-11-16 20:00:59 -05:00
Compare commits
2 Commits
bb7a388ab2
...
872c835e35
Author | SHA1 | Date | |
---|---|---|---|
|
872c835e35 | ||
|
b7bdadc97b |
4
.pnp.cjs
generated
4
.pnp.cjs
generated
@ -46,6 +46,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["systeminformation", "npm:5.18.12"],\
|
||||
["typescript", "patch:typescript@npm%3A5.1.6#~builtin<compat/typescript>::version=5.1.6&hash=5da071"],\
|
||||
["xml-js", "npm:1.6.11"],\
|
||||
["youtube-sr", "npm:4.3.4"],\
|
||||
["ytdl-core", "npm:4.11.5"]\
|
||||
],\
|
||||
"linkType": "SOFT"\
|
||||
@ -1035,6 +1036,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["systeminformation", "npm:5.18.12"],\
|
||||
["typescript", "patch:typescript@npm%3A5.1.6#~builtin<compat/typescript>::version=5.1.6&hash=5da071"],\
|
||||
["xml-js", "npm:1.6.11"],\
|
||||
["youtube-sr", "npm:4.3.4"],\
|
||||
["ytdl-core", "npm:4.11.5"]\
|
||||
],\
|
||||
"linkType": "SOFT"\
|
||||
@ -1158,7 +1160,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["@types/youtube-sr", null],\
|
||||
["discord.js", "npm:14.12.1"],\
|
||||
["libsodium-wrappers", "npm:0.7.11"],\
|
||||
["youtube-sr", null]\
|
||||
["youtube-sr", "npm:4.3.4"]\
|
||||
],\
|
||||
"packagePeers": [\
|
||||
"@discord-player/extractor",\
|
||||
|
@ -1,3 +1,6 @@
|
||||
# main; node:current-alpine3.18
|
||||
# backup; node:current-bookworm
|
||||
FROM node:current-alpine3.18
|
||||
WORKDIR /bot
|
||||
RUN yarn
|
||||
CMD ["yarn", "node", "dist/index.js"]
|
9
docker-compose.yml
Normal file
9
docker-compose.yml
Normal file
@ -0,0 +1,9 @@
|
||||
version: '3'
|
||||
|
||||
services:
|
||||
bot:
|
||||
container_name: 'Daggerbot'
|
||||
image: 'git.toast-server.net/toast/daggerbot-ts:alpine3.18'
|
||||
volumes:
|
||||
- .:/bot
|
||||
network_mode: host
|
@ -39,10 +39,11 @@
|
||||
"moment": "2.29.4",
|
||||
"mongoose": "7.4.2",
|
||||
"ms": "2.1.3",
|
||||
"prism-media": "^1.3.5",
|
||||
"prism-media": "1.3.5",
|
||||
"systeminformation": "5.18.12",
|
||||
"typescript": "5.1.6",
|
||||
"xml-js": "1.6.11",
|
||||
"youtube-sr": "4.3.4",
|
||||
"ytdl-core": "4.11.5"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -107,12 +107,12 @@ export default class TClient extends Client {
|
||||
for await (const file of readdirSync('dist/events')){
|
||||
const eventFile = await import(`./events/${file}`);
|
||||
this.on(file.replace('.js',''), async(...args)=>eventFile.default.run(this,...args))
|
||||
};
|
||||
}
|
||||
for await (const file of readdirSync('dist/commands')){
|
||||
const command = await import(`./commands/${file}`);
|
||||
this.commands.set(command.default.data.name,{command, uses: 0});
|
||||
this.registry.push(command.default.data.toJSON())
|
||||
};
|
||||
}
|
||||
}
|
||||
formatTime(integer: number, accuracy = 1, options?: formatTimeOpt){
|
||||
let achievedAccuracy = 0;
|
||||
|
@ -16,6 +16,7 @@ client.on('ready', async()=>{
|
||||
},300000)
|
||||
});
|
||||
if (client.config.botSwitches.registerCommands){
|
||||
console.log('Total commands: '+client.registry.length) //Debugging reasons.
|
||||
client.config.whitelistedServers.forEach(guildId=>(client.guilds.cache.get(guildId) as Discord.Guild).commands.set(client.registry).catch((e:Error)=>{
|
||||
console.log(`Couldn't register slash commands for ${guildId} because`, e.stack);
|
||||
(client.channels.resolve(client.config.mainServer.channels.errors) as Discord.TextChannel).send(`Cannot register slash commands for **${client.guilds.cache.get(guildId).name}** (\`${guildId}\`):\n\`\`\`${e.message}\`\`\``)
|
||||
|
@ -848,10 +848,11 @@ __metadata:
|
||||
moment: 2.29.4
|
||||
mongoose: 7.4.2
|
||||
ms: 2.1.3
|
||||
prism-media: ^1.3.5
|
||||
prism-media: 1.3.5
|
||||
systeminformation: 5.18.12
|
||||
typescript: 5.1.6
|
||||
xml-js: 1.6.11
|
||||
youtube-sr: 4.3.4
|
||||
ytdl-core: 4.11.5
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
@ -1979,7 +1980,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"prism-media@npm:^1.3.5":
|
||||
"prism-media@npm:1.3.5, prism-media@npm:^1.3.5":
|
||||
version: 1.3.5
|
||||
resolution: "prism-media@npm:1.3.5"
|
||||
peerDependencies:
|
||||
@ -2576,7 +2577,7 @@ __metadata:
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
"youtube-sr@npm:^4.3.4":
|
||||
"youtube-sr@npm:4.3.4, youtube-sr@npm:^4.3.4":
|
||||
version: 4.3.4
|
||||
resolution: "youtube-sr@npm:4.3.4"
|
||||
checksum: e097f2a82ddc51a580e7b8556aba83968ee580ad29a8d035cbfdc497c4a6f227b3e3ef0bf4648c6edaf25aed18b872a0fad8fda0554d270129f7c5e60e4a01ef
|
||||
|
Loading…
Reference in New Issue
Block a user