mirror of
https://github.com/Ninluc/Dat_Boi.git
synced 2025-08-09 23:26:13 +02:00
Compare commits
3 Commits
cdd155e46a
...
aa09aa409d
Author | SHA1 | Date | |
---|---|---|---|
aa09aa409d | |||
5cdb091688 | |||
17af7ed269 |
1
.gitignore
vendored
Normal file → Executable file
1
.gitignore
vendored
Normal file → Executable file
@ -1,5 +1,6 @@
|
|||||||
# Packages
|
# Packages
|
||||||
node_modules/
|
node_modules/
|
||||||
|
package-lock.json
|
||||||
|
|
||||||
# IDE files
|
# IDE files
|
||||||
.vscode/
|
.vscode/
|
||||||
|
@ -13,7 +13,6 @@ FROM node:${NODE_VERSION}-alpine
|
|||||||
# Use production node environment by default.
|
# Use production node environment by default.
|
||||||
ENV NODE_ENV production
|
ENV NODE_ENV production
|
||||||
|
|
||||||
|
|
||||||
WORKDIR /usr/src/app
|
WORKDIR /usr/src/app
|
||||||
|
|
||||||
# Download dependencies as a separate step to take advantage of Docker's caching.
|
# Download dependencies as a separate step to take advantage of Docker's caching.
|
||||||
@ -23,7 +22,7 @@ WORKDIR /usr/src/app
|
|||||||
RUN --mount=type=bind,source=package.json,target=package.json \
|
RUN --mount=type=bind,source=package.json,target=package.json \
|
||||||
--mount=type=bind,source=package-lock.json,target=package-lock.json \
|
--mount=type=bind,source=package-lock.json,target=package-lock.json \
|
||||||
--mount=type=cache,target=/root/.npm \
|
--mount=type=cache,target=/root/.npm \
|
||||||
npm ci --omit=dev
|
npm ci
|
||||||
|
|
||||||
# Run the application as a non-root user.
|
# Run the application as a non-root user.
|
||||||
USER node
|
USER node
|
||||||
|
@ -16,7 +16,7 @@ module.exports = client => {
|
|||||||
try {
|
try {
|
||||||
let i = 0
|
let i = 0
|
||||||
client.guilds.cache.forEach( (guild) => {
|
client.guilds.cache.forEach( (guild) => {
|
||||||
if (!guild.me.permissions.has("ADMINISTRATOR")) {
|
if (!guild.members.me.permissions.has("ADMINISTRATOR")) {
|
||||||
table.addRow(guild.name, "Missing permissions")
|
table.addRow(guild.name, "Missing permissions")
|
||||||
i++
|
i++
|
||||||
}
|
}
|
||||||
@ -31,7 +31,7 @@ module.exports = client => {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
if (guild.me.permissions.has("CREATE_INSTANT_INVITE")) {
|
if (guild.members.me.permissions.has("CREATE_INSTANT_INVITE")) {
|
||||||
let channel = guild.channels.cache.filter(channel => channel.type === "GUILD_TEXT").first()
|
let channel = guild.channels.cache.filter(channel => channel.type === "GUILD_TEXT").first()
|
||||||
if (channel) {
|
if (channel) {
|
||||||
let invite = channel.createInvite(
|
let invite = channel.createInvite(
|
||||||
|
@ -160,7 +160,7 @@ module.exports = async (client, message) => {
|
|||||||
"SPEAK"
|
"SPEAK"
|
||||||
// "DEAFEN_MEMBERS",
|
// "DEAFEN_MEMBERS",
|
||||||
];
|
];
|
||||||
if (!message.guild.me.permissions.has(required_perms)) {
|
if (!message.guild.members.me.permissions.has(required_perms)) {
|
||||||
try {
|
try {
|
||||||
message.react("❌");
|
message.react("❌");
|
||||||
} catch {}
|
} catch {}
|
||||||
|
@ -71,23 +71,9 @@ module.exports = async (client, oldState, voiceState) => {
|
|||||||
connection.destroy();
|
connection.destroy();
|
||||||
}, 2000)
|
}, 2000)
|
||||||
})
|
})
|
||||||
|
|
||||||
// if (subscription) {
|
|
||||||
// // Unsubscribe after 5 seconds (stop playing audio on the voice connection)
|
|
||||||
// setTimeout(() => subscription.unsubscribe(), 5_000);
|
|
||||||
// }
|
|
||||||
|
|
||||||
player.play(resource);
|
player.play(resource);
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// setTimeout((subscription) => {
|
|
||||||
// subscription.unsubscribe()
|
|
||||||
// if (connection.state.status != "destroyed") {
|
|
||||||
// connection.destroy();
|
|
||||||
// }
|
|
||||||
// }, 6 * 1000)
|
|
||||||
|
|
||||||
sendNinluc(client, `Je joue *${rdVideoLink.split('.')[0]}* dans le salon ${voiceState.channel} du serveur **${voiceState.guild.name}**`);
|
sendNinluc(client, `Je joue *${rdVideoLink.split('.')[0]}* dans le salon ${voiceState.channel} du serveur **${voiceState.guild.name}**`);
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
|
@ -10,16 +10,12 @@
|
|||||||
"author": "Tomato#6966 (author of this template), Ninluc",
|
"author": "Tomato#6966 (author of this template), Ninluc",
|
||||||
"license": "ISC",
|
"license": "ISC",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@discordjs/opus": "^0.5.3",
|
|
||||||
"@discordjs/voice": "^0.10.0",
|
"@discordjs/voice": "^0.10.0",
|
||||||
"ascii-table": "0.0.9",
|
"ascii-table": "0.0.9",
|
||||||
|
"colors": "^1.4.0",
|
||||||
"discord.js": "^13.8.1",
|
"discord.js": "^13.8.1",
|
||||||
"ffmpeg-static": "^4.4.1",
|
"ffmpeg-static": "^4.4.1",
|
||||||
"libsodium-wrappers": "^0.7.10",
|
"libsodium-wrappers": "^0.7.10",
|
||||||
"moment": "^2.29.4"
|
"moment": "^2.29.4"
|
||||||
},
|
|
||||||
"devDependencies": {
|
|
||||||
"ascii-table": "0.0.9",
|
|
||||||
"colors": "^1.4.0"
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user